Line 0
Link Here
|
0 |
- |
1 |
[% USE raw %] |
|
|
2 |
[% USE Asset %] |
3 |
[% USE KohaDates %] |
4 |
[% SET footerjs = 1 %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>Bookings for [% INCLUDE 'biblio-title-head.inc' %] › Bookings › Circulation › Koha</title> |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
8 |
</head> |
9 |
|
10 |
<body id="circ_request" class="catalog"> |
11 |
|
12 |
[% INCLUDE 'header.inc' %] |
13 |
[% INCLUDE 'circ-search.inc' %] |
14 |
|
15 |
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> |
16 |
<ol> |
17 |
<li> |
18 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
19 |
</li> |
20 |
<li> |
21 |
<a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> |
22 |
</li> |
23 |
<li> |
24 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
25 |
</li> |
26 |
<li> |
27 |
<a href="#" aria-current="page"> |
28 |
Bookings |
29 |
</a> |
30 |
</li> |
31 |
</ol> |
32 |
</nav> |
33 |
|
34 |
<div class="main container-fluid"> |
35 |
<div class="row"> |
36 |
<div class="col-sm-10 col-sm-push-2"> |
37 |
<main> |
38 |
<div class="row"> |
39 |
<div class="btn-toolbar"> |
40 |
<div class="btn-group"> |
41 |
<button id="placbooking" class="btn btn-default" data-toggle="modal" data-target="#placeBookingModal" data-biblionumber="[% biblionumber | html %]"><i class="fa fa-calendar"></i> Place booking</button> |
42 |
</div> |
43 |
</div> |
44 |
<h1>Bookings for [% INCLUDE 'biblio-title-head.inc' %]</h1> |
45 |
<div class="page-section"> |
46 |
<table id="bookings_table"></table> |
47 |
</div> |
48 |
</div> |
49 |
</main> |
50 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
51 |
|
52 |
<div class="col-sm-2 col-sm-pull-10"> |
53 |
<aside> |
54 |
[% INCLUDE 'biblio-view-menu.inc' %] |
55 |
</aside> |
56 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
57 |
</div> <!-- /.row --> |
58 |
|
59 |
[% INCLUDE modals/place_booking.inc %] |
60 |
|
61 |
[% MACRO jsinclude BLOCK %] |
62 |
[% Asset.js("lib/dayjs/dayjs.min.js") | $raw %] |
63 |
[% INCLUDE 'datatables.inc' %] |
64 |
[% INCLUDE 'columns_settings.inc' %] |
65 |
[% INCLUDE 'calendar.inc' %] |
66 |
[% INCLUDE 'select2.inc' %] |
67 |
[% INCLUDE 'js-date-format.inc' %] |
68 |
[% Asset.js("js/place_booking_modal.js") | $raw %] |
69 |
<script> |
70 |
var bookings_table; |
71 |
$(document).ready(function(){ |
72 |
var bookings_table_url = "/api/v1/biblios/[% biblionumber | uri %]/bookings"; |
73 |
bookings_table = $('#bookings_table').kohaTable({ |
74 |
"ajax": { |
75 |
"url": bookings_table_url |
76 |
}, |
77 |
"embed": [ |
78 |
"item", |
79 |
"patron" |
80 |
], |
81 |
"columns": [{ |
82 |
"data": "booking_id", |
83 |
"title": "Booking ID", |
84 |
"visible": false, |
85 |
"searchable": false, |
86 |
"orderable": false |
87 |
}, |
88 |
{ |
89 |
"data": "item.external_id", |
90 |
"title": "Item", |
91 |
"searchable": true, |
92 |
"orderable": true, |
93 |
"defaultContent": "Any item", |
94 |
"render": function(data,type,row,meta) { |
95 |
if ( row.item ) { |
96 |
return row.item.external_id; |
97 |
} else { |
98 |
return null; |
99 |
} |
100 |
} |
101 |
}, |
102 |
{ |
103 |
"data": "patron.firstname:patron.surname", |
104 |
"title": "Patron", |
105 |
"searchable": true, |
106 |
"orderable": true, |
107 |
"render": function(data, type, row, meta) { |
108 |
var fullname; |
109 |
if ( row.patron.firstname == null ) { |
110 |
fullname = row.patron.surname; |
111 |
} |
112 |
else { |
113 |
fullname = row.patron.firstname + " " + row.patron.surname; |
114 |
} |
115 |
return escape_str(fullname); |
116 |
} |
117 |
}, |
118 |
{ |
119 |
"data": "start_date", |
120 |
"title": "Start date", |
121 |
"searchable": true, |
122 |
"orderable": true, |
123 |
"render": function(data, type, row, meta) { |
124 |
return $date(row.start_date); |
125 |
} |
126 |
}, |
127 |
{ |
128 |
"data": "end_date", |
129 |
"title": "End date", |
130 |
"searchable": true, |
131 |
"orderable": true, |
132 |
"render": function(data, type, row, meta) { |
133 |
return $date(row.end_date); |
134 |
} |
135 |
}] |
136 |
}, [], 1); |
137 |
}); |
138 |
</script> |
139 |
[% END %] |
140 |
|
141 |
[% INCLUDE 'intranet-bottom.inc' %] |