Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan
When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan. Test plan: 1 Define an item type as "Not for loan" 2 Add or edit an item so that its item type is "Not for loan" 3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan" 4 Apply patch, restart services 5 Check that the status is now "Not for loan" in both Intranet and OPAC Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
3615baf92f
commit
326c0156f4
1 changed files with 2 additions and 2 deletions
|
@ -485,7 +485,7 @@
|
||||||
nodes += '<span class="dmg">%s</span>'.format(escape_str(damaged_lib));
|
nodes += '<span class="dmg">%s</span>'.format(escape_str(damaged_lib));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( row.not_for_loan_status || item_types_notforloan[row.item_type_id] ) {
|
if ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) ) {
|
||||||
let not_for_loan_lib = av_not_for_loan.get(row.not_for_loan_status.toString());
|
let not_for_loan_lib = av_not_for_loan.get(row.not_for_loan_status.toString());
|
||||||
nodes += '<span class="notforloan">%s'.format(_("Not for loan")) + ( not_for_loan_lib ? '<span class="reason"> (%s)</span>'.format(escape_str(not_for_loan_lib)) : '' ) + '</span>';
|
nodes += '<span class="notforloan">%s'.format(_("Not for loan")) + ( not_for_loan_lib ? '<span class="reason"> (%s)</span>'.format(escape_str(not_for_loan_lib)) : '' ) + '</span>';
|
||||||
}
|
}
|
||||||
|
@ -525,7 +525,7 @@
|
||||||
}
|
}
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
if ( ! ( row.not_for_loan_status || item_types_notforloan[row.item_type_id] || row.checked_out_date || row.lost_status || row.withdrawn || row.damaged_status || row.transfer || row.first_hold || row.recall ) ) {
|
if ( ! ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) || row.checked_out_date || row.lost_status || row.withdrawn || row.damaged_status || row.transfer || row.first_hold || row.recall ) ) {
|
||||||
nodes += ' <span>%s</span>'.format(_("Available"))
|
nodes += ' <span>%s</span>'.format(_("Available"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue