ckanext-d4science_theme/ckanext/d4science_theme/templates/home/snippets/search_for_organisations.html

34 lines
1.4 KiB
HTML

{% set organizations = h.d4science_get_browse_info_for_organisations_or_groups(type='organization', limit=10) %}
{% set type = 'organization' %}
{% if organizations|length > 1 %}
<div role="main" class="hero">
<div class="container">
<h3>Browse by {{_('Organizations')}}</h3>
<div id="search-for-organizations">
<table class="media-grid-homepage" data-module="media-grid">
{% for index in range(0,organizations|length) %}
{% set offset = 5 %}
{% set organization = organizations[index] %}
{% if index % offset == 0 %}
<tr>
{% endif %}
<td class="media-item-homepage">
{% set url = h.url_for(type ~ '_read', action='read', id=organization['name']) %}
<a href="{{ url }}" title="{{ _('View {name}').format(name=organization['display_name']) }}">
<img class="logo-homepage" src="{{ organization['url'] }}" alt="{{ organization['name'] }}" title="{{ _('{name}').format(name=organization['display_name']) }} organization">
<p class="media-heading-homepage">{{ organization['display_name'] }}&nbsp(<span class="statistics-show">{{organization['package_count']}}</span>)</p>
</a>
</td>
{% if (index+offset+1) % offset == 0 %}
</tr>
{% endif %}
{% endfor %}
</table>
</div>
<p style="float: right; margin-top: 15px">
<a href="/organization">See All {{_('Organizations')}}</a>
</p>
</div>
</div>
{% endif %}