diff --git a/rhodecode/templates/index_base.html b/rhodecode/templates/index_base.html
--- a/rhodecode/templates/index_base.html
+++ b/rhodecode/templates/index_base.html
@@ -7,26 +7,31 @@
%if c.rhodecode_user.username != 'default':
- %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None):
- -
+
-
+ <%
+ gr_name = c.group.group_name if c.group else None
+ # create repositories with write permission on group is set to true
+ create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
+ group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'can write into group index page')
+ group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
+ %>
+ %if h.HasPermissionAny('hg.admin','hg.create.repository')() or (group_admin or (group_write and create_on_write)):
%if c.group:
- ${h.link_to(_('Add repository'),h.url('new_repo',parent_group=c.group.group_id))}
- %if h.HasPermissionAny('hg.admin')() or h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
- ${h.link_to(_(u'Add repository group'),h.url('new_repos_group', parent_group=c.group.group_id))}
+ ${_('Add Repository')}
+ %if h.HasPermissionAny('hg.admin')() or h.HasRepoGroupPermissionAny('group.admin')(c.group.group_name):
+ ${_(u'Add Repository Group')}
%endif
%else:
- ${h.link_to(_('Add repository'),h.url('new_repo'))}
+ ${_('Add Repository')}
%if h.HasPermissionAny('hg.admin')():
- ${h.link_to(_(u'Add repository group'),h.url('new_repos_group'))}
+ ${_(u'Add Repository Group')}
%endif
%endif
-
%endif
- %if c.group and h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
- -
- ${h.link_to(_('Edit repository group'),h.url('edit_repos_group',group_name=c.group.group_name), title=_('You have admin right to this group, and can edit it'))}
+ %if c.group and h.HasRepoGroupPermissionAny('group.admin')(c.group.group_name):
+ ${_('Edit Repository Group')}
+ %endif
- %endif
%endif
@@ -37,9 +42,9 @@
- | ${_('Group name')} |
+ ${_('Group Name')} |
${_('Description')} |
- ##${_('Number of repositories')} |
+ ##${_('Number of Repositories')} |
@@ -48,8 +53,7 @@
- })
- ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))}
+ ${gr.name}
|
%if c.visual.stylify_metatags:
@@ -91,6 +95,7 @@
{key:"desc"},
{key:"last_change"},
{key:"last_changeset"},
+ {key:"last_rev_raw"},
{key:"owner"},
{key:"atom"},
]