5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>EDIFACT messages › Acquisitions › Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
9 #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
13 <body id="acq_edifactmsgs" class="acq">
14 [% WRAPPER 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
18 [% WRAPPER 'sub-header.inc' %]
19 [% WRAPPER breadcrumbs %]
20 [% WRAPPER breadcrumb_item %]
21 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
23 [% WRAPPER breadcrumb_item bc_active= 1 %]
24 <span>EDIFACT messages</span>
26 [% END #/ WRAPPER breadcrumbs %]
27 [% END #/ WRAPPER sub-header.inc %]
29 <div class="main container-fluid">
31 <div class="col-sm-10 col-sm-push-2">
35 <h1>EDIFACT messages</h1>
36 <div id="acqui_edifactmsgs" class="page-section">
48 <th class="noExport">Actions</th>
52 [% FOREACH msg IN messages %]
54 <td>[% msg.message_type | html %]</td>
55 <td data-order="[% msg.transfer_date | html %]">[% msg.transfer_date | $KohaDates %]</td>
56 <td>[% msg.status | html %]</td>
58 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id | uri %]">
59 [% msg.vendor.name | html %]
63 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
65 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno | uri %]">
66 Basket: [% msg.basketno.basketno | html %]
70 <!-- Assuming invoices -->
71 <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | uri %]&op=do_search">
76 <td>[% msg.filename | html %]</td>
79 <a class="btn btn-default btn-xs view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id=[% msg.id | html %]"><i class="fa fa-search"></i> View message</a>
80 <a class="btn btn-default btn-xs delete_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=delete&message_id=[% msg.id | html %]"><i class="fa fa-trash-can"></i> Delete</a>
81 [% IF msg.status == 'new' %]
82 <a class="btn btn-default btn-xs import_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=import&message_id=[% msg.id | html %]"><i class="fa fa-cog"></i> Import</a>
91 <!-- Modal to display EDIFACT messages -->
92 <div class="modal" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true">
93 <div class="modal-dialog">
94 <div class="modal-content">
95 <div class="modal-header">
96 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
97 <h3 id="EDI_modal_label">EDIFACT message</h3>
99 <div class="modal-body">
100 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
102 <div class="modal-footer">
103 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
111 <div class="dialog message">There are no EDIFACT messages.</div>
114 </div> <!-- /#acqui_edifactmsgs -->
116 </div> <!-- /.col-sm-10.col-sm-push-2 -->
118 <div class="col-sm-2 col-sm-pull-10">
120 [% INCLUDE 'acquisitions-menu.inc' %]
123 </div> <!-- /.row -->
125 [% MACRO jsinclude BLOCK %]
126 [% Asset.js("js/acquisitions-menu.js") | $raw %]
127 [% INCLUDE 'datatables.inc' %]
129 $(document).ready(function() {
130 $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
131 'aaSorting': [[1, "desc" ]],
132 'sPaginationType': "full",
134 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
138 var EDIModal = $("#EDI_modal");
139 var EDIModalBody = $("#EDI_modal .modal-body");
141 $(".view_message").on("click", function(e){
143 var page = $(this).attr("href");
144 EDIModalBody.load(page + " #edimsg");
145 EDIModal.modal("show");
147 EDIModal.on("click",".closebtn",function(e){
149 EDIModal.modal("hide");
151 EDIModal.on("hidden.bs.modal", function(){
152 EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
154 $(".delete_msg").on("click",function(){
155 return confirm(_("Are you sure you want to delete this message?"));
161 [% INCLUDE 'intranet-bottom.inc' %]