Bug 7317: Interlibrary loans framework for Koha.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / edifactmsgs.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; EDIFACT messages</title>
4 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript">
8 $(document).ready(function() {
9     $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, {
10         'aaSorting': [[1, "desc" ]],
11         'sPaginationType': "four_button",
12         "aoColumnDefs": [
13             { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
14             { "sType": "title-string", "aTargets" : [ "title-string" ] }
15         ]
16     }));
17
18     var EDIModal = $("#EDI_modal");
19     var EDIModalBody = $("#EDI_modal .modal-body");
20
21     $(".view_message").on("click", function(e){
22         e.preventDefault();
23         var page = $(this).attr("href");
24         EDIModalBody.load(page + " #edimsg");
25         EDIModal.modal("show");
26     });
27     EDIModal.on("click",".closebtn",function(e){
28         e.preventDefault();
29         EDIModal.modal("hide");
30     });
31     EDIModal.on("hidden", function(){
32         EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
33     });
34     $(".delete_msg").on("click",function(){
35         return confirm(_("Are you sure you want to delete this message?"));
36     });
37 });
38 </script>
39 <style type="text/css">
40 #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } }
41 </style>
42 </head>
43 <body id="acq_edifactmsgs" class="acq">
44 [% INCLUDE 'header.inc' %]
45 [% INCLUDE 'acquisitions-search.inc' %]
46 <div id="breadcrumbs">
47 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
48 &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
49 &rsaquo; <a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a>
50 </div>
51
52 <div id="doc3" class="yui-t2">
53
54 <div id="bd">
55     <div id="yui-main">
56     <div class="yui-b">
57
58
59 <h1>EDIFACT messages</h1>
60 <div id="acqui_edifactmsgs">
61
62 [% IF ( messages ) %]
63 <table id="edi_msgs">
64 <thead>
65 <tr>
66 <th>Type</th>
67 <th class="title-string">Transferred</th>
68 <th>Status</th>
69 <th>Vendor</th>
70 <th>Details</th>
71 <th>Filename</th>
72 <th>Actions</th>
73 </tr>
74 </thead>
75 <tbody>
76 [% FOREACH msg IN messages %]
77 <tr>
78 <td>[% msg.message_type %]</td>
79 <td><span title="[% msg.transfer_date %]">[% msg.transfer_date | $KohaDates %]</span></td>
80 <td>[% msg.status %]</td>
81 <td>
82     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% msg.vendor_id %]">
83         [% msg.vendor.name %]
84     </a>
85 </td>
86 <td>
87 [% IF msg.message_type == 'QUOTE' || msg.message_type == 'ORDERS' %]
88     [% IF msg.basketno %]
89     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% msg.basketno.basketno %]">
90     Basket: [% msg.basketno.basketno %]
91     </a>
92     [% END %]
93 [% ELSE %]
94 <!-- Assuming invoices -->
95      <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id %]">
96       Invoices
97      </a>
98 [% END %]
99 </td>
100 <td>[% msg.filename %]</td>
101
102 <td class="actions">
103     <a class="btn btn-default btn-xs view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id=[% msg.id %]"><i class="fa fa-search"></i> View message</a>
104     <a class="btn btn-default btn-xs delete_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=delete&amp;message_id=[% msg.id %]"><i class="fa fa-trash"></i> Delete</a>
105 </td>
106 </tr>
107 [% END %]
108
109 </tbody>
110 </table>
111
112 <!-- Modal to display EDIFACT messages -->
113 <div class="modal" id="EDI_modal" tabindex="-1" role="dialog" aria-labelledby="EDI_modal_label" aria-hidden="true">
114     <div class="modal-dialog">
115     <div class="modal-content">
116     <div class="modal-header">
117         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">&times;</button>
118         <h3 id="EDI_modal_label">EDIFACT message</h3>
119     </div>
120     <div class="modal-body">
121         <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
122     </div>
123     <div class="modal-footer">
124         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
125     </div>
126     </div>
127     </div>
128 </div>
129
130
131 [% ELSE %]
132     <div class="dialog message">There are no EDIFACT messages.</div>
133 [% END %]
134
135 </div>
136 </div>
137 </div>
138 <div class="yui-b">
139 [% INCLUDE 'acquisitions-menu.inc' %]
140 </div>
141 </div>
142 [% INCLUDE 'intranet-bottom.inc' %]