Browse Source

artwork img placeholder + link to org publisersindex + whatever I cannot remmber

master
jules 4 years ago
parent
commit
f9a8eceba8
  1. 2
      daapinterface.py
  2. 22
      templates/artwork.html
  3. 4
      templates/publishersindex.html

2
daapinterface.py

@ -235,7 +235,7 @@ def artwork():
''') ''')
sparql.setReturnFormat(JSON) sparql.setReturnFormat(JSON)
artworkimages = sparql.query().convert() artworkimages = sparql.query().convert()
# print(artworkimages) print(artworkimages)
######### Right top ######### Right top
# contributors # contributors

22
templates/artwork.html

@ -39,17 +39,20 @@
<div class="artwork-about"> <div class="artwork-about">
<!-- left --> <!-- left -->
<div class="artwork-leftcolumn"> <div class="artwork-leftcolumn">
<!-- img - I am unsure how to handle the thing to go through the different pictures --> <!-- img - I am unsure how to handle the thing to go through the different pictures -->
<div class="artwork-about-img"> <div class="artwork-about-img">
{% if artworkimages['results']['bindings']==[] %}
<img class="artwork-about-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}">
{% else %}
{% for x in artworkimages['results']['bindings'] %} {% for x in artworkimages['results']['bindings'] %}
{% if loop.index <= 1 %} {% if loop.index <= 1 %}
{% if "image" in x %} {% if "image" in x %}
<img class="artwork-about-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'> <img class="artwork-about-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'>
{% else %}
<img class="artwork-about-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}">
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %}
</div> </div>
<!-- other stuff like downloads, absent for now --> <!-- other stuff like downloads, absent for now -->
<div></div> <div></div>
@ -122,15 +125,18 @@
<span class="label-item">DESCRIPTION</span> <span class="label-item">DESCRIPTION</span>
<!-- left part with the description text already coming in a div from wiki--> <!-- left part with the description text already coming in a div from wiki-->
{{ artworkdescriptiontext }} {{ artworkdescriptiontext }}
<!-- right ride with author etc -->
<div>
<span class="label-item">AUTHOR</span> <!-- right ride with author etc LATER-->
<!-- <div> -->
<!-- <span class="label-item">AUTHOR</span> -->
<!-- if there is an author name then add here otherwise info non available --> <!-- if there is an author name then add here otherwise info non available -->
<span class="label-item">SOURCE</span> <!-- <span class="label-item">SOURCE</span> -->
<!-- if there is a source name then add here otherwise info non available --> <!-- if there is a source name then add here otherwise info non available -->
<span class="label-item">DATE</span> <!-- <span class="label-item">DATE</span> -->
<!-- if there is a date add here otherwise info non available--> <!-- if there is a date add here otherwise info non available-->
</div> <!-- </div> -->
</div> </div>
<!-- end description loop --> <!-- end description loop -->

4
templates/publishersindex.html

@ -15,8 +15,8 @@
<tbody> <tbody>
{% for x in results['results']['bindings']%} {% for x in results['results']['bindings']%}
<tr> <tr>
<th class="idnumber"><a href="person?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th> <th class="idnumber"><a href="organisation?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th>
<th class="label"><a href="person?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["publishersLabel"]['value'] }}</a></th> <th class="label"><a href="organisation?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["publishersLabel"]['value'] }}</a></th>
<th class="altaliases"> <th class="altaliases">
{% if "publishersAltLabel" in x %} {% if "publishersAltLabel" in x %}
{{ x["publishersAltLabel"]["value"] }} {{ x["publishersAltLabel"]["value"] }}

Loading…
Cancel
Save