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