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

(-)a/acqui/basket.pl (-41 lines)
Lines 150-196 if ( $op eq 'delete_confirm' ) { Link Here
150
    $template->param( delete_confirmed => 1 );
150
    $template->param( delete_confirmed => 1 );
151
} elsif ( !$bookseller ) {
151
} elsif ( !$bookseller ) {
152
    $template->param( NO_BOOKSELLER => 1 );
152
    $template->param( NO_BOOKSELLER => 1 );
153
} elsif ( $op eq 'del_basket') {
154
    $template->param( delete_confirm => 1 );
155
    if ( C4::Context->preference("IndependentBranches") ) {
156
        my $userenv = C4::Context->userenv;
157
        unless ( C4::Context->IsSuperLibrarian() ) {
158
            my $validtest = ( $basket->{creationdate} eq '' )
159
              || ( $userenv->{branch} eq $basket->{branch} )
160
              || ( $userenv->{branch} eq '' )
161
              || ( $basket->{branch}  eq '' );
162
            unless ($validtest) {
163
                print $query->redirect("../mainpage.pl");
164
                exit 1;
165
            }
166
        }
167
    }
168
    $basket->{creationdate} = ""            unless ( $basket->{creationdate} );
169
    $basket->{authorisedby} = $loggedinuser unless ( $basket->{authorisedby} );
170
    my $contract = GetContract({
171
        contractnumber => $basket->{contractnumber}
172
    });
173
    $template->param(
174
        basketno             => $basketno,
175
        basketname           => $basket->{'basketname'},
176
        basketnote           => $basket->{note},
177
        basketbooksellernote => $basket->{booksellernote},
178
        basketcontractno     => $basket->{contractnumber},
179
        basketcontractname   => $contract->{contractname},
180
        creationdate         => $basket->{creationdate},
181
        authorisedby         => $basket->{authorisedby},
182
        authorisedbyname     => $basket->{authorisedbyname},
183
        closedate            => $basket->{closedate},
184
        deliveryplace        => $basket->{deliveryplace},
185
        billingplace         => $basket->{billingplace},
186
        active               => $bookseller->{'active'},
187
        booksellerid         => $bookseller->{'id'},
188
        name                 => $bookseller->{'name'},
189
        address1             => $bookseller->{'address1'},
190
        address2             => $bookseller->{'address2'},
191
        address3             => $bookseller->{'address3'},
192
        address4             => $bookseller->{'address4'},
193
      );
194
} elsif ($op eq 'export') {
153
} elsif ($op eq 'export') {
195
    print $query->header(
154
    print $query->header(
196
        -type       => 'text/csv',
155
        -type       => 'text/csv',
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-20 / +4 lines)
Lines 3-9 Link Here
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
4
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
6
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
7
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'datatables.inc' %]
9
[% INCLUDE 'datatables.inc' %]
Lines 145-151 Link Here
145
[% INCLUDE 'acquisitions-search.inc' %]
145
[% INCLUDE 'acquisitions-search.inc' %]
146
146
147
147
148
<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; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
148
<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; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
149
149
150
<div id="doc3" class="yui-t2">
150
<div id="doc3" class="yui-t2">
151
151
Lines 163-168 Link Here
163
                <div id="toolbar" class="btn-toolbar">
163
                <div id="toolbar" class="btn-toolbar">
164
                    <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div>
164
                    <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div>
165
                    <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div>
165
                    <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div>
166
                    [%# FIXME This action should not be available for everyone %]
166
                    <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div>
167
                    <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div>
167
                   [% IF ( unclosable ) %]
168
                   [% IF ( unclosable ) %]
168
                    [% ELSIF ( uncertainprices ) %]
169
                    [% ELSIF ( uncertainprices ) %]
Lines 241-261 Link Here
241
            <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
242
            <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
242
            [% END %]
243
            [% END %]
243
        [% ELSE %]
244
        [% ELSE %]
244
        <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
245
        <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
245
        [% IF ( delete_confirm ) %]
246
            <h2>
247
            <span class="yui-button yui-link-button">
248
            <em class="first-child">
249
                <a href="[% script_name %]?op=delete_confirm&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
250
            </em>
251
            </span>
252
            <span class="yui-button yui-link-button">
253
            <em class="first-child">
254
                <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
255
            </em>
256
            </span>
257
            </h2>
258
        [% END %]
259
        [% IF ( basketno ) %]
246
        [% IF ( basketno ) %]
260
            <div id="acqui_basket_summary" class="yui-g">
247
            <div id="acqui_basket_summary" class="yui-g">
261
                <div class="rows">
248
                <div class="rows">
Lines 377-383 Link Here
377
            </div>
364
            </div>
378
        [% END %]
365
        [% END %]
379
366
380
        [% UNLESS ( delete_confirm ) %]
381
        <div id="acqui_basket_content" class="yui-g">
367
        <div id="acqui_basket_content" class="yui-g">
382
        [% IF ( books_loop ) %]
368
        [% IF ( books_loop ) %]
383
        <h2>Orders</h2>
369
        <h2>Orders</h2>
Lines 639-645 Link Here
639
625
640
        [% INCLUDE 'acquisitions-add-to-basket.inc' %]
626
        [% INCLUDE 'acquisitions-add-to-basket.inc' %]
641
        [% END %]
627
        [% END %]
642
        [% END %]
643
[% END %]
628
[% END %]
644
[% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
629
[% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
645
    [% END %]
630
    [% END %]
646
- 

Return to bug 10913