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

(-)a/acqui/booksellers.pl (+11 lines)
Lines 155-165 for my $vendor (@suppliers) { Link Here
155
      };
155
      };
156
156
157
}
157
}
158
159
my $sessionID = $query->cookie('CGISESSID');
160
my $session = C4::Auth::get_session($sessionID);
161
my $view = $query->param('view');
162
if ( $view ) {
163
    $session->param('bookseller_default_view', $view);
164
} else {
165
    $view = $session->param('bookseller_default_view');
166
}
167
158
$template->param(
168
$template->param(
159
    loop_suppliers => $loop_suppliers,
169
    loop_suppliers => $loop_suppliers,
160
    supplier       => ( $booksellerid || $supplier ),
170
    supplier       => ( $booksellerid || $supplier ),
161
    count          => $supplier_count,
171
    count          => $supplier_count,
162
    has_budgets          => $has_budgets,
172
    has_budgets          => $has_budgets,
173
    view           => $view,
163
);
174
);
164
$template->{VARS}->{'allbaskets'} = $allbaskets;
175
$template->{VARS}->{'allbaskets'} = $allbaskets;
165
176
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (-104 / +134 lines)
Lines 126-249 $(document).ready(function() { Link Here
126
    </span>
126
    </span>
127
[% END %]
127
[% END %]
128
<h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1>
128
<h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1>
129
[% IF view == "complete" %]
130
    <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&view=simple">Switch to the simple view</a></p>
131
[% ELSE %]
132
    <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&view=complete">Switch to the complete view</a></p>
133
[% END %]
129
[% END %]
134
[% END %]
130
[% IF ( loop_suppliers.size ) %]
135
[% IF ( loop_suppliers.size ) %]
131
    [% IF allbaskets %]
136
    [% IF view == "complete" %]
132
        <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]">Show active baskets only</a>
137
        [% IF allbaskets %]
133
    [% ELSE %]
138
            <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]">Show active baskets only</a>
134
        <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]&amp;allbaskets=1">Show active and inactive baskets</a>
139
        [% ELSE %]
135
    [% END %]
140
            <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]&amp;allbaskets=1">Show active and inactive baskets</a>
136
     | <a href="#" id="toggle_closed_baskets">Show opened baskets only</a>
141
        [% END %]
137
    <div id="acqui_order_basketlist">
142
         | <a href="#" id="toggle_closed_baskets">Show opened baskets only</a>
138
    <table id="baskets" class="group">
143
        <div id="acqui_order_basketlist">
139
        <thead>
144
        <table id="baskets" class="group">
140
            <tr>
145
            <thead>
141
                <th class='NoVisible'>bookseller</th>
142
                <th>No.</th>
143
                <th>Name</th>
144
                <th>Item count</th>
145
                <th>Biblio count</th>
146
                <th>Items expected</th>
147
                <th>Created by</th>
148
                <th class="title-string">Date</th>
149
                <th>Basket group</th>
150
                <th class="title-string">Closed</th>
151
                <th>&nbsp;</th>
152
            </tr>
153
        </thead>
154
        <tbody>
155
        [% FOREACH supplier IN loop_suppliers %]
156
            [% IF supplier.loop_basket.size == 0 %]
157
                <tr>
146
                <tr>
158
                    <td>
147
                    <th class='NoVisible'>bookseller</th>
159
                        <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
148
                    <th>No.</th>
160
                        ([% supplier.booksellerid %])
149
                    <th>Name</th>
161
                        [% PROCESS action supplier = supplier %]
150
                    <th>Item count</th>
162
                    </td>
151
                    <th>Biblio count</th>
163
                    <td>
152
                    <th>Items expected</th>
164
                        [% IF allbaskets %]
153
                    <th>Created by</th>
165
                            No basket.
154
                    <th class="title-string">Date</th>
166
                        [% ELSE %]
155
                    <th>Basket group</th>
167
                            No active basket.
156
                    <th class="title-string">Closed</th>
168
                        [% END %]
157
                    <th>&nbsp;</th>
169
                    </td>
170
                    <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
171
                </tr>
158
                </tr>
172
            [% END %]
159
            </thead>
173
            [% FOREACH basket IN supplier.loop_basket %]
160
            <tbody>
174
                [% IF ( basket.uncertainprices ) %]
161
            [% FOREACH supplier IN loop_suppliers %]
175
                    <tr class="problem">
162
                [% IF supplier.loop_basket.size == 0 %]
176
                [% ELSE %]
177
                    <tr>
163
                    <tr>
164
                        <td>
165
                            <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
166
                            ([% supplier.booksellerid %])
167
                            [% PROCESS action supplier = supplier %]
168
                        </td>
169
                        <td>
170
                            [% IF allbaskets %]
171
                                No basket.
172
                            [% ELSE %]
173
                                No active basket.
174
                            [% END %]
175
                        </td>
176
                        <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
177
                    </tr>
178
                [% END %]
178
                [% END %]
179
                    <td>
179
                [% FOREACH basket IN supplier.loop_basket %]
180
                        <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
180
                    [% IF ( basket.uncertainprices ) %]
181
                        ([% supplier.booksellerid %])
181
                        <tr class="problem">
182
                        [% PROCESS action supplier = supplier %]
182
                    [% ELSE %]
183
                    </td>
183
                        <tr>
184
                    <td>[% basket.basketno %]</td>
184
                    [% END %]
185
                    <td>[% basket.basketname %]</td>
185
                        <td>
186
                    <td>
186
                            <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
187
                        [% basket.total_items %]
187
                            ([% supplier.booksellerid %])
188
                        [% IF basket.total_items_cancelled %]
188
                            [% PROCESS action supplier = supplier %]
