fix thumbnail issues + some cleanup
[redakcja.git] / apps / catalogue / templates / catalogue / finished.html
1 {% extends "catalogue/base.html" %}
2 {% load i18n thumbnail catalogue_files %}
3
4
5 {% block inner_content %}
6
7
8 <h1>{% trans "Finished resources" %}</h1>
9 {% for doc in objects_list %}
10     <div class="resource-box" style="width: 182px; height: 180px; position: relative; border: 1px solid #aaa; margin: 10px; display: inline-block; padding: 0px; vertical-align: bottom">
11         <a style='display:block' href="{% url 'catalogue_html' doc.pk %}">
12         {% if doc.meta.cover_url %}
13             {% thumbnail doc.meta.cover_url|as_media_for:doc "180x120" crop="center" format="PNG"  as th %}
14             <img src="{{ th.url }}">
15             {% endthumbnail %}
16         {% elif doc.owner_organization.logo %}
17             {% thumbnail doc.owner_organization.logo "160x100" format="PNG"  padding=True as th %}
18             <img src="{{ th.url }}">
19             {% endthumbnail %}
20         {% endif %}
21         <div style="position: absolute; bottom: 10px; left: 10px; width: 160px; height: 40px; overflow:hidden">{{ doc.meta.title }}</div>
22         <div class="box-overlay" style="position: absolute; top:0; left: 0; padding: 5px; width: 180px; height: 120px; background: black; color: white; opacity: .7">
23             {% if doc.meta.audience %}
24                 {% trans "Audience" %}: {{ doc.meta.audience }}<br>
25             {% endif %}
26             {% trans "Owner" %}: {{ doc.owner_organization|default:"" }}
27             {{ doc.owner_user.get_full_name }}<br/>
28         </div>
29         </a>
30     </div>
31 {% endfor %}
32
33
34 {% endblock %}