Skip to content

Commit

Permalink
[2504] Converted a very sparse followers page to Jinja
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 8, 2012
1 parent b15780c commit a0f6764
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions ckan/templates/package/followers.html
@@ -1,22 +1,20 @@
<html xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
{% extends "page.jinja.html" %}

<py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - Followers</py:def>
<py:def function="page_heading">Followers: ${c.pkg.title or c.pkg.name}</py:def>
<py:def function="body_class">no-sidebar</py:def>
{% block title %}{{ _('Followers') }} - {{ c.pkg_dict.title or c.pkg_dict.name }} - {{ super() }}{% endblock %}

<div py:match="content" class="dataset">
<h3>Followers</h3>
<ul class="userlist">
<li py:for="follower in c.followers" class="user">
<ul>
${h.linked_user(follower['name'], maxlength=20)}
{% block primary_content %}
<article class="module">
<div class="content">
<h1 class="page-heading">{{ _('Followers') }}</h1>
{% if c.followers %}
<ul class="userlist">
{% for follower in c.followers %}
<li>{{ h.linked_user(follower['name'], maxlength=20) }}</li>
{% endfor %}
</ul>
</li>
</ul>
</div>

<xi:include href="layout.html" />
</html>
{% else %}
<p class="empty">{{ _('No followers') }}</p>
{% endif %}
</div>
</article>
{% endblock %}

0 comments on commit a0f6764

Please sign in to comment.