Skip to content

Commit

Permalink
[2474] Add base html for group index page
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed May 30, 2012
1 parent e8fca86 commit d6ab19b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
Binary file added ckan/public/base/images/placeholder-group.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions ckan/templates/group/index.html
@@ -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 %}

0 comments on commit d6ab19b

Please sign in to comment.