Changeset - 77e6e941001f
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2013-04-04 00:01:13
marcin@python-works.com
fixed admin link for creating repos, and refactored the routes name
2 files changed with 3 insertions and 8 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/routing.py
Show inline comments
 
@@ -101,19 +101,14 @@ def make_map(config):
 
             action="create", conditions=dict(method=["POST"]))
 
        m.connect("repos", "/repos",
 
             action="index", conditions=dict(method=["GET"]))
 
        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))
 
        m.connect("/repos/{repo_name:.*?}",
 
             action="delete", conditions=dict(method=["DELETE"],
 
                                              function=check_repo))
rhodecode/templates/index_base.html
Show inline comments
 
@@ -7,18 +7,18 @@
 
            </h5>
 
            %if c.rhodecode_user.username != 'default':
 
              <ul class="links">
 
                %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
 
                  %endif
 
                  </li>
 
                %endif
0 comments (0 inline, 0 general)