Lines 19-37
Link Here
|
19 |
[% AmazonAssocTag = '' %] |
19 |
[% AmazonAssocTag = '' %] |
20 |
[% END %] |
20 |
[% END %] |
21 |
|
21 |
|
22 |
[% ShowCourseReserves = 0 | html %] |
|
|
23 |
[% IF UseCourseReserves %] |
24 |
[% FOREACH item IN itemloop %] |
25 |
[% IF item.course_reserves %] |
26 |
[% FOREACH r IN item.course_reserves %] |
27 |
[% IF r.course.enabled == 'yes' %] |
28 |
[% ShowCourseReserves = 1 | html %] |
29 |
[% END %] |
30 |
[% END %] |
31 |
[% END %] |
32 |
[% END %] |
33 |
[% END %] |
34 |
|
35 |
[% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %] |
22 |
[% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %] |
36 |
|
23 |
|
37 |
[% SET footerjs = 1 %] |
24 |
[% SET footerjs = 1 %] |
Lines 379-385
Link Here
|
379 |
<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th> |
366 |
<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th> |
380 |
[% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %] |
367 |
[% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %] |
381 |
[% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %] |
368 |
[% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %] |
382 |
[% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %] |
369 |
[% IF Koha.Preference('UseCourseReserves') %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %] |
383 |
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %] |
370 |
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %] |
384 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %] |
371 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %] |
385 |
</tr> |
372 |
</tr> |
Lines 2174-2179
Link Here
|
2174 |
const av_damaged = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.damaged' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
2161 |
const av_damaged = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.damaged' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
2175 |
const av_not_for_loan= new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.notforloan' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
2162 |
const av_not_for_loan= new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.notforloan' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
2176 |
const av_restricted = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.restricted' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
2163 |
const av_restricted = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.restricted' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
|
|
2164 |
[% IF Koha.Preference('UseCourseReserves') %] |
2165 |
const av_courses_term = new Map([% To.json(AuthorisedValues.Get('TERM')) | $raw %].map( av => [av.authorised_value, av.lib])); |
2166 |
[% END %] |
2177 |
[% IF Koha.Preference('URLLinkText') %] |
2167 |
[% IF Koha.Preference('URLLinkText') %] |
2178 |
const url_link_text = "[% Koha.Preference('URLLinkText') | html %]"; |
2168 |
const url_link_text = "[% Koha.Preference('URLLinkText') | html %]"; |
2179 |
[% ELSE %] |
2169 |
[% ELSE %] |
Lines 2197-2202
Link Here
|
2197 |
embed.push('recall', 'recall.patron') |
2187 |
embed.push('recall', 'recall.patron') |
2198 |
[% END %] |
2188 |
[% END %] |
2199 |
embed.push('in_bundle', 'bundle_host'); |
2189 |
embed.push('in_bundle', 'bundle_host'); |
|
|
2190 |
[% IF Koha.Preference('UseCourseReserves') %] |
2191 |
embed.push('course_item.course_reserves.course'); |
2192 |
[% END %] |
2200 |
|
2193 |
|
2201 |
function build_table (table_id, table_settings, filters) { |
2194 |
function build_table (table_id, table_settings, filters) { |
2202 |
[% IF hidden_count %] |
2195 |
[% IF hidden_count %] |
Lines 2586-2598
Link Here
|
2586 |
} |
2579 |
} |
2587 |
}, |
2580 |
}, |
2588 |
[% END %] |
2581 |
[% END %] |
2589 |
[% IF ( ShowCourseReserves ) %] |
2582 |
[% IF Koha.Preference('UseCourseReserves') %] |
2590 |
{ |
2583 |
{ |
2591 |
data: "", |
2584 |
data: "course_item.course_reserves.course.course_name", |
2592 |
searchable: false, // FIXME |
2585 |
searchable: true, |
2593 |
orderable: true, |
2586 |
orderable: true, |
2594 |
render: function (data, type, row, meta) { |
2587 |
render: function (data, type, row, meta) { |
2595 |
return ""; // FIXME Display course reserves |
2588 |
let nodes = ''; |
|
|
2589 |
if (!row.course_item) return nodes; |
2590 |
row.course_item.course_reserves.forEach((cr, i) => { |
2591 |
let c = cr.course; |
2592 |
if ( c.enabled != 'yes' ) return; |
2593 |
nodes += '<p>'; |
2594 |
nodes += '<a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=%s">'.format(c.course_id); |
2595 |
nodes += c.course_name; |
2596 |
if ( c.section ) { |
2597 |
nodes += ' ' + c.section; |
2598 |
} |
2599 |
if ( c.term ) { |
2600 |
nodes += ' ' + av_courses_term.get(c.term.toString()); |
2601 |
} |
2602 |
nodes += '</p>'; |
2603 |
}); |
2604 |
return nodes; |
2596 |
} |
2605 |
} |
2597 |
}, |
2606 |
}, |
2598 |
[% END %] |
2607 |
[% END %] |
2599 |
- |
|
|