changeset 3659:77e6e941001f beta

fixed admin link for creating repos, and refactored the routes name
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 04 Apr 2013 00:01:13 +0200
parents 7e73c0f4f335
children 38939a5ddae0
files rhodecode/config/routing.py rhodecode/templates/index_base.html
diffstat 2 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/config/routing.py	Wed Apr 03 19:40:37 2013 +0200
+++ b/rhodecode/config/routing.py	Thu Apr 04 00:01:13 2013 +0200
@@ -104,13 +104,8 @@
         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))
--- a/rhodecode/templates/index_base.html	Wed Apr 03 19:40:37 2013 +0200
+++ b/rhodecode/templates/index_base.html	Thu Apr 04 00:01:13 2013 +0200
@@ -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