Permalink
Browse files

update package read page

  • Loading branch information...
1 parent 5a320f7 commit 4686ee297fc80790491d8e171fad5a44de86b35a @johnglover johnglover committed Oct 12, 2011
@@ -8,13 +8,21 @@
<py:match path="minornavigation">
<py:if test="c.pkg">
<ul class="tabbed">
- <li>${h.subnav_link(c, h.icon('package') + _('View'), controller='ckanext.catalog.controller:DataCatalogsController', action='read', id=c.pkg.name)}</li>
- <li py:if="h.am_authorized(c, actions.EDIT, c.pkg)">
- ${h.subnav_link(c, h.icon('package_edit') + _('Edit'), controller='ckanext.catalog.controller:DataCatalogsController', action='edit', id=c.pkg.name)}
+ <li py:attrs="{'class':'current-tab'} if c.action=='read' else {}">
+ ${h.subnav_link(c, h.icon('package') + _('View'), controller='ckanext.datacatalogs.controller:DataCatalogsController', action='read', id=c.pkg.name)}
</li>
- <li>${h.subnav_link(c, h.icon('page_white_stack') + _('History'), controller='ckanext.catalog.controller:DataCatalogsController', action='history', id=c.pkg.name)}</li>
- <li py:if="h.am_authorized(c, actions.EDIT_PERMISSIONS, c.pkg)">
- ${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='ckanext.catalog.controller:DataCatalogsController', action='authz', id=c.pkg.name)}
+ <li py:attrs="{'class':'current-tab'} if c.action=='edit' else {}" py:if="h.check_access('package_update',{'id':c.pkg.id})">
+ ${h.subnav_link(c, h.icon('package_edit') + _('Edit'), controller='ckanext.datacatalogs.controller:DataCatalogsController', action='edit', id=c.pkg.name)}
+ </li>
+ <li py:attrs="{'class':'current-tab'} if c.action=='history' else {}">
+ ${h.subnav_link(c, h.icon('page_stack') + _('History'), controller='ckanext.datacatalogs.controller:DataCatalogsController', action='history', id=c.pkg.name)}
+ </li>
+ <li py:attrs="{'class':'current-tab'} if c.action=='authz' else {}" py:if="h.check_access('package_edit_permissions',{'id':c.pkg.id})">
+ ${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='ckanext.datacatalogs.controller:DataCatalogsController', action='authz', id=c.pkg.name)}
+ </li>
+ <li class="action">
+ ${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
+ controller='ckanext.datacatalogs.controller:DataCatalogsController', action='history', id=c.pkg.name, format='atom', days=7)}
</li>
</ul>
</py:if>
@@ -7,12 +7,6 @@
<!-- Title -->
<h2 class="head">
${c.pkg_dict.get('title','')}
- <p class="atom-feed-link package-history-link">
- <a
- href="${url(controller='ckanext.datacatalogs.controller:DataCatalogsController', action='history', id=c.pkg.name, format='atom', days=7)}"
- title="${g.site_title} - Catalog History - ${c.pkg.name}">
- Subscribe &raquo;</a>
- </p>
</h2>
<py:def function="details_item(label, value)">

0 comments on commit 4686ee2

Please sign in to comment.