Changeset - 667630c98eaa
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-02-14 23:09:17
marcin@python-works.com
added "add group" shortcuts for admins, and group admins
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/index_base.html
Show inline comments
 
@@ -2,26 +2,32 @@
 
    <div class="box">
 
        <!-- box / title -->
 
        <div class="title">
 
            <h5>
 
            <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')}
 
            </h5>
 
            %if c.rhodecode_user.username != 'default':
 
              <ul class="links">
 
                %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None):
 
                  <li>
 
                  %if c.group:
 
                        <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
 
                        %if h.HasPermissionAny('hg.admin')() or h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
 
                         <span>${h.link_to(_(u'Add group'),h.url('new_repos_group', parent_group=c.group.group_id))}</span>
 
                        %endif                        
 
                  %else:
 
                    <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span>
 
                    %if h.HasPermissionAny('hg.admin')():
 
                     <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span>
 
                    %endif
 
                  %endif
 
                  </li>
 
                %endif
 
                %if c.group and h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
 
                <li>
 
                    <span>${h.link_to(_('Edit group'),h.url('edit_repos_group',group_name=c.group.group_name), title=_('You have admin right to this group, and can edit it'))}</span>
 
                </li>
 
                %endif
 
              </ul>
 
            %endif
 
        </div>
 
        <!-- end box / title -->
0 comments (0 inline, 0 general)