Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2474] Move group items and item templates into partials
- Loading branch information
Showing
3 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% set url = h.url_for(group.type ~ '_read', action='read', id=group.name) %} | ||
<li class="media media-vertical"> | ||
<h3 class="heading"> | ||
<a href="{{ url }}" title="{{ _('View {name}').format(name=group.display_name) }}"> | ||
{{ group.display_name }} | ||
</a> | ||
</h3> | ||
<a class="image" href="{{ url }}"><img src="{{ group.image_url or '/base/images/placeholder-group.png' }}" /></a> | ||
{% if group.description %} | ||
<p>{{ h.truncate(group.description, length=80, whole_word=True) }}</p> | ||
{% else %} | ||
<p class="empty">{{ _('This group has no description') }}</p> | ||
{% endif %} | ||
<a class="btn btn-primary" href="{{ url }}">{{ ungettext('{num} Dataset', '{num} Datasets', group.packages).format(num=group.packages) }}</a> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ul> | ||
{% for group in c.page.items %} | ||
{% include "group/partials/group_item.html" %} | ||
{% endfor %} | ||
</ul> |