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
 
@@ -8,14 +8,20 @@
 
            %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>
0 comments (0 inline, 0 general)