Skip to content
Snippets Groups Projects
Verified Commit 62884242 authored by Lloyd Meins's avatar Lloyd Meins :thought_balloon: Committed by Jonathan Weth
Browse files

Add preferences to disable dashboard auto updating (per site/person)

parent f4265e50
Branches prepare-release-2.7.1
No related tags found
1 merge request!653Resolve "Web Content Accessibility Guidelines"
Pipeline #17950 passed
......@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_.
`2.0b2` - 2021-06-15
--------------------
Added
~~~~~~~
* Add option to disable dashboard auto updating as a user and sitewide.
Changed
~~~~~~~
......
......@@ -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")
......@@ -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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment