<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="primarysidebar">
    <li class="widget-container widget_text">
      <h2>Groups section</h2>
      <p i18n:msg="">Whilst tags are great at collecting packages together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove packages from it.</p>
      <p>
	<span class="ckan_logged_in" style="display: none;">
	  To create a new group, please first <a href="${h.url_for(controller='user',action='login', id=None)}">login</a>.
	</span>
	<span class="ckan_logged_out">
	  <a href="${h.url_for(controller='group',action='new', id=None)}">Create a new group</a>
	</span>
      </p>
    </li>
  </py:match>

  <py:match path="minornavigation" py:if="c.group">
  <ul class="tabbed">
    <li>${h.subnav_link(c, h.icon('group') + _('View'), controller='group', action='read', id=c.group.name)}</li>
    <li py:if="h.am_authorized(c, actions.EDIT, c.group)">
      ${h.subnav_link(c, h.icon('group_edit') + _('Edit'), controller='group', action='edit', id=c.group.name)}
    </li>
    <li>${h.subnav_link(c, h.icon('page_white_stack') + _('History'), controller='group', action='history', id=c.group.name)}</li>
    <li py:if="h.am_authorized(c, actions.EDIT_PERMISSIONS, c.group)">
      ${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='group', action='authz', id=c.group.name)}
    </li>
  </ul>
  </py:match>
  
  <xi:include href="../layout.html" />
</html>
