##// END OF EJS Templates
fixed admin link for creating repos, and refactored the routes name
marcink -
r3659:77e6e941 beta
parent child Browse files
Show More
@@ -104,13 +104,8 b' def make_map(config):'
104 m.connect("formatted_repos", "/repos.{format}",
104 m.connect("formatted_repos", "/repos.{format}",
105 action="index",
105 action="index",
106 conditions=dict(method=["GET"]))
106 conditions=dict(method=["GET"]))
107 m.connect("new_repo", "/repos/new",
107 m.connect("new_repo", "/create_repository",
108 action="new", conditions=dict(method=["GET"]))
109 #TODO: refactor the name
110 m.connect("admin_settings_create_repository", "/create_repository",
111 action="create_repository", conditions=dict(method=["GET"]))
108 action="create_repository", conditions=dict(method=["GET"]))
112 m.connect("formatted_new_repo", "/repos/new.{format}",
113 action="new", conditions=dict(method=["GET"]))
114 m.connect("/repos/{repo_name:.*?}",
109 m.connect("/repos/{repo_name:.*?}",
115 action="update", conditions=dict(method=["PUT"],
110 action="update", conditions=dict(method=["PUT"],
116 function=check_repo))
111 function=check_repo))
@@ -10,12 +10,12 b''
10 %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None):
10 %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None):
11 <li>
11 <li>
12 %if c.group:
12 %if c.group:
13 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
13 <span>${h.link_to(_('Add repository'),h.url('new_repo',parent_group=c.group.group_id))}</span>
14 %if h.HasPermissionAny('hg.admin')() or h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
14 %if h.HasPermissionAny('hg.admin')() or h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
15 <span>${h.link_to(_(u'Add group'),h.url('new_repos_group', parent_group=c.group.group_id))}</span>
15 <span>${h.link_to(_(u'Add group'),h.url('new_repos_group', parent_group=c.group.group_id))}</span>
16 %endif
16 %endif
17 %else:
17 %else:
18 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span>
18 <span>${h.link_to(_('Add repository'),h.url('new_repo'))}</span>
19 %if h.HasPermissionAny('hg.admin')():
19 %if h.HasPermissionAny('hg.admin')():
20 <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span>
20 <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span>
21 %endif
21 %endif
General Comments 0
You need to be logged in to leave comments. Login now