Skip to content

Commit

Permalink
[#688] Adds page_heading and inner blocks to package templates
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Mar 26, 2013
1 parent 76a9569 commit 582ae79
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ckan/templates/package/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

{% block primary_content_inner %}
<section class="module-content">
<h1 class="hide-heading">{{ _('Activity Stream') }}</h1>
<h1 class="hide-heading">{% block page_heading %}{{ _('Activity Stream') }}{% endblock %}</h1>
{% block activity_stream %}
{{ c.package_activity_stream | safe }}
{% endblock %}
</section>
{% endblock %}
4 changes: 3 additions & 1 deletion ckan/templates/package/activity_stream.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

{% block package_content %}
<div class="module-content">
<h2 class="hide-heading">{{ _('Activity Stream') }}</h2>
<h2 class="hide-heading">{% block page_heading %}{{ _('Activity Stream') }}{% endblock %}</h2>
{% block activity_stream %}
{{ c.package_activity_stream | safe }}
{% endblock %}
</div>
{% endblock %}
4 changes: 3 additions & 1 deletion ckan/templates/package/followers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

{% block primary_content_inner %}
<section class="module-content">
<h1 class="hide-heading">{{ _('Followers') }}</h1>
<h1 class="hide-heading">{% block page_heading %}{{ _('Followers') }}{% endblock %}</h1>
{% block followers_list %}
{% snippet "user/snippets/followers.html", followers=c.followers %}
{% endblock %}
</section>
{% endblock %}
6 changes: 5 additions & 1 deletion ckan/templates/package/related_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@

{% block primary_content_inner %}
<section class="module-content">
<h2 class="hide-heading">{{ _('Related Media for {dataset}').format(dataset=h.dataset_display_name(c.pkg)) }}</h2>
<h2 class="hide-heading">{% block page_heading %}{{ _('Related Media for {dataset}').format(dataset=h.dataset_display_name(c.pkg)) }}{% endblock %}</h2>
{% block related_list %}
{% if c.pkg.related %}
{% snippet "related/snippets/related_list.html", related_items=c.pkg.related, pkg_id=c.pkg.name %}
{% else %}
<p class="empty">{{ _('No related items') }}</p>
{% endif %}
{% endblock %}
{% block form_actions %}
<div class="form-actions">
{% link_for _('Add Related Item'), controller='related', action='new', id=pkg.name, class_='btn btn-primary' %}
</div>
{% endblock %}
</section>
{% endblock %}

0 comments on commit 582ae79

Please sign in to comment.