View | Details | Raw Unified | Return to bug 6820
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (+2 lines)
Lines 88-94 $(document).ready(function() { Link Here
88
                            (inactive)
88
                            (inactive)
89
                        [% END %]
89
                        [% END %]
90
                    [% END %]
90
                    [% END %]
91
                        [% IF ( supplier.loop_basket.size ) %]
91
                    <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a>
92
                    <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a>
93
                        [% END %]
92
                </span>
94
                </span>
93
                <div class="baskets">
95
                <div class="baskets">
94
                    [% IF ( supplier.loop_basket.size ) %]
96
                    [% IF ( supplier.loop_basket.size ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ (-1 / +184 lines)
Line 0 Link Here
0
- 
1
[% USE KohaDates %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Search for vendor [% supplier %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
<style type="text/css">
6
#vendors td{
7
	vertical-align: top;
8
}
9
</style>
10
<link rel="stylesheet" href="[% themelang %]/css/datatables.css" />
11
[% INCLUDE 'datatables.inc' %]
12
<script type="text/javascript">
13
//<![CDATA[
14
$(document).ready(function() {
15
    $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
16
        'sDom': 't',
17
        'bPaginate': false,
18
        'bFilter': false,
19
        'bInfo': false,
20
        "aaSorting": [[ 1, "asc" ]],
21
        "aoColumns": [
22
            null,null,null,null,null,null,{ "sType": "title-string" },null,{ "sType": "title-string" },null
23
        ],
24
        'aoColumnDefs': [
25
            { 'aTargets': [-1], 'bSortable': false }
26
        ]
27
    }));
28
    $("#supplierlist").change(function() {
29
        var id = $(this).find("option:selected").val();
30
        window.location.href = "#" + id;
31
    });
32
    $(".modal").on("show", function(){
33
        var basket = $(this).data("basketno");
34
        var legend = _("Add order to basket") + " " + basket;
35
        $(this).find("legend").html(legend);
36
    });
37
});
38
//]]>
39
</script>
40
41
</head>
42
<body id="acq_booksellers" class="acq">
43
[% INCLUDE 'header.inc' %]
44
[% INCLUDE 'acquisitions-search.inc' %]
45
46
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Search for vendor <em>[% supplier %]</em> </div>
47
48
<div id="doc3" class="yui-t2">
49
   
50
    <div id="bd">
51
    <div id="yui-main">
52
    <div class="yui-b">
53
    
54
[% INCLUDE 'acquisitions-toolbar.inc' %]
55
[% UNLESS ( count == 1 ) %]
56
<h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1>
57
[% END %]
58
[% IF ( loop_suppliers.size ) %]
59
    [% UNLESS (count == 1) %]
60
        <p>Choose a vendor in the list to jump directly to the right place.
61
        <select id="supplierlist">
62
            [% FOREACH supplier1 IN loop_suppliers %]
63
                <option value="[% supplier1.booksellerid %]">[% supplier1.name %]</option>
64
            [% END %]
65
        </select>
66
        </p>
67
    [% END %]
68
    [% IF ( allbaskets ) %]
69
        <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]">Show active baskets only</a></p>
70
    [% ELSE %]
71
        <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]&amp;allbaskets=1">Show all baskets</a></p>
72
    [% END %]
73
    <div id="acqui_order_supplierlist">
74
        [% FOREACH supplier IN loop_suppliers %]
75
            <div class="supplier">
76
                <span class="suppliername">
77
                    [% IF (supplier.name) %]
78
                        <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
79
                    [% ELSE %]
80
                        <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">NO NAME</a>
81
                    [% END %]
82
                </span>
83
                <span class="action">
84
                    [% IF ( CAN_user_acquisition_order_manage ) %]
85
                        [% IF ( supplier.active ) %]
86
                            <a class="btn btn-small" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid %]&amp;op=add_form"><i class="icon-plus"></i> New basket</a>
87
                        [% ELSE %]
88
                            (inactive)
89
                        [% END %]
90
                    [% END %]
91
                        [% IF ( supplier.loop_basket.size ) %]
92
                    <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a>
93
                         [% END %]
94
                </span>
95
                <div class="baskets">
96
                    [% IF ( supplier.loop_basket.size ) %]
97
                        <table class="baskets">
98
                            <thead>
99
                                <tr>
100
                                    <th>No.</th>
101
                                    <th>Name</th>
102
                                    <th>Item count</th>
103
                                    <th>Biblio count</th>
104
                                    <th>Items expected</th>
105
                                    <th>Created by</th>
106
                                    <th>Date</th>
107
                                    <th>Basket group</th>
108
                                    <th>Closed</th>
109
                                    <th>&nbsp;</th>
110
                                </tr>
111
                            </thead>
112
                            <tbody>
113
                                [% FOREACH basket IN supplier.loop_basket %]
114
                                    [% IF ( basket.uncertainprices ) %]
115
                                        <tr class="problem">
116
                                    [% ELSE %]
117
                                        <tr>
118
                                    [% END %]
119
                                        <td>[% basket.basketno %]</td>
120
                                        <td>[% basket.basketname %]</td>
121
                                        <td>[% basket.total_items %]</td>
122
                                        <td>[% basket.total_biblios %]</td>
123
                                        <td>[% basket.expected_items %]</td>
124
                                        <td>
125
                                            [% basket.authorisedby_firstname %]
126
                                            [% basket.authorisedby_surname %]
127
                                        </td>
128
                                        <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates %]</span></td>
129
                                        <td>
130
                                          [% IF basket.basketgroup %]
131
                                            [% basketgroup = basket.basketgroup %]
132
                                            [% IF basketgroup.closed %]
133
                                              [% basketgroup.name %] (closed)
134
                                            [% ELSE %]
135
                                              <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% basketgroup.name %]</a>
136
                                            [% END %]
137
                                          [% END %]
138
                                        </td>
139
                                        <td>
140
                                            [% IF ( basket.closedate ) %]
141
                                                <span title="[% basket.closedate %]">[% basket.closedate | $KohaDates %]</span>
142
                                            [% ELSE %]
143
                                                <span title="9999-99-99"></span>
144
                                            [% END %]
145
                                        </td>
146
                                        <td>
147
                                            <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
148
149
                                            [% UNLESS ( basket.closedate ) %]
150
                                               | <a id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal">Add to basket</a>
151
                                                <!-- Modal -->
152
                                                <div id="addtoBasket[% basket.basketno %]" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel[% basket.basketno %]" aria-hidden="true" data-basketno="[% basket.basketname %]">
153
                                                    <div class="modal-body">
154
                                                        [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
155
                                                    </div>
156
                                                    <div class="modal-footer">
157
                                                        <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
158
                                                    </div>
159
                                                </div>
160
                                            [% END %]
161
                                        </td>
162
                                    </tr>
163
                                [% END %][%# FOREACH basket IN supplier.loop_basket %]
164
                            </tbody>
165
                        </table>
166
167
                    [% ELSE %]
168
                        <p>No pending baskets</p>
169
                    [% END %][%# IF ( supplier.loop_basket.size ) %]
170
                </div>
171
            </div>
172
        [% END %][%# FOREACH supplier IN loop_suppliers %]
173
    </div>
174
[% END %][%# IF ( loop_suppliers.size ) %]
175
</div>
176
</div>
177
<div class="yui-b">
178
[% IF ( booksellerid ) %]
179
[% INCLUDE 'vendor-menu.inc' %]
180
[% END %]
181
[% INCLUDE 'acquisitions-menu.inc' %]
182
</div>
183
</div>
184
[% INCLUDE 'intranet-bottom.inc' %]

Return to bug 6820