<p class="small text-muted">
{% if current_user %}
{% if page.is_watched_by(current_user) %}
- <a href="/action/unwatch{{ page.url }}"><span class="fas fa-star" title="{{ _("Stop watching this page") }}"></span></a>
+ <a href="{{ page.url }}/_unwatch"><span class="fas fa-star" title="{{ _("Stop watching this page") }}"></span></a>
{% else %}
- <a href="/action/watch{{ page.url }}"><span class="far fa-star" title="{{ _("Watch this page") }}"></span></a>
+ <a href="{{ page.url }}/_watch"><span class="far fa-star" title="{{ _("Watch this page") }}"></span></a>
{% end %} •
{% end %}
# Actions
(r"([A-Za-z0-9\-_\/]+)?/_edit", wiki.ActionEditHandler),
- (r"/action/(watch|unwatch)(.*)", wiki.ActionWatchHandler),
+ (r"([A-Za-z0-9\-_\/]+)?/_(watch|unwatch)", wiki.ActionWatchHandler),
(r"/actions/upload", wiki.ActionUploadHandler),
# Handlers
class ActionWatchHandler(auth.CacheMixin, base.BaseHandler):
@tornado.web.authenticated
- def get(self, action, path):
+ def get(self, path, action):
page = self.backend.wiki.get_page(path)
if not page:
raise tornado.web.HTTPError(404, "Page does not exist: %s" % path)