# HG changeset patch # User Marcin Kuzminski # Date 2013-04-03 22:01:13 # Node ID 77e6e941001f6999a1b04a6fbaada6726ae677b4 # Parent 7e73c0f4f335980ab3f04bd5bea65fc609dec67f fixed admin link for creating repos, and refactored the routes name diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py --- a/rhodecode/config/routing.py +++ b/rhodecode/config/routing.py @@ -104,13 +104,8 @@ def make_map(config): m.connect("formatted_repos", "/repos.{format}", action="index", conditions=dict(method=["GET"])) - m.connect("new_repo", "/repos/new", - action="new", conditions=dict(method=["GET"])) - #TODO: refactor the name - m.connect("admin_settings_create_repository", "/create_repository", + m.connect("new_repo", "/create_repository", action="create_repository", conditions=dict(method=["GET"])) - m.connect("formatted_new_repo", "/repos/new.{format}", - action="new", conditions=dict(method=["GET"])) m.connect("/repos/{repo_name:.*?}", action="update", conditions=dict(method=["PUT"], function=check_repo)) 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 @@ -10,12 +10,12 @@ %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None):
  • %if c.group: - ${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))} + ${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 group'),h.url('new_repos_group', parent_group=c.group.group_id))} %endif %else: - ${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))} + ${h.link_to(_('Add repository'),h.url('new_repo'))} %if h.HasPermissionAny('hg.admin')(): ${h.link_to(_(u'Add group'),h.url('new_repos_group'))} %endif