4 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% FILTER collapse %]
8 [% t("EDIFACT messages") | html %] ›
9 [% t("Acquisitions") | html %] ›
10 [% t("Koha") | html %]
12 [% INCLUDE 'doc-head-close.inc' %]
14 #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
18 <body id="acq_edifactmsgs" class="acq">
19 [% WRAPPER 'header.inc' %]
20 [% INCLUDE 'acquisitions-search.inc' %]
23 [% WRAPPER 'sub-header.inc' %]
24 [% WRAPPER breadcrumbs %]
25 [% WRAPPER breadcrumb_item %]
26 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
28 [% WRAPPER breadcrumb_item bc_active= 1 %]
29 <span>EDIFACT messages</span>
31 [% END #/ WRAPPER breadcrumbs %]
32 [% END #/ WRAPPER sub-header.inc %]
34 <div class="main container-fluid">
36 <div class="col-sm-10 col-sm-push-2">
40 <h1>EDIFACT messages</h1>
41 <div id="acqui_edifactmsgs" class="page-section">
53 <th class="noExport">Actions</th>
57 [% FOREACH msg IN messages %]
59 <td>[% msg.message_type | html %]</td>
60 <td data-order="[% msg.transfer_date | html %]">[% msg.transfer_date | $KohaDates %]</td>
61 <td>[% msg.status | html %]</td>
63 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id | uri %]">
64 [% msg.vendor.name | html %]
68 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
70 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno | uri %]">
71 Basket: [% msg.basketno.basketno | html %]
75 <!-- Assuming invoices -->
76 <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | uri %]&op=do_search">
81 <td>[% msg.filename | html %]</td>
84 <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>
85 <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>
86 [% IF msg.status == 'new' %]
87 <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>
96 <!-- Modal to display EDIFACT messages -->
97 <div class="modal" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true">
98 <div class="modal-dialog">
99 <div class="modal-content">
100 <div class="modal-header">
101 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
102 <h3 id="EDI_modal_label">EDIFACT message</h3>
104 <div class="modal-body">
105 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
107 <div class="modal-footer">
108 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
116 <div class="dialog message">There are no EDIFACT messages.</div>
119 </div> <!-- /#acqui_edifactmsgs -->
121 </div> <!-- /.col-sm-10.col-sm-push-2 -->
123 <div class="col-sm-2 col-sm-pull-10">
125 [% INCLUDE 'acquisitions-menu.inc' %]
128 </div> <!-- /.row -->
130 [% MACRO jsinclude BLOCK %]
131 [% Asset.js("js/acquisitions-menu.js") | $raw %]
132 [% INCLUDE 'datatables.inc' %]
134 $(document).ready(function() {
135 $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
136 'aaSorting': [[1, "desc" ]],
137 'sPaginationType': "full",
139 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
143 var EDIModal = $("#EDI_modal");
144 var EDIModalBody = $("#EDI_modal .modal-body");
146 $(".view_message").on("click", function(e){
148 var page = $(this).attr("href");
149 EDIModalBody.load(page + " #edimsg");
150 EDIModal.modal("show");
152 EDIModal.on("click",".closebtn",function(e){
154 EDIModal.modal("hide");
156 EDIModal.on("hidden.bs.modal", function(){
157 EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
159 $(".delete_msg").on("click",function(){
160 return confirm(_("Are you sure you want to delete this message?"));
166 [% INCLUDE 'intranet-bottom.inc' %]