Skip to content

Commit

Permalink
[#1766] Don't show 'add some resources' link if not auhtorized
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jun 11, 2014
1 parent 343b6f0 commit 5baa9e9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ckan/templates/package/snippets/resources_list.html
Expand Up @@ -21,12 +21,13 @@ <h3>{{ _('Data and Resources') }}</h3>
{% endblock %}
</ul>
{% else %}
<p>
{# Comment out "add some" as action doesn't exist yet #}
{% trans url=h.url_for(controller='package', action='new_resource', id=pkg.name) %}
<p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a>
{% endtrans %}
</p>
{% if h.check_access('resource_create', pkg) %}
{% trans url=h.url_for(controller='package', action='new_resource', id=pkg.name) %}
<p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a></p>
{% endtrans %}
{% else %}
<p class="empty">{{ _('This dataset has no data') }}</p>
{% endif %}
{% endif %}
{% endblock %}
</section>

0 comments on commit 5baa9e9

Please sign in to comment.