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