<html
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:i18n="http://genshi.edgewall.org/i18n"
  xmlns:py="http://genshi.edgewall.org/"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  py:strip=""
  >

  <py:match path="minornavigation">
    <ul py:if="c.group" class="tabbed">
      <li py:attrs="{'class':'current-tab'} if c.action=='read' else {}">${h.subnav_link(c, h.icon('group') + _('View'), controller='group', action='read', id=c.group.name)}</li>
      <li py:attrs="{'class':'current-tab'} if c.action=='edit' else {}" py:if="h.check_access('group_update',{'id':c.group.id})">
        ${h.subnav_link(c, h.icon('group_edit') + _('Edit'), controller='group', action='edit', id=c.group.name)}
      </li>
      <li py:attrs="{'class':'current-tab'} if c.action=='history' else {}">${h.subnav_link(c, h.icon('page_white_stack') + _('History'), controller='group', action='history', id=c.group.name)}</li>
      <li py:attrs="{'class':'current-tab'} if c.action=='authz' else {}" py:if="h.check_access('group_edit_permissions',{'id':c.group.id})">
        ${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='group', action='authz', id=c.group.name)}
      </li>
      <!-- li class="action">
      ${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
      controller='group', action='history', id=c.group.name, format='atom', days=7)}
      </li-->
    </ul>
    <ul py:if="not c.group" class="tabbed">
      <li py:attrs="{'class':'current-tab'} if c.action=='index' else {}">
        ${h.subnav_link(c, h.icon('group') + _('List Groups'), controller='group', action='index')}
      </li>
      <li py:attrs="{'class':'current-tab'} if c.action=='new' else {}">
        <span class="ckan-logged-in" style="display: none;">${ h.subnav_link(c, h.icon('group_add') + _('Add a Group'), controller='group', action='new')}</span>
        <span class="ckan-logged-out">${h.subnav_link(c, h.icon('group_add') + _('Login to Add a Group'), controller='group', action='new')}</span>
      </li>
    </ul>
  </py:match>
  
  <xi:include href="../layout.html" />
</html>
