Koha/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
Owen Leonard fd74b271db Bug 15887: Revise layout and behavior of item search fields management
This patch adds some JavaScript to the item search fields management
page so that the add form is not displayed by default. This simplifies
the interface and makes it more consistent with other similar
interfaces.

Also changed in this patch:
- Changing instances of "Items search fields" to "Item search fields."
- Correct form structure to use ordered list
- Add "required" classes and enable built-in JS form validation.
- Add explicitly labeled "Choose" options to <select>s.
- Add missing ids to form fields (labels don't work without them).
- Correct classes of message and alert dialogs.
- Add JS confirmation of deletions.
- Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384).

To test, apply the patch and go to Administration.

- Confirm that the "Item search fields" link is correct.
- Follow the link and confirm that the list of existing fields is shown
  by default, or a message saying there are no existing fields.
- Click the "New search field" button and confirm that it displays the
  entry form.
  - Confirm that submitting an empty form does not work.
  - Confirm that clicking the "Cancel" link correctly hides the form.
  - Confirm that submitting valid data works correctly.
- In the table of existing item search fields, confirm that the "Edit"
  button works correctly.
  - Confirm that submitting edits works correctly.
- In the table of existing item search fields, confirm that clicking
  "Delete" highlights the row in question and a confirmation dialog
  appears.
  - Test both canceling and confirming deletion.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. JSHint OK, koha-qa OK.

Revision per QA: Undid the change making tag and subfield inputs text
fields.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-02 22:36:17 +00:00

77 lines
3.1 KiB
HTML

<script type="text/javascript">//<![CDATA[
$(document).ready(function() {
var path = location.pathname.substring(1);
var url = window.location.toString();
var params = '';
if ( url.match(/\?(.+)$/) ) {
params = "?" + RegExp.$1;
}
$('#navmenulist a[href$="/' + path + params + '"]').css('font-weight','bold');
});
//]]>
</script>
<div id="navmenu">
<div id="navmenulist">
<h5>System preferences</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/preferences.pl">System preferences</a></li>
</ul>
<h5>Basic parameters</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a></li>
<li><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></li>
<li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></li>
</ul>
<h5>Patrons and circulation</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/categories.pl">Patron types and categories</a></li>
<li><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></li>
<li><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></li>
<li><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></li>
<li><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></li>
<li><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></li>
<li><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></li>
</ul>
<h5>Catalog</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic framework</a></li>
<li><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></li>
<li><a href="/cgi-bin/koha/admin/fieldmapping.pl">Keywords to MARC mapping</a></li>
<li><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC bibliographic framework test</a></li>
<li><a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a></li>
<li><a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a></li>
<li><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></li>
<li><a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a></li>
<li><a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a></li>
</ul>
<h5>Acquisition parameters</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></li>
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a></li>
<li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></li>
</ul>
[% IF CAN_user_plugins %]
<h5>Plugins</h5>
<ul>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></li>
</ul>
[% END %]
<h5>Additional parameters</h5>
<ul>
<!-- <li><a href="/cgi-bin/koha/admin/printers.pl">Network Printers</a></li> -->
<li><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50/SRU servers</a></li>
<li><a href="/cgi-bin/koha/admin/didyoumean.pl">Did you mean?</a></li>
<li><a href="/cgi-bin/koha/admin/columns_settings.pl">Columns settings</a></li>
<li><a href="/cgi-bin/koha/admin/audio_alerts.pl">Audio alerts</a></li>
</ul>
</div>
</div>