Koha/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc
Owen Leonard a344b8cf8c Bug 22023: Further improve responsive layout handling of staff client menu bar
This patch makes a number of changes in order to improve the way the
staff client's header menu adjusts at narrower browser widths:

 - Updated version of Bootstrap 3.3.7 which includes the "collapse"
   JavaScript plugin.
 - Modified default Bootstrap CSS using Bootstrap's customization tool.
   These changes facilitate the removal of some custom CSS (overriding
   Bootstrap) from staff-global.scss.
 - Added Bootstrap config file for loading customizations at
   https://getbootstrap.com/docs/3.3/customize/
 - Revised button classes for buttons in Bootstrap-styled toolbars.

   The modified default CSS resets the base font size in Bootstrap to
   better match our global CSS. A side-effect of this is that toolbar
   buttons ended up looking smaller than they should. Changing the
   button class solves this.

 - Restructure the header menu in order to allow different rules to
   govern the appearance of the navigational part of the menu
   (Circulation, Search, etc) and the user menu (Set library, My
   account, Log out).

 - Modify the cart JS to so that the popup works well at narrow widths.

To test, apply the patch, regenerate the staff client CSS, and clear
your browser cache.

 - Log in to the staff client and observe the layout of the header menu
   as you adjust the browser to various widths.
   - Confirm that sections of the menu "collapse" as the window gets
     narrower.
   - Confirm that dropdown menus behave correctly and that links work.
   - Confirm that the Cart link works as expected when the cart empty
     and when it has items.
- Install and enable multiple translations, including at least one
  set of sub-languages (e.g. fr-FR and fr-CA).
  - Test the appearance of the language menus in the footer at
    various browser widths.
- View pages with button toolbars and confirm that they appear unchanged
  (e.g. biblio detail page, patron detail page).

NOTE: While this patch is intended to make improvements to staff client
responsiveness, it does so within a limited scope. There are still many
pages which do not work well at narrower browser widths.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-13 05:31:28 +00:00

56 lines
3 KiB
HTML

[% INCLUDE 'blocking_errors.inc' %]
[% IF ( authid || CAN_user_editauthorities) %]
<div id="toolbar" class="btn-toolbar">
[% IF ( CAN_user_editauthorities ) %]
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-plus"></i> New authority
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
[% IF servers.count > 0 %]
<li><a id="z3950_new" href="#">New from Z39.50/SRU</a></li>
<li role="separator" class="divider"></li>
[% END %]
[% FOREACH authority_type IN authority_types %]
<li><a href="/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authority_type.authtypecode | uri %]">[% authority_type.authtypetext | html %]</a></li>
[% END %]
</ul>
</div>
[% END %]
[% IF ( authid ) %]
[% IF ( CAN_user_editauthorities ) %]
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-pencil"></i> Edit <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a id="editAuth" href="/cgi-bin/koha/authorities/authorities.pl?authid=[% authid | html %]">Edit record</a></li>
<li><a id="dupAuth" href="/cgi-bin/koha/authorities/authorities.pl?authid=[% authid | html %]&amp;op=duplicate">Edit as new (duplicate)</a></li>
[% IF servers.count > 0 %]
<li><a id="z3950_replace" href="#">Replace record via Z39.50/SRU</a></li>
[% END %]
[% UNLESS ( count ) %]
<li><a href="#" id="delAuth">Delete record</a></li>
[% END %]
</ul>
</div>
[% END %]
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-download"></i> Save
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/cgi-bin/koha/authorities/export.pl?format=mads&amp;op=export&amp;authid=[% authid | uri %]">MADS (XML)</a></li>
<li><a href="/cgi-bin/koha/authorities/export.pl?format=marcxml&amp;op=export&amp;authid=[% authid | uri %]">MARCXML</a></li>
<li><a href="/cgi-bin/koha/authorities/export.pl?format=marc8&amp;op=export&amp;authid=[% authid | uri %]">MARC (non-Unicode/MARC-8)</a></li>
<li><a href="/cgi-bin/koha/authorities/export.pl?format=utf8&amp;op=export&amp;authid=[% authid | uri %]">MARC (Unicode/UTF-8)</a></li>
</ul>
</div>
[% END %]
</div>
[% END %]