diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2013-04-04 00:01:13 +0200 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2013-04-04 00:01:13 +0200 |
commit | 51bc894eaa597d4b925a2808630bca10b650bbc9 (patch) | |
tree | f7bca69fb8bacaef0896278bb1ad59c63485388e | |
parent | 70affe426f58d6782a10dc8630d81df480a12b8f (diff) |
fixed admin link for creating repos, and refactored the routes name
--HG--
branch : beta
-rw-r--r-- | rhodecode/config/routing.py | 7 | ||||
-rw-r--r-- | 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): <li> %if c.group: - <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> + <span>${h.link_to(_('Add repository'),h.url('new_repo',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> + <span>${h.link_to(_('Add repository'),h.url('new_repo'))}</span> %if h.HasPermissionAny('hg.admin')(): <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span> %endif |