|
Lines 220-228
Link Here
|
| 220 |
}); |
220 |
}); |
| 221 |
const item_types_notforloan = new Map(all_item_types.map( it => [it.itemtype, it.notforloan] )); |
221 |
const item_types_notforloan = new Map(all_item_types.map( it => [it.itemtype, it.notforloan] )); |
| 222 |
|
222 |
|
| 223 |
const statuses = {checked_out: _("Checked out"), local_use: _("On-site checkout"), in_transit: _("In transit"), lost: _("Lost"), withdrawn: _("Withdrawn"), damaged:_("Damaged"), not_for_loan: _("Not for loan"), on_hold: _("On hold"), recalled: _("Recalled"), available: _("Available"), restricted: _("Restricted"), in_bundle: _("In bundle")}; |
|
|
| 224 |
const all_statuses = Object.keys(statuses).map(k => {return {_id: k, _str: statuses[k]}}); |
| 225 |
|
| 226 |
const can_edit_items_from = [% To.json(can_edit_items_from || []) | $raw %]; |
223 |
const can_edit_items_from = [% To.json(can_edit_items_from || []) | $raw %]; |
| 227 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
224 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
| 228 |
const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib])); |
225 |
const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib])); |
|
Lines 242-247
Link Here
|
| 242 |
location: new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.location' })) | $raw %].map( av => [av.lib, av.authorised_value])), |
239 |
location: new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.location' })) | $raw %].map( av => [av.lib, av.authorised_value])), |
| 243 |
}; |
240 |
}; |
| 244 |
|
241 |
|
|
|
242 |
const statuses = { |
| 243 |
checked_out: _("Checked out"), |
| 244 |
local_use: _("On-site checkout"), |
| 245 |
in_transit: _("In transit"), |
| 246 |
lost: _("Lost"), |
| 247 |
...Object.fromEntries( |
| 248 |
[...av_lost].map(([k, v]) => [`lost-${k}`, `* ${v}`]) |
| 249 |
), |
| 250 |
withdrawn: _("Withdrawn"), |
| 251 |
...Object.fromEntries( |
| 252 |
[...av_withdrawn].map(([k, v]) => [`withdrawn-${k}`, `* ${v}`]) |
| 253 |
), |
| 254 |
damaged:_("Damaged"), |
| 255 |
...Object.fromEntries( |
| 256 |
[...av_damaged].map(([k, v]) => [`damaged-${k}`, `* ${v}`]) |
| 257 |
), |
| 258 |
not_for_loan: _("Not for loan"), |
| 259 |
...Object.fromEntries( |
| 260 |
[...av_not_for_loan].map(([k, v]) => [`not_for_loan-${k}`, `* ${v}`]) |
| 261 |
), |
| 262 |
on_hold: _("On hold"), |
| 263 |
recalled: _("Recalled"), |
| 264 |
available: _("Available"), |
| 265 |
restricted: _("Restricted"), |
| 266 |
in_bundle: _("In bundle"), |
| 267 |
}; |
| 268 |
const all_statuses = Object.keys(statuses).map(k => {return {_id: k, _str: statuses[k]}}); |
| 269 |
|
| 245 |
[% IF Koha.Preference('URLLinkText') %] |
270 |
[% IF Koha.Preference('URLLinkText') %] |
| 246 |
const url_link_text = "[% Koha.Preference('URLLinkText') | html %]"; |
271 |
const url_link_text = "[% Koha.Preference('URLLinkText') | html %]"; |
| 247 |
[% ELSE %] |
272 |
[% ELSE %] |