]> git.0d.be Git - panikdb.git/commitdiff
misc: enable kb
authorFrédéric Péters <fpeters@0d.be>
Mon, 22 Jun 2020 21:40:52 +0000 (23:40 +0200)
committerFrédéric Péters <fpeters@0d.be>
Mon, 22 Jun 2020 21:40:52 +0000 (23:40 +0200)
(to list recent changes in wiki pages)

panikdb/settings.py
panikdb/templates/combo/latest-page-updates-cell.html [new file with mode: 0644]

index 14cd7d8e8887012ac6773e6b3f634fc54aef7610..447f406f039e9ae0c297cb187fdefbd24f8216c8 100644 (file)
@@ -165,6 +165,7 @@ INSTALLED_APPS = (
     'combo.apps.assets',
     'combo.apps.dashboard',
     'combo.apps.gallery',
     'combo.apps.assets',
     'combo.apps.dashboard',
     'combo.apps.gallery',
+    'combo.apps.kb',
     'combo.apps.maps',
     'combo.apps.notifications',
     'combo.apps.pwa',
     'combo.apps.maps',
     'combo.apps.notifications',
     'combo.apps.pwa',
diff --git a/panikdb/templates/combo/latest-page-updates-cell.html b/panikdb/templates/combo/latest-page-updates-cell.html
new file mode 100644 (file)
index 0000000..33c8fa3
--- /dev/null
@@ -0,0 +1,23 @@
+{% load i18n %}
+{% block cell-content %}
+<h3>{% trans "Latest Page Updates" %}</h3>
+<div class="links-list">
+  <ul class="latest-page-updates-cell--list">
+    {% for page in pages %}
+    <li class="latest-page-updates-cell--item">
+      <a href="{{ page.get_online_url }}">
+        <span class="latest-page-updates-cell--item-title">{{ page.title }}</span>
+        <time
+          class="latest-page-updates-cell--item-date"
+          datetime="{{ page.last_update_timestamp|datetime|date:"c" }}"
+          >{% trans "on" %} {{ page.last_update_timestamp }}</time>
+        {% if page.is_new %}
+        <span class="latest-page-updates-cell--item-isnew">{% trans "(new page)" %}</span>
+        {% endif %}
+      </a>
+    </li>
+    {% endfor %}
+  </ul>
+</div>
+{% endblock %}
+