Lines 47-52
Link Here
|
47 |
'biblio_id', |
47 |
'biblio_id', |
48 |
'library', |
48 |
'library', |
49 |
'status', |
49 |
'status', |
|
|
50 |
'additional_status', |
50 |
'updated', |
51 |
'updated', |
51 |
'illrequest_id', |
52 |
'illrequest_id', |
52 |
'action' |
53 |
'action' |
Lines 156-161
Link Here
|
156 |
} |
157 |
} |
157 |
}; |
158 |
}; |
158 |
|
159 |
|
|
|
160 |
// Render function for additional status |
161 |
var createAdditional = function(data, type, row) { |
162 |
return ( |
163 |
row.hasOwnProperty('requested_partners') && |
164 |
row.requested_partners && |
165 |
row.requested_partners.length > 0 |
166 |
) ? |
167 |
"Requested from:<br>" + |
168 |
row.requested_partners.replace('; ','<br>') : |
169 |
''; |
170 |
}; |
171 |
|
159 |
// Render function for creating a row's action link |
172 |
// Render function for creating a row's action link |
160 |
var createActionLink = function(data, type, row) { |
173 |
var createActionLink = function(data, type, row) { |
161 |
return '<a class="btn btn-default btn-sm" ' + |
174 |
return '<a class="btn btn-default btn-sm" ' + |
Lines 183-188
Link Here
|
183 |
name: _("Status"), |
196 |
name: _("Status"), |
184 |
func: createStatus |
197 |
func: createStatus |
185 |
}, |
198 |
}, |
|
|
199 |
additional_status: { |
200 |
name: _("Additional status"), |
201 |
func: createAdditional |
202 |
}, |
186 |
biblio_id: { |
203 |
biblio_id: { |
187 |
name: _("Biblio ID") |
204 |
name: _("Biblio ID") |
188 |
}, |
205 |
}, |
Lines 218-224
Link Here
|
218 |
// Get our data from the API and process it prior to passing |
235 |
// Get our data from the API and process it prior to passing |
219 |
// it to datatables |
236 |
// it to datatables |
220 |
var ajax = $.ajax( |
237 |
var ajax = $.ajax( |
221 |
'/api/v1/illrequests?embed=metadata,patron,capabilities,library' |
238 |
'/api/v1/illrequests?embed=requested_partners,metadata,patron,capabilities,library' |
222 |
).done(function() { |
239 |
).done(function() { |
223 |
var data = JSON.parse(ajax.responseText); |
240 |
var data = JSON.parse(ajax.responseText); |
224 |
// Make a copy, we'll be removing columns next and need |
241 |
// Make a copy, we'll be removing columns next and need |
Lines 263-269
Link Here
|
263 |
'bSearchable': false |
280 |
'bSearchable': false |
264 |
}, |
281 |
}, |
265 |
], |
282 |
], |
266 |
'aaSorting': [[ 6, 'desc' ]], // Default sort, updated descending |
283 |
'aaSorting': [[ 7, 'desc' ]], // Default sort, updated descending |
267 |
'processing': true, // Display a message when manipulating |
284 |
'processing': true, // Display a message when manipulating |
268 |
'iDisplayLength': 10, // 10 results per page |
285 |
'iDisplayLength': 10, // 10 results per page |
269 |
'sPaginationType': "full_numbers", // Pagination display |
286 |
'sPaginationType': "full_numbers", // Pagination display |
Lines 526-531
Link Here
|
526 |
<div class="status"> |
543 |
<div class="status"> |
527 |
<span class="label status">Status:</span> |
544 |
<span class="label status">Status:</span> |
528 |
[% capabilities.$req_status.name %] |
545 |
[% capabilities.$req_status.name %] |
|
|
546 |
[% IF request.requested_partners.length > 0 %] |
547 |
([% request.requested_partners %]) |
548 |
[% END %] |
549 |
|
529 |
</div> |
550 |
</div> |
530 |
<div class="updated"> |
551 |
<div class="updated"> |
531 |
<span class="label updated">Last updated:</span> |
552 |
<span class="label updated">Last updated:</span> |
Lines 591-596
Link Here
|
591 |
<th>Biblio ID</th> |
612 |
<th>Biblio ID</th> |
592 |
<th>Library</th> |
613 |
<th>Library</th> |
593 |
<th>Status</th> |
614 |
<th>Status</th> |
|
|
615 |
<th>Additional status</th> |
594 |
<th>Updated on</th> |
616 |
<th>Updated on</th> |
595 |
<th>Request number</th> |
617 |
<th>Request number</th> |
596 |
<th class="actions"></th> |
618 |
<th class="actions"></th> |
597 |
- |
|
|