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' %]
17 [% WRAPPER 'sub-header.inc' %]
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
21 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
27 <a href="#" aria-current="page">EDIFACT messages</a>
33 <div class="main container-fluid">
35 <div class="col-sm-10 col-sm-push-2">
39 <h1>EDIFACT messages</h1>
40 <div id="acqui_edifactmsgs">
52 <th class="noExport">Actions</th>
56 [% FOREACH msg IN messages %]
58 <td>[% msg.message_type | html %]</td>
59 <td data-order="[% msg.transfer_date | html %]">[% msg.transfer_date | $KohaDates %]</td>
60 <td>[% msg.status | html %]</td>
62 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id | uri %]">
63 [% msg.vendor.name | html %]
67 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
69 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno | uri %]">
70 Basket: [% msg.basketno.basketno | html %]
74 <!-- Assuming invoices -->
75 <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | uri %]&op=do_search">
80 <td>[% msg.filename | html %]</td>
83 <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>
84 <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"></i> Delete</a>
85 [% IF msg.status == 'new' %]
86 <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>
95 <!-- Modal to display EDIFACT messages -->
96 <div class="modal" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true">
97 <div class="modal-dialog">
98 <div class="modal-content">
99 <div class="modal-header">
100 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
101 <h3 id="EDI_modal_label">EDIFACT message</h3>
103 <div class="modal-body">
104 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
106 <div class="modal-footer">
107 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
115 <div class="dialog message">There are no EDIFACT messages.</div>
118 </div> <!-- /#acqui_edifactmsgs -->
120 </div> <!-- /.col-sm-10.col-sm-push-2 -->
122 <div class="col-sm-2 col-sm-pull-10">
124 [% INCLUDE 'acquisitions-menu.inc' %]
127 </div> <!-- /.row -->
129 [% MACRO jsinclude BLOCK %]
130 [% Asset.js("js/acquisitions-menu.js") | $raw %]
131 [% INCLUDE 'datatables.inc' %]
133 $(document).ready(function() {
134 $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
135 'aaSorting': [[1, "desc" ]],
136 'sPaginationType': "full",
138 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
142 var EDIModal = $("#EDI_modal");
143 var EDIModalBody = $("#EDI_modal .modal-body");
145 $(".view_message").on("click", function(e){
147 var page = $(this).attr("href");
148 EDIModalBody.load(page + " #edimsg");
149 EDIModal.modal("show");
151 EDIModal.on("click",".closebtn",function(e){
153 EDIModal.modal("hide");
155 EDIModal.on("hidden.bs.modal", function(){
156 EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
158 $(".delete_msg").on("click",function(){
159 return confirm(_("Are you sure you want to delete this message?"));
165 [% INCLUDE 'intranet-bottom.inc' %]