adapt audience display for multiple values
[redakcja.git] / apps / catalogue / templates / catalogue / resource_box.html
1 {% load i18n %}
2 {% load thumbnail %}
3 {% load catalogue_files %}
4 <div class="resource-box" style="width: 182px; height: 180px; position: relative; border: 1px solid #aaa; margin: 10px; display: inline-block; padding: 0; vertical-align: bottom">
5     <a style='display:block' href="{% url link_url doc.pk %}">
6     {% if doc.meta.cover_url %}
7         {% thumbnail doc.meta.cover_url|as_media_for:doc "180x120" crop="center" format="PNG"  as th %}
8         <img src="{{ th.url }}">
9         {% endthumbnail %}
10     {% elif doc.owner_organization.logo %}
11         {% thumbnail doc.owner_organization.logo "160x100" format="PNG"  padding=True as th %}
12         <img src="{{ th.url }}" style="margin: 10px;">
13         {% endthumbnail %}
14     {% endif %}
15     <div style="position: absolute; bottom: 10px; left: 10px; width: 160px; height: 40px; overflow:hidden">{{ doc.meta.title }}</div>
16     <div class="box-overlay" style="position: absolute; top:0; left: 0; padding: 5px; width: 180px; height: 120px; background: black; color: white; opacity: .7">
17         {% if doc.meta.audience %}
18             {% trans "Audience" %}: {{ doc.meta.audience|join:", " }}<br>
19         {% endif %}
20         {% trans "Owner" %}: {{ doc.owner_organization|default:"" }}
21         {{ doc.owner_user.get_full_name }}<br/>
22     </div>
23     </a>
24 </div>