##// END OF EJS Templates
user-bookmarks: add ${server_url} template to be used in the links.
dan -
r3526:0c9e5d56 default
parent child Browse files
Show More
@@ -496,6 +496,7 b' class MyAccountView(BaseAppView, DataGri'
496 496 if not user_bookmark:
497 497 raise HTTPFound(redirect_url)
498 498
499 # repository set
499 500 if user_bookmark.repository:
500 501 repo_name = user_bookmark.repository.repo_name
501 502 base_redirect_url = h.route_path(
@@ -506,7 +507,7 b' class MyAccountView(BaseAppView, DataGri'
506 507 .safe_substitute({'repo_url': base_redirect_url})
507 508 else:
508 509 redirect_url = base_redirect_url
509
510 # repository group set
510 511 elif user_bookmark.repository_group:
511 512 repo_group_name = user_bookmark.repository_group.group_name
512 513 base_redirect_url = h.route_path(
@@ -517,9 +518,11 b' class MyAccountView(BaseAppView, DataGri'
517 518 .safe_substitute({'repo_group_url': base_redirect_url})
518 519 else:
519 520 redirect_url = base_redirect_url
520
521 # custom URL set
521 522 elif user_bookmark.redirect_url:
522 redirect_url = user_bookmark.redirect_url
523 server_url = h.route_url('home').rstrip('/')
524 redirect_url = string.Template(user_bookmark.redirect_url) \
525 .safe_substitute({'server_url': server_url})
523 526
524 527 log.debug('Redirecting bookmark %s to %s', user_bookmark, redirect_url)
525 528 raise HTTPFound(redirect_url)
@@ -23,8 +23,11 b''
23 23 <label class="btn-link btn-danger">${_('Clear')}:</label>
24 24 ${h.checkbox('remove', value=True)}
25 25 </div>
26 </div>
26 </div>
27 27 </div>
28 <p class="help-block help-block-inline" >
29 ${_('Server URL is available as ${server_url} variable. E.g. Redirect url: ${server_url}/_admin/exception_tracker')}
30 </p>
28 31
29 32 <div class="label">
30 33 <label for="redirect_url">${_('Redirect URL')}:</label>
General Comments 0
You need to be logged in to leave comments. Login now