Skip to content

Commit

Permalink
add docs on dismisable/required announcements (#1016)
Browse files Browse the repository at this point in the history
* add docs on dismisable/required announcements

* update this table name
  • Loading branch information
johrstrom authored Nov 20, 2024
1 parent e54825c commit 056eea4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
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

0 comments on commit 056eea4

Please sign in to comment.