Skip to content

Commit

Permalink
[#252] Only show add related item button if permission to add
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jan 25, 2013
1 parent cdd77c9 commit fc7dc1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ckan/templates/snippets/related.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ <h3 class="media-heading"><a href="{{ url }}">{{ item.title }}</a></h3>
</div>
{% endwith %}
{% else %}
<p>No apps, ideas, news stories or images have been
related to this dataset yet, why not add one now?</p>
<p class="action">{% link_for _('Add Item'), controller='related', action='new', id=pkg_name, icon='plus', class_='btn' %}</p>
<p>{% trans %}No apps, ideas, news stories or images have been
related to this dataset yet.{% endtrans %}</p>
{% if h.check_access('related_create') %}
<p class="action">{% link_for _('Add Item'), controller='related', action='new', id=pkg_name, icon='plus', class_='btn' %}</p>
{% endif %}
{% endif %}
</div>
</section>

0 comments on commit fc7dc1e

Please sign in to comment.