Changeset - 12f2547cf267
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-01-28 00:13:01
marcin@python-works.com
hide add repository button when you don't have at least write permission in group
ref #730
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/index_base.html
Show inline comments
 
<%page args="parent" />
 
    <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')():
 
                  <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.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name):
 
                        <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
 
                    %endif
 
                  %else:
 
                    <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span>
 
                  %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
0 comments (0 inline, 0 general)