From 9f8f80cf982b00f5dff53cd0b8bd7e68eb82edf9 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Tue, 24 Apr 2018 16:03:40 +0100 Subject: [PATCH] Bug 20561: Improve full supplier metadata display This patch improves the display of the extra metadata that may be returned by an ILL supplier. The display of the metadata has been moved from the "Toggle full supplier metadata" link at the bottom of the page to a button on the right of the request toolbar, labelled "Display supplier metadata". Clicking this button opens a modal displaying the metadata. To test: 1) Ensure ILL is enabled and you have at least one request 2) From the "View ILL requests" page, click "Manage request" on a request 3) Click the "Display supplier metadata" button on the right of the toolbar 4) Observe that a modal opens containing the metadata https://bugs.koha-community.org/show_bug.cgi?id=20651 --- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 9 +++- .../prog/en/modules/ill/ill-requests.tt | 52 ++++++++++++++-------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index bf009a6fd3..bc79279c8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -3081,6 +3081,10 @@ fieldset.rows + fieldset.action { margin-top: 20px; } +#interlibraryloans h3#dataPreviewLabel { + margin: 0.3em 0; +} + #interlibraryloans .bg-info { overflow: auto; position: relative; @@ -3149,8 +3153,9 @@ fieldset.rows + fieldset.action { margin-bottom: 1em; } -#ill-view-panel #requestattributes .label { - width: auto; +#requestattributes { + font-family: monospace; + line-height: 1.3em; } table#ill-requests { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index 70f31cad16..7dcd841d56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -193,12 +193,6 @@ } }; - // Toggle request attributes in Illview - $('#toggle_requestattributes').on('click', function(e) { - e.preventDefault(); - $('#requestattributes').toggleClass('content_hidden'); - }); - // Filter partner list $('#partner_filter').keyup(function() { var needle = $('#partner_filter').val(); @@ -216,6 +210,12 @@ }); }); + // Display the modal containing request supplier metadata + $('#ill-request-display-metadata').on('click', function(e) { + e.preventDefault(); + $('#dataPreview').modal({show:true}); + }); + // Get our data from the API and process it prior to passing // it to datatables var ajax = $.ajax( @@ -496,6 +496,10 @@ [% END %] [% END %] + + + Display supplier metadata +
@@ -562,21 +566,33 @@
[% END %]
-
-

Toggle full supplier metadata

-
- [% FOREACH attr IN request.illrequestattributes %] -
- [% attr.type %]: - [% attr.value %] -
- [% END %] -
- -
+ + [% ELSIF query_type == 'illlist' %]

View ILL requests

-- 2.11.0