Skip to content

Commit

Permalink
[2255] Make sure that editors are shown the Add Dataset link on organ…
Browse files Browse the repository at this point in the history
…ization view
  • Loading branch information
rossjones committed Mar 29, 2012
1 parent e9e0ce9 commit 88a4440
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ckanext/organizations/templates/organization_layout.html
Expand Up @@ -5,14 +5,17 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip=""
>

<?python
import ckan.model as model
editors = c.group.members_of_type(model.User, 'editor')
?>
<py:match path="minornavigation">
<ul class="nav nav-pills" py:choose="bool(c.group)">
<py:when test="True" py:with="can_update=h.check_access('group_update',{'id':c.group.id})">
<li class="${'active' if c.action=='read' else ''}">${h.subnav_named_route(c, h.icon('group') + _('View'), 'organization_read',controller='group', action='read', id=c.group.name)}</li>
<li class="${'active' if c.action=='history' else ''}">${h.subnav_named_route(c, h.icon('page_white_stack') + _('History'), 'organization_action', controller='group', action='history', id=c.group.name)}</li>
<li class="divider" py:if="can_update">|</li>
<li class="dropdown ${'active' if c.action=='resource_read' else ''}" py:if="can_update">
<li class="divider" py:if="can_update or (c.userobj and c.userobj in editors)">|</li>
<li class="dropdown ${'active' if c.action=='resource_read' else ''}" py:if="can_update or (c.userobj and c.userobj in editors)">
<a href="${h.url_for(controller='package', action='new')}?groups__0__id=${c.group.id}">${h.icon('add') + _('Add Dataset')}</a>
</li>
<li class="${'active' if c.action=='edit' else ''}" py:if="can_update">
Expand Down

0 comments on commit 88a4440

Please sign in to comment.