diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7750d9878e61c0e625ed0918dd85a752979ad54b..c6f2a3f71992843f288915cbf22b82217bfb3738 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,11 +12,25 @@ Unreleased Changed ~~~~~~~ +* Use semantically correct html elements for headings and alerts. + + +`2.0b2` - 2021-06-15 +-------------------- + +Added +~~~~~~~ + +* Add option to disable dashboard auto updating as a user and sitewide. + +Changed +~~~~~~~ + * Add verbose names for all preference sections. * Add verbose names for all openid connect scopes and show them in grant view. * Include public dashboard in navigation -* Use semantically correct html elements for headings and alerts. +* Update German translations. Fixed ~~~~~ @@ -252,3 +266,4 @@ Fixed .. _2.0a2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0a2 .. _2.0b0: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0b0 .. _2.0b1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0b1 +.. _2.0b2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0b2 diff --git a/aleksis/core/preferences.py b/aleksis/core/preferences.py index 2dc131eadf7de27b0979bbf347ea4320346701c9..588992f60d4e396450b05fc7d4a9e2978f196a45 100644 --- a/aleksis/core/preferences.py +++ b/aleksis/core/preferences.py @@ -386,3 +386,23 @@ class PDFFileExpirationDuration(IntegerPreference): default = 3 verbose_name = _("PDF file expiration duration") help_text = _("in minutes") + + +@person_preferences_registry.register +class AutoUpdatingDashboard(BooleanPreference): + """User preference for automatically updating the dashboard.""" + + section = general + name = "automatically_update_dashboard" + default = True + verbose_name = _("Automatically update the dashboard and its widgets") + + +@site_preferences_registry.register +class AutoUpdatingDashboardSite(BooleanPreference): + """Automatic updating of dashboard.""" + + section = general + name = "automatically_update_dashboard_site" + default = True + verbose_name = _("Automatically update the dashboard and its widgets sitewide") diff --git a/aleksis/core/templates/core/index.html b/aleksis/core/templates/core/index.html index 600b59177667d564acbea8e58f1e703089b26811..4de8ddcf35ef9153d094798c5cc019aa1bb0f863 100644 --- a/aleksis/core/templates/core/index.html +++ b/aleksis/core/templates/core/index.html @@ -108,5 +108,7 @@ </div> {% endif %} - <script type="text/javascript" src="{% static "js/include_ajax_live.js" %}"></script> + {% if user.person.preferences.general__automatically_update_dashboard and request.site.preferences.general__automatically_update_dashboard_site %} + <script type="text/javascript" src="{% static "js/include_ajax_live.js" %}"></script> + {% endif %} {% endblock %}