189
                            ([% basket.total_items_cancelled %] cancelled)
189
                        </td>
190
                        [% END %]
190
                        <td>[% basket.basketno %]</td>
191
                    </td>
191
                        <td>[% basket.basketname %]</td>
192
                    <td>
192
                        <td>
193
                        [% basket.total_biblios %]
193
                            [% basket.total_items %]
194
                        [% IF basket.total_biblios_cancelled %]
194
                            [% IF basket.total_items_cancelled %]
195
                            ([% basket.total_biblios_cancelled %] cancelled)
195
                                ([% basket.total_items_cancelled %] cancelled)
196
                        [% END %]
196
                            [% END %]
197
                    </td>
197
                        </td>
198
                    <td>[% basket.expected_items %]</td>
198
                        <td>
199
                    <td>
199
                            [% basket.total_biblios %]
200
                        [% basket.authorisedby_firstname %] [% basket.authorisedby_surname %]
200
                            [% IF basket.total_biblios_cancelled %]
201
                    </td>
201
                                ([% basket.total_biblios_cancelled %] cancelled)
202
                    <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates %]</span></td>
202
                            [% END %]
203
                    <td>
203
                        </td>
204
                      [% IF basket.basketgroup %]
204
                        <td>[% basket.expected_items %]</td>
205
                        [% basketgroup = basket.basketgroup %]
205
                        <td>
206
                        [% IF basketgroup.closed %]
206
                            [% basket.authorisedby_firstname %] [% basket.authorisedby_surname %]
207
                          [% basketgroup.name %] (closed)
207
                        </td>
208
                        [% ELSE %]
208
                        <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates %]</span></td>
209
                          <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basket.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]">[% basketgroup.name %]</a>
209
                        <td>
210
                        [% END %]
210
                          [% IF basket.basketgroup %]
211
                      [% END %]
211
                            [% basketgroup = basket.basketgroup %]
212
                    </td>
212
                            [% IF basketgroup.closed %]
213
                    <td>
213
                              [% basketgroup.name %] (closed)
214
                        [% IF ( basket.closedate ) %]
214
                            [% ELSE %]
215
                            <span title="[% basket.closedate %]">[% basket.closedate | $KohaDates %]</span>
215
                              <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basket.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]">[% basketgroup.name %]</a>
216
                        [% ELSE %]
216
                            [% END %]
217
                            <span title="9999-99-99"></span>
217
                          [% END %]
218
                        [% END %]
218
                        </td>
219
                    </td>
219
                        <td>
220
                    <td>
220
                            [% IF ( basket.closedate ) %]
221
                        <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
221
                                <span title="[% basket.closedate %]">[% basket.closedate | $KohaDates %]</span>
222
                            [% ELSE %]
223
                                <span title="9999-99-99"></span>
224
                            [% END %]
225
                        </td>
226
                        <td>
227
                            <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
222
228
223
                        [% UNLESS ( basket.closedate ) %]
229
                            [% UNLESS ( basket.closedate ) %]
224
                           | <a id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal">Add to basket</a>
230
                               | <a id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal">Add to basket</a>
225
                            <!-- Modal -->
231
                                <!-- Modal -->
226
                            <div id="addtoBasket[% basket.basketno %]" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel[% basket.basketno %]" aria-hidden="true" data-basketno="[% basket.basketname %]">
232
                                <div id="addtoBasket[% basket.basketno %]" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel[% basket.basketno %]" aria-hidden="true" data-basketno="[% basket.basketname %]">
227
                                <div class="modal-body">
233
                                    <div class="modal-body">
228
                                    [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
234
                                        [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
229
                                </div>
235
                                    </div>
230
                                <div class="modal-footer">
236
                                    <div class="modal-footer">
231
                                    <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
237
                                        <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
238
                                    </div>
232
                                </div>
239
                                </div>
233
                            </div>
240
                            [% END %]
241
                        </td>
242
                    </tr>
243
                [% END %][%# FOREACH basket IN supplier.loop_basket %]
244
                [% END %]
245
            </tbody>
246
        </table>
247
        </div>
248
    [% ELSE %]
249
        <div id="acqui_order_supplierlist">
250
            [% FOREACH supplier IN loop_suppliers %]
251
                <div class="supplier">
252
                    <span class="suppliername">
253
                        [% IF (supplier.name) %]
254
                            <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
255
                        [% ELSE %]
256
                            <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">NO NAME</a>
234
                        [% END %]
257
                        [% END %]
235
                    </td>
258
                    </span>
236
                </tr>
259
                    <span class="action">
237
            [% END %][%# FOREACH basket IN supplier.loop_basket %]
260
                        [% IF ( CAN_user_acquisition_order_manage ) %]
261
                            [% IF ( supplier.active ) %]
262
                                <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>
263
                            [% ELSE %]
264
                                (inactive)
265
                            [% END %]
266
                        [% END %]
267
                        <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a>
268
                    </span>
269
                </div>
238
            [% END %]
270
            [% END %]
239
        </tbody>
271
        </div>
240
    </table>
272
    [% END %]
241
[% ELSE %]
273
[% ELSE %]
242
    <p>No pending baskets</p>
274
    <p>No pending baskets</p>
243
[% END %][%# IF ( loop_suppliers.size ) %]
275
[% END %][%# IF ( loop_suppliers.size ) %]
244
</div>
276
</div>
245
</div>
277
</div>
246
</div>
247
<div class="yui-b">
278
<div class="yui-b">
248
[% IF ( booksellerid ) %]
279
[% IF ( booksellerid ) %]
249
[% INCLUDE 'vendor-menu.inc' %]
280
[% INCLUDE 'vendor-menu.inc' %]
250
- 

Return to bug 13371