5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions › EDIFACT messages</title>
7 [% Asset.css("css/datatables.css") | $raw %]
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style type="text/css">
10 #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
14 <body id="acq_edifactmsgs" class="acq">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
17 <div id="breadcrumbs">
18 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19 › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
20 › <a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a>
23 <div class="main container-fluid">
25 <div class="col-sm-10 col-sm-push-2">
29 <h1>EDIFACT messages</h1>
30 <div id="acqui_edifactmsgs">
37 <th class="title-string">Transferred</th>
46 [% FOREACH msg IN messages %]
48 <td>[% msg.message_type | html %]</td>
49 <td><span title="[% msg.transfer_date | html %]">[% msg.transfer_date | $KohaDates %]</span></td>
50 <td>[% msg.status | html %]</td>
52 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id | html %]">
53 [% msg.vendor.name | html %]
57 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
59 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno | html %]">
60 Basket: [% msg.basketno.basketno | html %]
64 <!-- Assuming invoices -->
65 <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | html %]">
70 <td>[% msg.filename | html %]</td>
73 <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>
74 <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>
82 <!-- Modal to display EDIFACT messages -->
83 <div class="modal" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true">
84 <div class="modal-dialog">
85 <div class="modal-content">
86 <div class="modal-header">
87 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
88 <h3 id="EDI_modal_label">EDIFACT message</h3>
90 <div class="modal-body">
91 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
93 <div class="modal-footer">
94 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
102 <div class="dialog message">There are no EDIFACT messages.</div>
105 </div> <!-- /#acqui_edifactmsgs -->
107 </div> <!-- /.col-sm-10.col-sm-push-2 -->
109 <div class="col-sm-2 col-sm-pull-10">
111 [% INCLUDE 'acquisitions-menu.inc' %]
114 </div> <!-- /.row -->
116 [% MACRO jsinclude BLOCK %]
117 [% Asset.js("js/acquisitions-menu.js") | $raw %]
118 [% INCLUDE 'datatables.inc' %]
120 $(document).ready(function() {
121 $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
122 'aaSorting': [[1, "desc" ]],
123 'sPaginationType': "four_button",
125 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
126 { "sType": "title-string", "aTargets" : [ "title-string" ] }
130 var EDIModal = $("#EDI_modal");
131 var EDIModalBody = $("#EDI_modal .modal-body");
133 $(".view_message").on("click", function(e){
135 var page = $(this).attr("href");
136 EDIModalBody.load(page + " #edimsg");
137 EDIModal.modal("show");
139 EDIModal.on("click",".closebtn",function(e){
141 EDIModal.modal("hide");
143 EDIModal.on("hidden", function(){
144 EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
146 $(".delete_msg").on("click",function(){
147 return confirm(_("Are you sure you want to delete this message?"));
153 [% INCLUDE 'intranet-bottom.inc' %]