5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions › EDIFACT messages</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 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
16 <div id="breadcrumbs">
17 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18 › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
19 › <a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a>
22 <div class="main container-fluid">
24 <div class="col-sm-10 col-sm-push-2">
28 <h1>EDIFACT messages</h1>
29 <div id="acqui_edifactmsgs">
36 <th class="title-string">Transferred</th>
45 [% FOREACH msg IN messages %]
47 <td>[% msg.message_type | html %]</td>
48 <td><span title="[% msg.transfer_date | html %]">[% msg.transfer_date | $KohaDates %]</span></td>
49 <td>[% msg.status | html %]</td>
51 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id | uri %]">
52 [% msg.vendor.name | html %]
56 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
58 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno | uri %]">
59 Basket: [% msg.basketno.basketno | html %]
63 <!-- Assuming invoices -->
64 <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | uri %]&op=do_search">
69 <td>[% msg.filename | html %]</td>
72 <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>
73 <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>
74 [% IF msg.status == 'new' %]
75 <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>
84 <!-- Modal to display EDIFACT messages -->
85 <div class="modal" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true">
86 <div class="modal-dialog">
87 <div class="modal-content">
88 <div class="modal-header">
89 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
90 <h3 id="EDI_modal_label">EDIFACT message</h3>
92 <div class="modal-body">
93 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
95 <div class="modal-footer">
96 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
104 <div class="dialog message">There are no EDIFACT messages.</div>
107 </div> <!-- /#acqui_edifactmsgs -->
109 </div> <!-- /.col-sm-10.col-sm-push-2 -->
111 <div class="col-sm-2 col-sm-pull-10">
113 [% INCLUDE 'acquisitions-menu.inc' %]
116 </div> <!-- /.row -->
118 [% MACRO jsinclude BLOCK %]
119 [% Asset.js("js/acquisitions-menu.js") | $raw %]
120 [% INCLUDE 'datatables.inc' %]
122 $(document).ready(function() {
123 $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
124 'aaSorting': [[1, "desc" ]],
125 'sPaginationType': "full",
127 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
128 { "sType": "title-string", "aTargets" : [ "title-string" ] }
132 var EDIModal = $("#EDI_modal");
133 var EDIModalBody = $("#EDI_modal .modal-body");
135 $(".view_message").on("click", function(e){
137 var page = $(this).attr("href");
138 EDIModalBody.load(page + " #edimsg");
139 EDIModal.modal("show");
141 EDIModal.on("click",".closebtn",function(e){
143 EDIModal.modal("hide");
145 EDIModal.on("hidden.bs.modal", function(){
146 EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
148 $(".delete_msg").on("click",function(){
149 return confirm(_("Are you sure you want to delete this message?"));
155 [% INCLUDE 'intranet-bottom.inc' %]