Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2474] Add base html for group index page
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,57 @@ | ||
{% extends "page.jinja.html" %} | ||
|
||
{% block title %}{{ _('Groups of Datasets') }} - {{ super() }}{% endblock %} | ||
|
||
{% block breadcrumb %} | ||
<ol class="breadcrumb"> | ||
<li class="current">{{ h.nav_link(_('Groups'), controller='group', action='index') }}</li> | ||
</ol> | ||
{% endblock %} | ||
|
||
{% block actions %} | ||
<ul class="actions"> | ||
<li><a class="btn" href=""><i class="ckan-icon ckan-icon-plus"></i> Add Group</a></li> | ||
</ul> | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<div class="module"> | ||
<div class="content"> | ||
<h1>{{ _('Groups') }}</h1> | ||
<ul> | ||
{% for group in c.page.items %} | ||
{% 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> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{{ c.page.pager() }} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
<div class="module info"> | ||
<h2 class="heading"><i class="ckan-icon ckan-icon-info"></i> {{ _('What are Groups?') }}</h2> | ||
<div class="content"> | ||
{% trans %} | ||
<p>Whilst tags are great at collecting datasets together, there are | ||
occasions when you want to restrict users from editing a collection.</p> | ||
<p>A group can be set-up to specify which users have permission to add or | ||
remove datasets from it.</p> | ||
{% endtrans %} | ||
</div> | ||
</div> | ||
{% endblock %} |