Show More
@@ -52,6 +52,7 b' class DebugStyleView(BaseAppView):' | |||
|
52 | 52 | t_path = self.request.matchdict['t_path'] |
|
53 | 53 | c = self.load_default_context() |
|
54 | 54 | c.active = os.path.splitext(t_path)[0] |
|
55 | c.came_from = '' | |
|
55 | 56 | |
|
56 | 57 | return render_to_response( |
|
57 | 58 | 'debug_style/' + t_path, self._get_template_context(c), |
@@ -38,7 +38,7 b' and our server configuration are in sync' | |||
|
38 | 38 | |
|
39 | 39 | then you can retrieve the url by simply calling the URL function: |
|
40 | 40 | |
|
41 |
`h. |
|
|
41 | `h.route_path('url_name')` | |
|
42 | 42 | |
|
43 | 43 | The redirection must be first implemented in our servers before |
|
44 | 44 | you can see it working. |
@@ -299,7 +299,7 b' class CommentsModel(BaseModel):' | |||
|
299 | 299 | 'pullrequest_show', |
|
300 | 300 | repo_name=pr_target_repo.repo_name, |
|
301 | 301 | pull_request_id=pull_request_obj.pull_request_id, |
|
302 | anchor='comment-%s' % comment.comment_id) | |
|
302 | _anchor='comment-%s' % comment.comment_id) | |
|
303 | 303 | |
|
304 | 304 | # set some variables for email notification |
|
305 | 305 | pr_target_repo_url = h.route_url( |
@@ -34,6 +34,8 b' function registerRCRoutes() {' | |||
|
34 | 34 | pyroutes.register('ops_ping', '/_admin/ops/ping', []); |
|
35 | 35 | pyroutes.register('ops_error_test', '/_admin/ops/error', []); |
|
36 | 36 | pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []); |
|
37 | pyroutes.register('ops_ping_legacy', '/_admin/ping', []); | |
|
38 | pyroutes.register('ops_error_test_legacy', '/_admin/error_test', []); | |
|
37 | 39 | pyroutes.register('admin_home', '/_admin', []); |
|
38 | 40 | pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); |
|
39 | 41 | pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']); |
@@ -4,13 +4,14 b'' | |||
|
4 | 4 | var CHANNELSTREAM_SETTINGS = { |
|
5 | 5 | 'enabled': true, |
|
6 | 6 | 'ws_location': '${request.registry.settings.get('channelstream.ws_url')}', |
|
7 |
|
|
|
7 | 'webapp_location': '${h.route_url('home').rstrip('/')}' | |
|
8 | 8 | }; |
|
9 | 9 | %else: |
|
10 | 10 | var CHANNELSTREAM_SETTINGS = { |
|
11 | 11 | 'enabled':false, |
|
12 | 12 | 'ws_location': '', |
|
13 |
'webapp_location': ''} |
|
|
13 | 'webapp_location': '${h.route_url('home').rstrip('/')}' | |
|
14 | }; | |
|
14 | 15 | %endif |
|
15 | 16 | |
|
16 | 17 | </script> |
@@ -27,7 +27,7 b" return '%s_%s_%i' % (h.safeid(filename)," | |||
|
27 | 27 | <% |
|
28 | 28 | new_args = request.GET.mixed() |
|
29 | 29 | new_args.update(kw) |
|
30 | return h.url('', **new_args) | |
|
30 | return request.current_route_path(_query=new_args) | |
|
31 | 31 | %> |
|
32 | 32 | </%def> |
|
33 | 33 | |
@@ -124,15 +124,16 b' collapse_all = len(diffset.files) > coll' | |||
|
124 | 124 | <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=commit.raw_id)}">${'r%s:%s' % (commit.revision,h.short_id(commit.raw_id))}</a> - |
|
125 | 125 | ${h.age_component(commit.date)} - |
|
126 | 126 | %endif |
|
127 | %if diffset.limited_diff: | |
|
128 | ${_('The requested commit is too big and content was truncated.')} | |
|
127 | ||
|
128 | %if diffset.limited_diff: | |
|
129 | ${_('The requested commit is too big and content was truncated.')} | |
|
129 | 130 | |
|
130 | ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} | |
|
131 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
|
132 | %else: | |
|
133 | ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
|
134 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} | |
|
135 | %endif | |
|
131 | ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} | |
|
132 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
|
133 | %else: | |
|
134 | ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
|
135 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} | |
|
136 | %endif | |
|
136 | 137 | |
|
137 | 138 | </h2> |
|
138 | 139 | </div> |
@@ -27,7 +27,7 b'' | |||
|
27 | 27 | <div id="quick_login"> |
|
28 | 28 | <h4>${_('Sign in to your account')}</h4> |
|
29 | 29 | |
|
30 |
${h.form(h. |
|
|
30 | ${h.form(h.route_path('login'), needs_csrf_token=False)} | |
|
31 | 31 | <div class="form form-vertical"> |
|
32 | 32 | <div class="fields"> |
|
33 | 33 | |
@@ -43,7 +43,7 b'' | |||
|
43 | 43 | <div class="field"> |
|
44 | 44 | <div class="label"> |
|
45 | 45 | <label for="password">${_('Password')}:</label> |
|
46 |
<span class="forgot_password">${h.link_to(_('(Forgot password?)'),h. |
|
|
46 | <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'))}</span> | |
|
47 | 47 | </div> |
|
48 | 48 | <div class="input"> |
|
49 | 49 | ${h.password('password',class_='focus',tabindex=2)} |
@@ -53,7 +53,7 b'' | |||
|
53 | 53 | <div class="buttons"> |
|
54 | 54 | <div class="register"> |
|
55 | 55 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
56 |
${h.link_to(_("Don't have an account ?"),h. |
|
|
56 | ${h.link_to(_("Don't have an account ?"),h.route_path('register'))} | |
|
57 | 57 | %endif |
|
58 | 58 | </div> |
|
59 | 59 | <div class="submit"> |
General Comments 0
You need to be logged in to leave comments.
Login now