diff --git a/rhodecode/apps/debug_style/views.py b/rhodecode/apps/debug_style/views.py --- a/rhodecode/apps/debug_style/views.py +++ b/rhodecode/apps/debug_style/views.py @@ -52,6 +52,7 @@ class DebugStyleView(BaseAppView): t_path = self.request.matchdict['t_path'] c = self.load_default_context() c.active = os.path.splitext(t_path)[0] + c.came_from = '' return render_to_response( 'debug_style/' + t_path, self._get_template_context(c), diff --git a/rhodecode/config/routing_links.py b/rhodecode/config/routing_links.py --- a/rhodecode/config/routing_links.py +++ b/rhodecode/config/routing_links.py @@ -38,7 +38,7 @@ and our server configuration are in sync then you can retrieve the url by simply calling the URL function: -`h.url('url_name')` +`h.route_path('url_name')` The redirection must be first implemented in our servers before you can see it working. diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -299,7 +299,7 @@ class CommentsModel(BaseModel): 'pullrequest_show', repo_name=pr_target_repo.repo_name, pull_request_id=pull_request_obj.pull_request_id, - anchor='comment-%s' % comment.comment_id) + _anchor='comment-%s' % comment.comment_id) # set some variables for email notification pr_target_repo_url = h.route_url( diff --git a/rhodecode/public/js/rhodecode/routes.js b/rhodecode/public/js/rhodecode/routes.js --- a/rhodecode/public/js/rhodecode/routes.js +++ b/rhodecode/public/js/rhodecode/routes.js @@ -34,6 +34,8 @@ function registerRCRoutes() { pyroutes.register('ops_ping', '/_admin/ops/ping', []); pyroutes.register('ops_error_test', '/_admin/ops/error', []); pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []); + pyroutes.register('ops_ping_legacy', '/_admin/ping', []); + pyroutes.register('ops_error_test_legacy', '/_admin/error_test', []); pyroutes.register('admin_home', '/_admin', []); pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']); diff --git a/rhodecode/templates/channelstream/plugin_init.mako b/rhodecode/templates/channelstream/plugin_init.mako --- a/rhodecode/templates/channelstream/plugin_init.mako +++ b/rhodecode/templates/channelstream/plugin_init.mako @@ -4,13 +4,14 @@ var CHANNELSTREAM_SETTINGS = { 'enabled': true, 'ws_location': '${request.registry.settings.get('channelstream.ws_url')}', - 'webapp_location': '${h.url('/', qualified=True)[:-1]}' + 'webapp_location': '${h.route_url('home').rstrip('/')}' }; %else: var CHANNELSTREAM_SETTINGS = { 'enabled':false, 'ws_location': '', - 'webapp_location': ''}; + 'webapp_location': '${h.route_url('home').rstrip('/')}' + }; %endif diff --git a/rhodecode/templates/codeblocks/diffs.mako b/rhodecode/templates/codeblocks/diffs.mako --- a/rhodecode/templates/codeblocks/diffs.mako +++ b/rhodecode/templates/codeblocks/diffs.mako @@ -27,7 +27,7 @@ return '%s_%s_%i' % (h.safeid(filename), <% new_args = request.GET.mixed() new_args.update(kw) -return h.url('', **new_args) +return request.current_route_path(_query=new_args) %> @@ -124,15 +124,16 @@ collapse_all = len(diffset.files) > coll ${'r%s:%s' % (commit.revision,h.short_id(commit.raw_id))} - ${h.age_component(commit.date)} - %endif - %if diffset.limited_diff: - ${_('The requested commit is too big and content was truncated.')} + + %if diffset.limited_diff: + ${_('The requested commit is too big and content was truncated.')} - ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} - ${_('Show full diff')} - %else: - ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', - '%(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}} - %endif + ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} + ${_('Show full diff')} + %else: + ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', + '%(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}} + %endif diff --git a/rhodecode/templates/debug_style/login.html b/rhodecode/templates/debug_style/login.html --- a/rhodecode/templates/debug_style/login.html +++ b/rhodecode/templates/debug_style/login.html @@ -27,7 +27,7 @@

${_('Sign in to your account')}

- ${h.form(h.url('login_home',came_from=h.url.current()), needs_csrf_token=False)} + ${h.form(h.route_path('login'), needs_csrf_token=False)}
@@ -43,7 +43,7 @@
- ${h.link_to(_('(Forgot password?)'),h.url('reset_password'))} + ${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'))}
${h.password('password',class_='focus',tabindex=2)} @@ -53,7 +53,7 @@
%if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): - ${h.link_to(_("Don't have an account ?"),h.url('register'))} + ${h.link_to(_("Don't have an account ?"),h.route_path('register'))} %endif