]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/wiki/page.html
wiki: Fix editing the index page
[ipfire.org.git] / src / templates / wiki / page.html
index c6ba9e3fa52152025851ff8a6e5769c6d7dd751e..f6814c753167e44c4683751ec112f069bfa0bff4 100644 (file)
 {% end block %}
 
 {% block main %}
+       {% import os.path %}
+
        <div class="card mb-3">
                <div class="card-body wiki-content">
                        {% raw page.html %}
                </div>
        </div>
 
-       <a class="btn btn-primary btn-block mb-3" href="/actions/edit{{ request.path }}">
+       <a class="btn btn-primary btn-block mb-3" href="{{ os.path.join(request.path, "_edit") }}">
                <span class="fas fa-edit mr-2"></span> {{ _("Edit Page") }}
                {% if not current_user %}&dash; {{ _("Yes, you can edit!") }}{% end %}
        </a>
@@ -25,9 +27,9 @@
        <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="{{ os.path.join(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="{{ os.path.join(page.url, "_watch") }}"><span class="far fa-star" title="{{ _("Watch this page") }}"></span></a>
                        {% end %} &bull;
                {% end %}