-
Notifications
You must be signed in to change notification settings - Fork 2k
/
organization_item.html
40 lines (37 loc) · 1.54 KB
/
organization_item.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{#
Renders a media item for a organization. This should be used in a list.
organization - A organization dict.
Example:
<ul class="media-grid">
{% for organization in organizations %}
{% snippet "organization/snippets/organization_item.html", organization=organization %}
{% endfor %}
</ul>
#}
{% set url = h.url_for(organization.type ~ '_read', action='read', id=organization.name) %}
<li class="media-item">
{% block image %}
<img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" alt="{{ organization.name }}" class="media-image">
{% endblock %}
{% block title %}
<h3 class="media-heading">{{ organization.display_name }}</h3>
{% endblock %}
{% block description %}
{% if organization.description %}
<p>{{ h.markdown_extract(organization.description, extract_length=80) }}</p>
{% endif %}
{% endblock %}
{% block datasets %}
{% if organization.packages %}
<strong class="count">{{ ungettext('{num} Dataset', '{num} Datasets', organization.packages).format(num=organization.packages) }}</strong>
{% else %}
<span class="count">{{ _('0 Datasets') }}</span>
{% endif %}
{% endblock %}
<a href="{{ url }}" title="{{ _('View {organization_name}').format(organization_name=organization.display_name) }}" class="media-view">
<span>{{ _('View {organization_name}').format(organization_name=organization.display_name) }}</span>
</a>
</li>
{% if position is divisibleby 3 %}
<li class="clearfix js-hide"></li>
{% endif %}