]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/wiki/page.html
wiki: Create a watchlist with all pages a user has ever edited
[ipfire.org.git] / src / templates / wiki / page.html
index 88e49dea111ace9da17af33819602f5379b5f8fa..4ccfea44627aa19ae591d487d75cdcbee5349fd5 100644 (file)
                </a>
        {% end %}
 
-       <div class="row">
-               <div class="col-12 col-sm-6">
-                       <p class="small">
-                               <a href="{{ request.path }}?action=revisions">
-                                       {{ _("Older Revisions") }}
-                               </a>
-                       </p>
-               </div>
+       <p class="small">
+               {% if current_user %}
+                       {% if page.is_watching(current_user) %}
+                               <a href="/action/unwatch{{ page.url }}"><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>
+                       {% end %} &bull;
+               {% end %}
+
+               <a href="{{ request.path }}?action=revisions">
+                       {{ _("Older Revisions") }}
+               </a>
 
-               <div class="col-12 col-sm-6">
-                       <p class="small text-right">
-                               {{ _("Last modified %s") % locale.format_date(page.timestamp) }}
+               &bull;
 
-                               {% if page.author %}
-                                       &bull;
+               {{ _("Last modified %s") % locale.format_date(page.timestamp) }}
 
-                                       <a href="/users/{{ page.author.uid }}">
-                                               {{ page.author }}
-                                       </a>
-                               {% end %}
-                       </p>
-               </div>
-       </div>
+               {% if page.author %}
+                       &bull;
+
+                       <a href="/users/{{ page.author.uid }}">
+                               {{ page.author }}
+                       </a>
+               {% end %}
+       </p>
 {% end block %}