Bug 10865: Don't show list permissions when adding public lists/sharing lists is not allowed
If patron creation of public lists is disallowed by the
OpacAllowPublicListCreation system preference the "category" option
should be hidden altogether instead of showing a <select> with "private"
as the only option. This patch hides category and permissions controls
when OpacAllowPublicListCreation is set to "don't allow."
To test you must have the virtualshelves system preference enabled.
Apply the patch and log into the OPAC. Test:
- With OpacAllowPublicListCreation enabled, create a new list. You
should see options for setting category and permissions. Saving the
new list should complete correctly and save the right settings.
- With OpacAllowPublicListCreation enabled, edit an existing list. You
should see the same options and saving your changes should work
correctly.
- With OpacAllowPublicListCreation disabled, create a new list. You
should only see fields for title and sort. Saving this list should
complete correctly and save the right settings.
- With OpacAllowPublicListCreation disabled, edit an existing list. You
should be able to edit only title and sort settings. Saving your
changes should work correctly.
Repeat your tests for both prog and bootstrap themes.
Revision: Existing public lists can be edited and retain their public
status even if OpacAllowPublicListCreation has since been disabled. This
preserves the behavior previous to this patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch fixes a big ergonomic issue.
Note: to me, the "New list" action should be outside the tabs.
It is confusing to have a "new list" into the public lists tab when it
is not possible to create new public lists.