Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docs on dismisable/required announcements #1016

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions source/customizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ directory while members of the ``staff`` Unix group can.
sudo chown root:staff /var/www/ood/apps/sys/files


.. _configure_announcements:

Announcements
-------------

Expand All @@ -62,15 +64,25 @@ the user would see this message at the top of the dashboard:

If the announcement file has the extension ``yml`` and is a yaml file it is first rendered using ERB and then the resulting file is parsed as YAML. The valid keys are:

.. list-table:: Config Files
:stub-columns: 1
.. list-table:: Announcement configuration keys.

* - Key
- Description
* - type
- warning, info, success, or danger
- this is the Bootstrap alert style
- The type of announcment. Values can be ``warning``, ``info``, ``success``, or ``danger``.
* - msg
- string containing markdown formatted message
- if this is a blank string (only whitespace), the alert will not display
- The announcement's message.
* - dismissable
- Specify if the announcment is dismissable or not with ``true`` or ``false``.
Defaults to ``true``.
* - required
- Specify if the announcment is required or not with ``true`` or ``false``.
Defaults to ``false``. When this is set to ``true``, the user will not be
do anything until the announcment has been accepted.

.. tip::
You can use ``required`` announcements to present users with a ToS (terms of service),
EULA (end user license agreement) or similar.

Because the announcement is rendered via ERB you can do some interesting things, like stop showing the announcement past a specified date:

Expand Down
13 changes: 13 additions & 0 deletions source/release-notes/v4.0-release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ whitelist & blacklist configs have been removed.

.. include:: allowlist.inc

Announcements are dismissable by default.
*****************************************

In 4.0 :ref:`configure_announcements` now have the ability to be ``dismissable``.
Meaning users can press ``OK`` on the announment and it will no longer appear
on the pages.

In prior versions of Open OnDemand there was no way to dismiss or get rid of announcements.
Now in version 4.0, not only is there a way to dismiss announcements, announcements
themselves are ``dismissable`` by default.

The documentation for :ref:`configure_announcements` has been updated with this new feature.

Dependency updates
..................

Expand Down