Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
1190b370
Verified
Commit
1190b370
authored
3 years ago
by
Lloyd Meins
Browse files
Options
Downloads
Patches
Plain Diff
Add preferences to disable dashboard auto updating
parent
b7629f83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#15760
failed
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/preferences.py
+19
-0
19 additions, 0 deletions
aleksis/core/preferences.py
aleksis/core/templates/core/index.html
+5
-3
5 additions, 3 deletions
aleksis/core/templates/core/index.html
with
24 additions
and
3 deletions
aleksis/core/preferences.py
+
19
−
0
View file @
1190b370
...
...
@@ -386,3 +386,22 @@ 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
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
aleksis/core/templates/core/index.html
+
5
−
3
View file @
1190b370
...
...
@@ -60,7 +60,7 @@
<div
class=
"col s12 m6"
>
<h5>
{% blocktrans %}Last activities{% endblocktrans %}
</h5>
{% if activities %}
{% if activities %}
sitewide
<ul
class=
"collection"
>
{% for activity in activities %}
<li
class=
"collection-item"
>
...
...
@@ -110,5 +110,7 @@
</div>
{% endif %}
<script
type=
"text/javascript"
src=
"{% static "
js
/
include_ajax_live.js
"
%}"
></script>
{% endblock %}
{% 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 %}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment