Browse Source

Bug 23173: (follow-up) Display available partners

When selecting partners for search during the "Place request with
partner libraries" workflow, there was no indication of which partners
could actually be searched (i.e. are attached to a Z target and enabled
for partner search). We now list them

Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@tudublin.ie>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Andrew Isherwood 2 years ago
committed by Martin Renvoize
parent
commit
fb482d2767
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 4
      koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
  2. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
  3. 19
      koha-tmpl/intranet-tmpl/prog/js/ill-availability-partner.js

4
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss

@ -3760,6 +3760,10 @@ input.renew {
transform: translateY(-50%);
}
#generic_confirm_search_count {
margin: 1em 0 1em 10em;
}
#generic_confirm_search {
display: block;
visibility: hidden;

5
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt

@ -298,7 +298,10 @@
[% END %]
</select>
[% IF Koha.Preference('ILLCheckAvailability') %]
<button type="button" id="generic_confirm_search">Search selected partners</button>
<div id="generic_confirm_search_count">Partners available for searching: <span id="generic_confirm_enabled">none</span></div>
<div id="generic_confirm_search">
<button type="button">Search selected partners</button>
</div>
[% END %]
</li>
<li>

19
koha-tmpl/intranet-tmpl/prog/js/ill-availability-partner.js

@ -1,8 +1,21 @@
$(document).ready(function() {
var enabled_names = [];
$('#partners option').each(function() {
var partner = $(this);
var partner_id = partner.data('partner-id');
if (isEnabled(partner_id)) {
enabled_names.push(partner.text().trim());
}
});
$('#generic_confirm_enabled').text(enabled_names.join(', '));
$('#partners').change(function() {
var selected = [];
$('#partners option:selected').each(function() {
selected.push($(this).data('partner-id'));
var partner_id = $(this).data('partner-id');
if (isEnabled(partner_id)) {
selected.push(partner_id);
}
});
if (selected.length > 0) {
$('#generic_confirm_search').css('visibility', 'initial');
@ -21,4 +34,8 @@ $(document).ready(function() {
$('#partnerSearch').on('hide.bs.modal', function() {
$.fn.dataTable.tables({ api: true }).destroy();
});
function isEnabled(id) {
return services[0].enabled.indexOf(id.toString()) > -1;
};
});

Loading…
Cancel
Save