Lines 692-698
Link Here
|
692 |
</div> <!-- /div.row --> |
692 |
</div> <!-- /div.row --> |
693 |
|
693 |
|
694 |
[% INCLUDE 'patron-detail-tabs.inc' patronpage = "borrower" %] |
694 |
[% INCLUDE 'patron-detail-tabs.inc' patronpage = "borrower" %] |
695 |
|
|
|
696 |
</main> |
695 |
</main> |
697 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
696 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
698 |
|
697 |
|
Lines 707-712
Link Here
|
707 |
[% INCLUDE 'modals/resolve_return_claim.inc' %] |
706 |
[% INCLUDE 'modals/resolve_return_claim.inc' %] |
708 |
[% END %] |
707 |
[% END %] |
709 |
|
708 |
|
|
|
709 |
[% INCLUDE modals/cancel_booking.inc %] |
710 |
|
710 |
[% MACRO jsinclude BLOCK %] |
711 |
[% MACRO jsinclude BLOCK %] |
711 |
[% INCLUDE 'datatables.inc' %] |
712 |
[% INCLUDE 'datatables.inc' %] |
712 |
[% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] |
713 |
[% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] |
Lines 742-747
Link Here
|
742 |
[% END %] |
743 |
[% END %] |
743 |
[% Asset.js("js/holds.js") | $raw %] |
744 |
[% Asset.js("js/holds.js") | $raw %] |
744 |
[% INCLUDE 'calendar.inc' %] |
745 |
[% INCLUDE 'calendar.inc' %] |
|
|
746 |
[% Asset.js("js/bookings.js") | $raw %] |
747 |
[% Asset.js("js/cancel_booking_modal.js") | $raw %] |
745 |
[% INCLUDE 'str/members-menu.inc' %] |
748 |
[% INCLUDE 'str/members-menu.inc' %] |
746 |
[% Asset.js("js/members-menu.js") | $raw %] |
749 |
[% Asset.js("js/members-menu.js") | $raw %] |
747 |
[% Asset.js("js/recalls.js") | $raw %] |
750 |
[% Asset.js("js/recalls.js") | $raw %] |
Lines 770-776
Link Here
|
770 |
$('#guarantees_finesandcharges-tab').click(); |
773 |
$('#guarantees_finesandcharges-tab').click(); |
771 |
}); |
774 |
}); |
772 |
|
775 |
|
|
|
776 |
// Bookings |
777 |
var bookings_table; |
778 |
// Load bookings table on tab selection |
779 |
$("#bookings-tab").on( "click", function(){ |
780 |
if ( !bookings_table ) { |
781 |
var today = new Date(); |
782 |
var bookings_table_url = "/api/v1/bookings"; |
783 |
bookings_table = $('#bookings-table').kohaTable({ |
784 |
"ajax": { |
785 |
"url": bookings_table_url |
786 |
}, |
787 |
"embed": [ |
788 |
"biblio", |
789 |
"item", |
790 |
"patron" |
791 |
], |
792 |
"columns": [{ |
793 |
"data": "booking_id", |
794 |
"title": "Booking ID", |
795 |
"visible": false, |
796 |
"searchable": false, |
797 |
"orderable": false |
798 |
}, |
799 |
{ |
800 |
"data": "biblio.title", |
801 |
"title": "Title", |
802 |
"searchable": true, |
803 |
"orderable": true, |
804 |
"render": function(data,type,row,meta) { |
805 |
return row.biblio.title; |
806 |
} |
807 |
}, |
808 |
{ |
809 |
"data": "item.external_id", |
810 |
"title": "Item", |
811 |
"searchable": true, |
812 |
"orderable": true, |
813 |
"defaultContent": "Any item", |
814 |
"render": function(data,type,row,meta) { |
815 |
if ( row.item ) { |
816 |
return row.item.external_id; |
817 |
} else { |
818 |
return null; |
819 |
} |
820 |
} |
821 |
}, |
822 |
{ |
823 |
"data": "start_date", |
824 |
"title": "Start date", |
825 |
"searchable": true, |
826 |
"orderable": true, |
827 |
"render": function(data, type, row, meta) { |
828 |
return $datetime(row.start_date); |
829 |
} |
830 |
}, |
831 |
{ |
832 |
"data": "end_date", |
833 |
"title": "End date", |
834 |
"searchable": true, |
835 |
"orderable": true, |
836 |
"render": function(data, type, row, meta) { |
837 |
return $datetime(row.end_date); |
838 |
} |
839 |
}, |
840 |
{ |
841 |
"data": "", |
842 |
"title": "Actions", |
843 |
"searchable": false, |
844 |
"orderable": false, |
845 |
"render": function(data, type, row, meta) { |
846 |
var result = '<button type="button" class="btn btn-default btn-xs cancel-action" data-toggle="modal" data-target="#cancelBookingModal" data-booking="'+row.booking_id+'"><i class="fa fa-trash" aria-hidden="true"></i> '+_("Cancel")+'</button>'; |
847 |
return result; |
848 |
} |
849 |
}] |
850 |
}, [], 1, { patron_id: "[% patron.borrowernumber | html %]", end_date: { ">=": today.toISOString() } }); |
851 |
}; |
852 |
}); |
853 |
// Bookings |
854 |
|
773 |
}); |
855 |
}); |
|
|
856 |
|
774 |
function uncheck_sibling(me){ |
857 |
function uncheck_sibling(me){ |
775 |
nodename=me.getAttribute("name"); |
858 |
nodename=me.getAttribute("name"); |
776 |
if (nodename =="barcodes[]"){ |
859 |
if (nodename =="barcodes[]"){ |
777 |
- |
|
|