[% ELSE %]
[% END %]
[% BLOCK add_form %]
[% IF additional_content %]
[% ELSE %]
[% END %]
[% END %]
[% BLOCK locations_options %]
[% IF category == 'news' || category == 'pages' %]
[% IF location == "staff_and_opac" %]
[% ELSE %]
[% END %]
[% IF location == "staff_only" %]
[% ELSE %]
[% END %]
[% IF location == "opac_only" %]
[% ELSE %]
[% END %]
[% UNLESS category == 'pages' %]
[% IF location == "slip" %]
[% ELSE %]
[% END %]
[% END %]
[% ELSE %]
[% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate' ] %]
[% FOREACH l IN available_options.sort %]
[% IF l == location %]
[% ELSE %]
[% END %]
[% END %]
[% END %]
[% END %]
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% Asset.js("lib/hc-sticky.js") | $raw %]
[% IF additional_contents.count %]
[% INCLUDE 'datatables.inc' %]
[% ELSE %]
[% END %]
[% UNLESS ( wysiwyg ) %]
[% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
[% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
[% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
[% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
[% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
[% ELSE %]
[% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
[% INCLUDE 'str/tinymce_i18n.inc' %]
[% END # /UNLESS wysiwyg %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
[% END %]
[% FOR m IN messages %]
[% IF op != 'add_form' %]
[% SWITCH m.code %]
[% CASE 'error_on_update' %]
An error occurred when updating this content. Perhaps it already exists
[% CASE 'error_on_insert' %]
An error occurred when adding this content. Check the logs
[% CASE 'error_on_delete' %]
An error occurred when deleting this content. Check the logs
[% CASE 'success_on_update' %]
Content updated successfully
[% CASE 'success_on_insert' %]
Content added successfully
[% CASE 'success_on_delete' %]
Content deleted successfully
[% CASE %]
[% m.code | html %]
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% PROCESS add_form %]
[% ELSE %]
[% PROCESS list %]
[% END %]