From 175f1e5bfe427511d0d4d93457f24137bf94c644 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 10 Oct 2024 08:01:08 +0200 Subject: ✨ display forum entries: activate/deactivate by user profile - profile form: edit news/forum display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/templates/index.html | 14 ++++++++------ ishtar_common/templates/ishtar/blocks/news_feed.html | 5 +++++ ishtar_common/templates/ishtar/forms/profile.html | 8 ++++++-- 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 ishtar_common/templates/ishtar/blocks/news_feed.html (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/index.html b/ishtar_common/templates/index.html index eaaf7dd54..47c51223e 100644 --- a/ishtar_common/templates/index.html +++ b/ishtar_common/templates/index.html @@ -2,12 +2,6 @@ {% load i18n %} {% block content %}

{{welcome_title}}

- {% if news_feed %} -
-

 {% trans "Latest news" %}

- {{ news_feed|safe }} -
- {% endif %}
{% if display_random_image %} {{random_image}} @@ -19,6 +13,9 @@
+ {% if news_feed %} +
+ {% endif %} {% if display_statistics %}
{% for label, number in statistics %} @@ -28,3 +25,8 @@ {% endif %}
{% endblock %} +{% block end_js %} +$(document).ready(function() { + dynamic_load("/news-feed/", "#news-feed"); +}); +{% endblock %} diff --git a/ishtar_common/templates/ishtar/blocks/news_feed.html b/ishtar_common/templates/ishtar/blocks/news_feed.html new file mode 100644 index 000000000..63524303a --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/news_feed.html @@ -0,0 +1,5 @@ +{% load i18n %} +{% if news_feed %}
+

 {% trans "Latest forum entries" %}

+ {{ news_feed|safe }} +
{% endif %} diff --git a/ishtar_common/templates/ishtar/forms/profile.html b/ishtar_common/templates/ishtar/forms/profile.html index 795ab6ab1..f4e3f5b41 100644 --- a/ishtar_common/templates/ishtar/forms/profile.html +++ b/ishtar_common/templates/ishtar/forms/profile.html @@ -14,7 +14,6 @@ $(document).ready(function(){ {% block content %}
-

{{page_name}}

{% if form.non_field_errors %} @@ -30,9 +29,14 @@ $(document).ready(function(){
{% endif %} {% endfor %} +

{% trans "Edit user preferences" %}

+

{% trans "Global preferences" %}

{% for field in form.visible_fields %} - {% if forloop.counter0 == 0 %} + {% if forloop.counter0 == 2 %} +
+

{% trans "Current profile" %}

+
{{field|bs_field|safe}}
-- cgit v1.2.3