From 51bc894eaa597d4b925a2808630bca10b650bbc9 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Thu, 4 Apr 2013 00:01:13 +0200 Subject: fixed admin link for creating repos, and refactored the routes name --HG-- branch : beta --- rhodecode/config/routing.py | 7 +------ rhodecode/templates/index_base.html | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py index a90180cb..1ca18544 100644 --- 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 index d7aa7985..331d1271 100644 --- 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 -- cgit v1.2.3