1
0
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:
Krateng 2019-05-21 18:03:57 +02:00
parent ab648db336
commit 7b3c72d211
2 changed files with 8 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import monkey
import database
import utilities
import htmlmodules
import htmlgenerators
import malojatime
from utilities import *
from urihandler import uri_to_internal, remove_identical
@ -147,6 +148,7 @@ def static_html(name):
# maloja
environ["db"] = database
environ["htmlmodules"] = htmlmodules
environ["htmlgenerators"] = htmlgenerators
environ["malojatime"] = malojatime
environ["utilities"] = utilities
# external

View File

@ -10,13 +10,12 @@
<pyhp save="info.get('replace')" as="credited" />
<pyhp save="info.get('associated')" as="included" />
<pyhp save="'#' + str(info.get('position'))" as="positionstring" />
<pyhp save="urllib.parse.quote(artist)" as="encodedartist" />
<pyhp save="'months'" as="initialrange" />
<!-- includestring -->
<pyhp save="''" as="includestring" />
<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>
<pyhp if="credited is None">
@ -24,9 +23,12 @@
</pyhp>
<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 save="urllib.parse.quote(artist)" as="encodedartist" />
<pyhp save="urllib.parse.quote(credited)" as="encodedcredited" />
<head>
@ -119,7 +121,7 @@
</td>
<td>
<!-- We use the same classes / function calls here because we want it to switch together with pulse -->
<h2><a href='/performance?artist={encodedartist}&amp;step=year&amp;trail=1'>Performance</a></h2>
<h2><a href='/performance?artist={encodedcredited}&amp;step=year&amp;trail=1'>Performance</a></h2>
<pyhp for="range" in="ranges" separator = " | ">
<pyhp if="initialrange==range[0]">