mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added artist hyperlinks
This commit is contained in:
parent
ab648db336
commit
7b3c72d211
@ -9,6 +9,7 @@ import monkey
|
|||||||
import database
|
import database
|
||||||
import utilities
|
import utilities
|
||||||
import htmlmodules
|
import htmlmodules
|
||||||
|
import htmlgenerators
|
||||||
import malojatime
|
import malojatime
|
||||||
from utilities import *
|
from utilities import *
|
||||||
from urihandler import uri_to_internal, remove_identical
|
from urihandler import uri_to_internal, remove_identical
|
||||||
@ -147,6 +148,7 @@ def static_html(name):
|
|||||||
# maloja
|
# maloja
|
||||||
environ["db"] = database
|
environ["db"] = database
|
||||||
environ["htmlmodules"] = htmlmodules
|
environ["htmlmodules"] = htmlmodules
|
||||||
|
environ["htmlgenerators"] = htmlgenerators
|
||||||
environ["malojatime"] = malojatime
|
environ["malojatime"] = malojatime
|
||||||
environ["utilities"] = utilities
|
environ["utilities"] = utilities
|
||||||
# external
|
# external
|
||||||
|
@ -10,13 +10,12 @@
|
|||||||
<pyhp save="info.get('replace')" as="credited" />
|
<pyhp save="info.get('replace')" as="credited" />
|
||||||
<pyhp save="info.get('associated')" as="included" />
|
<pyhp save="info.get('associated')" as="included" />
|
||||||
<pyhp save="'#' + str(info.get('position'))" as="positionstring" />
|
<pyhp save="'#' + str(info.get('position'))" as="positionstring" />
|
||||||
<pyhp save="urllib.parse.quote(artist)" as="encodedartist" />
|
|
||||||
<pyhp save="'months'" as="initialrange" />
|
<pyhp save="'months'" as="initialrange" />
|
||||||
|
|
||||||
<!-- includestring -->
|
<!-- includestring -->
|
||||||
<pyhp save="''" as="includestring" />
|
<pyhp save="''" as="includestring" />
|
||||||
<pyhp if="credited is not None">
|
<pyhp if="credited is not None">
|
||||||
<pyhp save="'Competing under ' + credited + ' (' + positionstring + ')'" as="includestring" />
|
<pyhp save="'Competing under ' + htmlgenerators.artistLink(credited) + ' (' + positionstring + ')'" as="includestring" />
|
||||||
<pyhp save="''" as="positionstring" /> <!-- clear positionstring so it's not shown next to the artist -->
|
<pyhp save="''" as="positionstring" /> <!-- clear positionstring so it's not shown next to the artist -->
|
||||||
</pyhp>
|
</pyhp>
|
||||||
<pyhp if="credited is None">
|
<pyhp if="credited is None">
|
||||||
@ -24,9 +23,12 @@
|
|||||||
</pyhp>
|
</pyhp>
|
||||||
|
|
||||||
<pyhp if="included is not None and included != []">
|
<pyhp if="included is not None and included != []">
|
||||||
<pyhp save="'associated: ' + ', '.join(included)" as="includestring" />
|
<pyhp save="'associated: ' + htmlgenerators.artistLinks(included)" as="includestring" />
|
||||||
</pyhp>
|
</pyhp>
|
||||||
|
|
||||||
|
<pyhp save="urllib.parse.quote(artist)" as="encodedartist" />
|
||||||
|
<pyhp save="urllib.parse.quote(credited)" as="encodedcredited" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
@ -119,7 +121,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<!-- We use the same classes / function calls here because we want it to switch together with pulse -->
|
<!-- We use the same classes / function calls here because we want it to switch together with pulse -->
|
||||||
<h2><a href='/performance?artist={encodedartist}&step=year&trail=1'>Performance</a></h2>
|
<h2><a href='/performance?artist={encodedcredited}&step=year&trail=1'>Performance</a></h2>
|
||||||
|
|
||||||
<pyhp for="range" in="ranges" separator = " | ">
|
<pyhp for="range" in="ranges" separator = " | ">
|
||||||
<pyhp if="initialrange==range[0]">
|
<pyhp if="initialrange==range[0]">
|
||||||
|
Loading…
Reference in New Issue
Block a user