## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>

<%block name="title">
    ${_('%s Repository Group Settings') % c.repo_group.name}
</%block>

<%def name="breadcrumbs_links()">
    ${h.link_to(_('Admin'),h.url('admin_home'))}
    &raquo;
    ${h.link_to(_('Repository Groups'),h.url('repos_groups'))}
    %if c.repo_group.parent_group:
        &raquo; ${h.link_to(c.repo_group.parent_group.name,h.url('repos_group_home',group_name=c.repo_group.parent_group.group_name))}
    %endif
    &raquo; ${h.link_to(c.repo_group.name,h.url('repos_group_home',group_name=c.repo_group.group_name))}
</%def>

<%block name="header_menu">
    ${self.menu('admin')}
</%block>

<%def name="main()">
<div class="panel panel-primary">
    <div class="panel-heading clearfix">
        <div class="pull-left">
          ${self.breadcrumbs()}
        </div>
        <div class="pull-right">
            <a href="${h.url('new_repos_group', parent_group=c.repo_group.group_id)}" class="btn btn-success btn-xs"><i class="icon-plus"></i>${_('Add Child Group')}</a>
        </div>
    </div>

    ##main
    <div class="panel-body settings">
      <ul class="nav nav-pills nav-stacked">
        <li class="${'active' if c.active=='settings' else ''}"><a href="${h.url('edit_repo_group', group_name=c.repo_group.group_name)}">${_('Settings')}</a></li>
        <li class="${'active' if c.active=='advanced' else ''}"><a href="${h.url('edit_repo_group_advanced', group_name=c.repo_group.group_name)}">${_('Advanced')}</a></li>
        <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('edit_repo_group_perms', group_name=c.repo_group.group_name)}">${_('Permissions')}</a></li>
      </ul>

      <div>
        <%include file="/admin/repo_groups/repo_group_edit_${c.active}.html"/>
      </div>
    </div>
</div>
</%def>
