Lines 353-358
Link Here
|
353 |
[% request.statusalias.lib | html %] |
353 |
[% request.statusalias.lib | html %] |
354 |
[% ELSE %] |
354 |
[% ELSE %] |
355 |
[% request.capabilities.$req_status.name | html%] |
355 |
[% request.capabilities.$req_status.name | html%] |
|
|
356 |
[% IF request.requested_partners.length > 0 %] |
357 |
([% request.requested_partners | html %]) |
358 |
[% END %] |
356 |
[% END %] |
359 |
[% END %] |
357 |
</div> |
360 |
</div> |
358 |
<div class="updated"> |
361 |
<div class="updated"> |
Lines 580-586
Link Here
|
580 |
var uniques = {}; |
583 |
var uniques = {}; |
581 |
tableData.forEach(function(row) { |
584 |
tableData.forEach(function(row) { |
582 |
var resolvedName = getStatusName( |
585 |
var resolvedName = getStatusName( |
583 |
oData[0].capabilities[row.status].name |
586 |
oData[0].capabilities[row.status].name, |
|
|
587 |
row |
584 |
); |
588 |
); |
585 |
uniques[resolvedName] = 1 |
589 |
uniques[resolvedName] = 1 |
586 |
}); |
590 |
}); |
Lines 761-781
Link Here
|
761 |
var status_name = meta.settings.oInit.originalData[0].capabilities[ |
765 |
var status_name = meta.settings.oInit.originalData[0].capabilities[ |
762 |
row.status |
766 |
row.status |
763 |
].name; |
767 |
].name; |
764 |
return getStatusName(status_name); |
768 |
return getStatusName(status_name, row); |
765 |
} else { |
769 |
} else { |
766 |
return ''; |
770 |
return ''; |
767 |
} |
771 |
} |
768 |
} |
772 |
} |
769 |
}; |
773 |
}; |
770 |
|
774 |
|
771 |
var getStatusName = function(origName) { |
775 |
var getStatusName = function(origName, row) { |
772 |
switch( origName ) { |
776 |
switch( origName ) { |
773 |
case "New request": |
777 |
case "New request": |
774 |
return _("New request"); |
778 |
return _("New request"); |
775 |
case "Requested": |
779 |
case "Requested": |
776 |
return _("Requested"); |
780 |
return _("Requested"); |
777 |
case "Requested from partners": |
781 |
case "Requested from partners": |
778 |
return _("Requested from partners"); |
782 |
var statStr = _("Requested from partners"); |
|
|
783 |
if ( |
784 |
row.hasOwnProperty('requested_partners') && |
785 |
row.requested_partners && |
786 |
row.requested_partners.length > 0 |
787 |
) { |
788 |
statStr += ' (' + row.requested_partners + ')'; |
789 |
} |
790 |
return statStr; |
779 |
case "Request reverted": |
791 |
case "Request reverted": |
780 |
return _("Request reverted"); |
792 |
return _("Request reverted"); |
781 |
case "Queued request": |
793 |
case "Queued request": |
Lines 873-879
Link Here
|
873 |
// Get our data from the API and process it prior to passing |
885 |
// Get our data from the API and process it prior to passing |
874 |
// it to datatables |
886 |
// it to datatables |
875 |
var ajax = $.ajax( |
887 |
var ajax = $.ajax( |
876 |
'/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments,status_alias' |
888 |
'/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments,status_alias,requested_partners' |
877 |
).done(function() { |
889 |
).done(function() { |
878 |
var data = JSON.parse(ajax.responseText); |
890 |
var data = JSON.parse(ajax.responseText); |
879 |
// Make a copy, we'll be removing columns next and need |
891 |
// Make a copy, we'll be removing columns next and need |
880 |
- |
|
|