Bug 20102: Remove attribute "text/css" for <style> element used in staff client templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / edifactmsgs.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Acquisitions &rsaquo; EDIFACT messages</title>
7 [% Asset.css("css/datatables.css") | $raw %]
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style>
10 #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
11 </style>
12 </head>
13
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 &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
20 &rsaquo; <a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a>
21 </div>
22
23 <div class="main container-fluid">
24     <div class="row">
25         <div class="col-sm-10 col-sm-push-2">
26             <main>
27
28
29 <h1>EDIFACT messages</h1>
30 <div id="acqui_edifactmsgs">
31
32 [% IF ( messages ) %]
33 <table id="edi_msgs">
34 <thead>
35 <tr>
36 <th>Type</th>
37 <th class="title-string">Transferred</th>
38 <th>Status</th>
39 <th>Vendor</th>
40 <th>Details</th>
41 <th>Filename</th>
42 <th>Actions</th>
43 </tr>
44 </thead>
45 <tbody>
46 [% FOREACH msg IN messages %]
47 <tr>
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>
51 <td>
52     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id | uri %]">
53         [% msg.vendor.name | html %]
54     </a>
55 </td>
56 <td>
57 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
58     [% IF msg.basketno %]
59     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno | uri %]">
60     Basket: [% msg.basketno.basketno | html %]
61     </a>
62     [% END %]
63 [% ELSE %]
64 <!-- Assuming invoices -->
65      <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | uri %]">
66       Invoices
67      </a>
68 [% END %]
69 </td>
70 <td>[% msg.filename | html %]</td>
71
72 <td class="actions">
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&amp;message_id=[% msg.id | html %]"><i class="fa fa-trash"></i> Delete</a>
75 </td>
76 </tr>
77 [% END %]
78
79 </tbody>
80 </table>
81
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">&times;</button>
88         <h3 id="EDI_modal_label">EDIFACT message</h3>
89     </div>
90     <div class="modal-body">
91         <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
92     </div>
93     <div class="modal-footer">
94         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
95     </div>
96     </div>
97     </div>
98 </div>
99
100
101 [% ELSE %]
102     <div class="dialog message">There are no EDIFACT messages.</div>
103 [% END %]
104
105 </div> <!-- /#acqui_edifactmsgs -->
106 </main>
107 </div> <!-- /.col-sm-10.col-sm-push-2 -->
108
109     <div class="col-sm-2 col-sm-pull-10">
110         <aside>
111             [% INCLUDE 'acquisitions-menu.inc' %]
112         </aside>
113     </div>
114 </div> <!-- /.row -->
115
116 [% MACRO jsinclude BLOCK %]
117     [% Asset.js("js/acquisitions-menu.js") | $raw %]
118     [% INCLUDE 'datatables.inc' %]
119     <script>
120         $(document).ready(function() {
121             $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
122                 'aaSorting': [[1, "desc" ]],
123                 'sPaginationType': "four_button",
124                 "aoColumnDefs": [
125                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
126                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
127                 ]
128             }));
129
130             var EDIModal = $("#EDI_modal");
131             var EDIModalBody = $("#EDI_modal .modal-body");
132
133             $(".view_message").on("click", function(e){
134                 e.preventDefault();
135                 var page = $(this).attr("href");
136                 EDIModalBody.load(page + " #edimsg");
137                 EDIModal.modal("show");
138             });
139             EDIModal.on("click",".closebtn",function(e){
140                 e.preventDefault();
141                 EDIModal.modal("hide");
142             });
143             EDIModal.on("hidden.bs.modal", function(){
144                 EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
145             });
146             $(".delete_msg").on("click",function(){
147                 return confirm(_("Are you sure you want to delete this message?"));
148             });
149         });
150     </script>
151 [% END %]
152
153 [% INCLUDE 'intranet-bottom.inc' %]