Skip to content

Commit

Permalink
[2375] Remove edit button from Resources title on dataset page
Browse files Browse the repository at this point in the history
Also check to see if user has sufficient privileges to edit before
showing same toolbar button.
  • Loading branch information
aron committed May 17, 2012
1 parent 1dc0bc4 commit f0ffe08
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ckan/templates/package/read.html
Expand Up @@ -16,7 +16,7 @@
</ol>
<ul class="actions">
<li><a class="btn" href=""><i class="ckan-icon ckan-icon-rewind"></i> History</a></li>
<li><a class="btn" href=""><i class="ckan-icon ckan-icon-tools"></i> Edit</a></li>
<li><a class="btn" href="" py:if="h.check_access('package_update',{'id':c.pkg.id})"><i class="ckan-icon ckan-icon-tools"></i> Edit</a></li>
<li><a class="btn" href=""><i class="ckan-icon ckan-icon-flag"></i> Report Issue</a></li>
</ul>
</nav>
Expand All @@ -37,15 +37,10 @@ <h1>${c.pkg_dict.get('title', c.pkg_dict.get('name'))}</h1>
</section>

<section id="dataset-resources" class="resources content">
<h3>Resources
<py:if test="h.check_access('package_update',{'id':c.pkg.id})">
${h.subnav_link(_('(edit)'), controller='package', action='editresources', id=c.pkg.name)}
</py:if>
</h3>
<h3>Resources</h3>
<ul class="resource-list" py:if="len(c.pkg_dict.get('resources', []))">
<li class="resource-item" py:for="res in c.pkg_dict.get('resources', [])" py:with="url=h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])">
<a class="heading" href="${url}">
<!--! ${h.resource_icon(res)} -->
${h.resource_display_name(res)}
<span py:if="res.get('format')" class="format-box" property="dc:format">${res.get('format')}</span>
</a>
Expand Down

0 comments on commit f0ffe08

Please sign in to comment.