|
Lines 1-5
Link Here
|
|
|
1 |
[% USE KohaDates %] |
| 1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
[% INCLUDE 'doc-head-open.inc' %] |
| 2 |
<title>Koha › Acquisitions</title> |
3 |
<title>Koha › Acquisitions › EDIFACT messages</title> |
| 3 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
4 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
| 4 |
[% INCLUDE 'doc-head-close.inc' %] |
5 |
[% INCLUDE 'doc-head-close.inc' %] |
| 5 |
[% INCLUDE 'datatables.inc' %] |
6 |
[% INCLUDE 'datatables.inc' %] |
|
Lines 7-17
Link Here
|
| 7 |
$(document).ready(function() { |
8 |
$(document).ready(function() { |
| 8 |
$('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, { |
9 |
$('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 9 |
'aaSorting': [[1, "desc" ]], |
10 |
'aaSorting': [[1, "desc" ]], |
| 10 |
'sPaginationType': "four_button" |
11 |
'sPaginationType': "four_button", |
| 11 |
})); |
12 |
"aoColumnDefs": [ |
|
|
13 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
| 14 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] } |
| 15 |
] |
| 16 |
})); |
| 17 |
|
| 18 |
var EDIModal = $("#EDI_modal"); |
| 19 |
var EDIModalBody = $("#EDI_modal .modal-body"); |
| 20 |
|
| 21 |
$(".view_message").on("click", function(e){ |
| 22 |
e.preventDefault(); |
| 23 |
var page = $(this).attr("href"); |
| 24 |
EDIModalBody.load(page + " #edimsg"); |
| 25 |
EDIModal.modal("show"); |
| 26 |
}); |
| 27 |
EDIModal.on("click",".closebtn",function(e){ |
| 28 |
e.preventDefault(); |
| 29 |
EDIModal.modal("hide"); |
| 30 |
}); |
| 31 |
EDIModal.on("hidden", function(){ |
| 32 |
EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
| 33 |
}); |
| 34 |
$(".delete_msg").on("click",function(){ |
| 35 |
return confirm(_("Are you sure you want to delete this message?")); |
| 36 |
}); |
| 12 |
}); |
37 |
}); |
| 13 |
</script> |
38 |
</script> |
| 14 |
|
39 |
<style type="text/css"> |
|
|
40 |
#EDI_modal { width : 80%; margin-left : -40%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } } |
| 41 |
</style> |
| 15 |
</head> |
42 |
</head> |
| 16 |
<body id="acq_edifactmsgs" class="acq"> |
43 |
<body id="acq_edifactmsgs" class="acq"> |
| 17 |
[% INCLUDE 'header.inc' %] |
44 |
[% INCLUDE 'header.inc' %] |
|
Lines 32-58
$(document).ready(function() {
Link Here
|
| 32 |
<h1>EDIFACT messages</h1> |
59 |
<h1>EDIFACT messages</h1> |
| 33 |
<div id="acqui_edifactmsgs"> |
60 |
<div id="acqui_edifactmsgs"> |
| 34 |
|
61 |
|
| 35 |
|
62 |
[% IF ( messages ) %] |
| 36 |
<table id="edi_msgs"> |
63 |
<table id="edi_msgs"> |
| 37 |
<thead> |
64 |
<thead> |
|
|
65 |
<tr> |
| 38 |
<th>Type</th> |
66 |
<th>Type</th> |
| 39 |
<th>Transferred</th> |
67 |
<th class="title-string">Transferred</th> |
| 40 |
<th>Status</th> |
68 |
<th>Status</th> |
| 41 |
<th>Vendor</th> |
69 |
<th>Vendor</th> |
| 42 |
<th>Details</th> |
70 |
<th>Details</th> |
| 43 |
<th>Filename</th> |
71 |
<th>Filename</th> |
| 44 |
<th> </th> |
72 |
<th>Actions</th> |
| 45 |
<th>Action</th> |
73 |
</tr> |
| 46 |
</thead> |
74 |
</thead> |
| 47 |
<tbody> |
75 |
<tbody> |
| 48 |
[% FOREACH msg IN messages %] |
76 |
[% FOREACH msg IN messages %] |
| 49 |
<tr> |
77 |
<tr> |
| 50 |
<td>[% msg.message_type %]</td> |
78 |
<td>[% msg.message_type %]</td> |
| 51 |
<td>[% msg.transfer_date %]</td> |
79 |
<td><span title="[% msg.transfer_date %]">[% msg.transfer_date | $KohaDates %]</span></td> |
| 52 |
<td>[% msg.status %]</td> |
80 |
<td>[% msg.status %]</td> |
| 53 |
<td> |
81 |
<td> |
| 54 |
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id %]"</a> |
82 |
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id %]"> |
| 55 |
[% msg.vendor.name %] |
83 |
[% msg.vendor.name %] |
|
|
84 |
</a> |
| 56 |
</td> |
85 |
</td> |
| 57 |
<td> |
86 |
<td> |
| 58 |
[% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %] |
87 |
[% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %] |
|
Lines 68-78
$(document).ready(function() {
Link Here
|
| 68 |
</a> |
97 |
</a> |
| 69 |
[% END %] |
98 |
[% END %] |
| 70 |
</td> |
99 |
</td> |
| 71 |
</td> |
|
|
| 72 |
<td>[% msg.filename %]</td> |
100 |
<td>[% msg.filename %]</td> |
| 73 |
<td><a class="popup" target="_blank" title="View Message" href="/cgi-bin/koha/acqui/edimsg.pl?id=[% msg.id %]"</a>View message</td> |
101 |
|
| 74 |
<td> |
102 |
<td class="actions"> |
| 75 |
<a href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=delete&message_id=[% msg.id %]">Delete</a> |
103 |
<a class="btn btn-mini view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id=[% msg.id %]"><i class="fa fa-search"></i> View message</a> |
|
|
104 |
<a class="btn btn-mini delete_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=delete&message_id=[% msg.id %]"><i class="fa fa-trash"></i> Delete</a> |
| 76 |
</td> |
105 |
</td> |
| 77 |
</tr> |
106 |
</tr> |
| 78 |
[% END %] |
107 |
[% END %] |
|
Lines 80-85
$(document).ready(function() {
Link Here
|
| 80 |
</tbody> |
109 |
</tbody> |
| 81 |
</table> |
110 |
</table> |
| 82 |
|
111 |
|
|
|
112 |
<!-- Modal to display EDIFACT messages --> |
| 113 |
<div class="modal hide" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true"> |
| 114 |
<div class="modal-header"> |
| 115 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 116 |
<h3 id="EDI_modal_label">EDIFACT message</h3> |
| 117 |
</div> |
| 118 |
<div class="modal-body"> |
| 119 |
<div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div> |
| 120 |
</div> |
| 121 |
<div class="modal-footer"> |
| 122 |
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> |
| 123 |
</div> |
| 124 |
</div> |
| 125 |
|
| 126 |
|
| 127 |
[% ELSE %] |
| 128 |
<div class="dialog message">There are no EDIFACT messages.</div> |
| 129 |
[% END %] |
| 130 |
|
| 83 |
</div> |
131 |
</div> |
| 84 |
</div> |
132 |
</div> |
| 85 |
</div> |
133 |
</div> |