Koha/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc
Owen Leonard 9d890c7636 Bug 23410: Add submenus to system preferences sidebar menu
This patch adds a submenu to the sidebar menu in the system preferences
interface. Submenu links let you jump to the sub-sections in each
preference category.

In the search results view, a link is added to allow the user to jump
directly to the section from which those results came. For instance, if
your search returns the "SuspendHoldsOpac" preference, the link will
take you to to the Circulation preferences page and jump the page to the
"Holds policy" section.

This patch also converts the expand/collapse arrows to Font Awesome
icons. The obsolete image files are removed.

If you click a submenu link for a section on the current page which has
been collapsed, the section will expand.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Go to Administration -> System preferences.
 - Test the various preference categories and confirm that the submenus
   appear correctly and jump you to the right section.
   - Test that if you click a section heading to collapse it that
     clicking the corresponding submenu link in the sidebar causes it to
     expand again.
 - Do a search for system preferences and confirm that the sidebar menu
   displays correctly.
 - Confirm that the "View all..." links take you to the correct page and
   section.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-29 12:37:02 +02:00

185 lines
7 KiB
HTML

<div id="menu">
<ul>
[% IF ( accounting ) %]
<li class="active">
<a title="Accounting" href="/cgi-bin/koha/admin/preferences.pl?tab=accounting">Accounting</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Accounting" href="/cgi-bin/koha/admin/preferences.pl?tab=accounting">Accounting</a>
[% END %]
[% IF ( acquisitions ) %]
<li class="active">
<a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a>
[% END %]
</li>
[% IF ( admin ) %]
<li class="active">
<a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a>
[% END %]
</li>
[% IF ( authorities ) %]
<li class="active">
<a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a>
[% END %]
</li>
[% IF ( cataloguing ) %]
<li class="active">
<a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a>
[% END %]
</li>
[% IF ( circulation ) %]
<li class="active">
<a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a>
[% END %]
</li>
[% IF ( enhanced_content ) %]
<li class="active">
<a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a>
[% END %]
</li>
[% IF ( i18n_l10n ) %]
<li class="active">
<a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a>
[% END %]
</li>
[% IF ( local_use ) %]
<li class="active">
<a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a>
[% END %]
</li>
[% IF ( logs ) %]
<li class="active">
<a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a>
[% END %]
</li>
[% IF ( opac ) %]
<li class="active">
<a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a>
[% END %]
</li>
[% IF ( patrons ) %]
<li class="active">
<a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a>
[% END %]
</li>
[% IF ( searching ) %]
<li class="active">
<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a>
[% END %]
</li>
[% IF ( serials ) %]
<li class="active">
<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a>
[% END %]
</li>
[% IF ( staff_client ) %]
<li class="active">
<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a>
[% END %]
</li>
[% IF ( tools ) %]
<li class="active">
<a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a>
[% END %]
</li>
[% IF ( web_services ) %]
<li class="active">
<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a>
[% PROCESS subtabs %]
[% ELSE %]
<li>
<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a>
[% END %]
</li>
</ul>
</div>
[% BLOCK subtabs %]
[% UNLESS ( searchfield ) %]
[% FOREACH TAB IN TABS %]
<ul>
[% FOREACH LINE IN TAB.LINES %]
[% IF ( LINE.is_group_title ) %]
<li><a class="pref_sublink" href="#[% LINE.title | replace('\s+', '_') | uri %]">[% LINE.title | html %]</a></li>
[% END %]
[% END %]
</ul>
[% END %]
[% END %]
[% END %]