<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" py:if="c.authorization_group">
  <ul class="tabbed">
    <li>${h.subnav_link(c, h.icon('authorization_group') + _('View'), controller='authorization_group', action='read', id=c.authorization_group.name or c.authorization_group.id)}</li>
    <li py:if="h.am_authorized(c, actions.EDIT, c.authorization_group)">
      ${h.subnav_link(c, h.icon('authorization_group_edit') + _('Edit'), controller='authorization_group', action='edit', id=c.authorization_group.name or c.authorization_group.id)}
    </li>
    <li py:if="h.am_authorized(c, actions.EDIT_PERMISSIONS, c.authorization_group)">
      ${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='authorization_group', action='authz', id=c.authorization_group.name or c.authorization_group.id)}
    </li>
  </ul>
  </py:match>

  <py:match path="primarysidebar">
    <li class="widget-container widget_text">
      <h2>Authorization Groups</h2>
      <p i18n:msg="">Instead of specifying the privileges of specific users on a package or group,
          you can also specify a set of users that will share the same rights. To do that, an    
          <strong>authorization group</strong> can be set-up and users can be added to it.</p>
      <p>
	<span class="ckan_logged_in" style="display: none;">
	  To create a new authorization 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='authorization_group',action='new', id=None)}">Create a new authorization group</a>
	</span>
      </p>
    </li>
  </py:match>
  
  <xi:include href="../layout.html" />
</html>
