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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-3 / +10 lines)
Lines 84-89 Link Here
84
                                    <input type="hidden" name="op" value="returnbook" />
84
                                    <input type="hidden" name="op" value="returnbook" />
85
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
85
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
86
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
86
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
87
                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
87
                                    <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
88
                                    <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
88
                                </form>
89
                                </form>
89
                            [% END %]
90
                            [% END %]
Lines 92-97 Link Here
92
                                <input type="hidden" name="op" value="" />
93
                                <input type="hidden" name="op" value="" />
93
                                <input type="hidden" name="patronid" value="[% patronid | html %]" />
94
                                <input type="hidden" name="patronid" value="[% patronid | html %]" />
94
                                <input type="hidden" name="barcode" value="[% barcode | html %]" />
95
                                <input type="hidden" name="barcode" value="[% barcode | html %]" />
96
                                <input type="hidden" name="newissues" value="[% newissues | html %]" />
95
                                <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
97
                                <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
96
                            </form>
98
                            </form>
97
                        </div> <!-- / .alert -->
99
                        </div> <!-- / .alert -->
Lines 109-114 Link Here
109
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
111
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
110
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
112
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
111
                                    <input type="hidden" name="confirmed" value="" />
113
                                    <input type="hidden" name="confirmed" value="" />
114
                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
112
                                    <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
115
                                    <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
113
                                </form>
116
                                </form>
114
                            [% END %]
117
                            [% END %]
Lines 119-124 Link Here
119
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
122
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
120
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
123
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
121
                                    <input type="hidden" name="confirmed" value="1" />
124
                                    <input type="hidden" name="confirmed" value="1" />
125
                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
122
                                    <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
126
                                    <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
123
                                  </form>
127
                                  </form>
124
                            [% ELSE %]
128
                            [% ELSE %]
Lines 127-132 Link Here
127
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
131
                                    <input type="hidden" name="patronid" value="[% patronid | html %]" />
128
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
132
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
129
                                    <input type="hidden" name="confirmed" value="1" />
133
                                    <input type="hidden" name="confirmed" value="1" />
134
                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
130
                                    <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
135
                                    <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
131
                                </form>
136
                                </form>
132
                            [% END %]
137
                            [% END %]
Lines 134-139 Link Here
134
                            <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
139
                            <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
135
                                <input type="hidden" name="op" value="" />
140
                                <input type="hidden" name="op" value="" />
136
                                <input type="hidden" name="patronid" value="[% patronid | html %]" />
141
                                <input type="hidden" name="patronid" value="[% patronid | html %]" />
142
                                <input type="hidden" name="newissues" value="[% newissues | html %]" />
137
                                <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
143
                                <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
138
                            </form>
144
                            </form>
139
                        </div>
145
                        </div>
Lines 239-252 Link Here
239
                                            <tr>
245
                                            <tr>
240
                                                <td>[% ISSUE.issuedate | html %]</td>
246
                                                <td>[% ISSUE.issuedate | html %]</td>
241
                                                <td>
247
                                                <td>
242
                                                    [% IF ( newissues.match(ISSUE.barcode)) %]
243
                                                        <span class="label label-info">NEW</span>
244
                                                    [% END %]
245
                                                    [% UNLESS ( noitemlinks ) %]
248
                                                    [% UNLESS ( noitemlinks ) %]
246
                                                        <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.  biblionumber | uri %]">[% ISSUE.title | html %]</a>
249
                                                        <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.  biblionumber | uri %]">[% ISSUE.title | html %]</a>
247
                                                    [% ELSE %]
250
                                                    [% ELSE %]
248
                                                        <strong>[% ISSUE.title | html %]</strong>
251
                                                        <strong>[% ISSUE.title | html %]</strong>
249
                                                    [% END %]
252
                                                    [% END %]
253
                                                    [% IF ( newissues.match(ISSUE.barcode)) %]
254
                                                        <span class="label label-info">NEW</span>
255
                                                    [% END %]
250
                                                    <span class="item-details">[% ISSUE.author | html %]</span>
256
                                                    <span class="item-details">[% ISSUE.author | html %]</span>
251
                                                    ([% ISSUE.barcode | html %])
257
                                                    ([% ISSUE.barcode | html %])
252
                                                </td>
258
                                                </td>
Lines 260-265 Link Here
260
                                                    <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
266
                                                    <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
261
                                                        <input type="hidden" name="patronid" value="[% patronid | html %]" />
267
                                                        <input type="hidden" name="patronid" value="[% patronid | html %]" />
262
                                                        <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
268
                                                        <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
269
                                                        <input type="hidden" name="newissues" value="[% newissues | html %]" />
263
                                                        [% IF ISSUE.can_be_renewed %]
270
                                                        [% IF ISSUE.can_be_renewed %]
264
                                                            <input type="hidden" name="op" value="checkout" />
271
                                                            <input type="hidden" name="op" value="checkout" />
265
                                                            <input type="hidden" name="confirmed" value="1" />
272
                                                            <input type="hidden" name="confirmed" value="1" />
(-)a/opac/sco/sco-main.pl (-4 / +3 lines)
Lines 176-181 elsif ( $patron and $op eq "checkout" ) { Link Here
176
        if ($confirmed) {
176
        if ($confirmed) {
177
            #warn "renewing";
177
            #warn "renewing";
178
            AddRenewal( $borrower->{borrowernumber}, $item->{itemnumber} );
178
            AddRenewal( $borrower->{borrowernumber}, $item->{itemnumber} );
179
            push @newissueslist, $barcode;
179
        } else {
180
        } else {
180
            #warn "renew confirmation";
181
            #warn "renew confirmation";
181
            $template->param(
182
            $template->param(
Lines 215-224 elsif ( $patron and $op eq "checkout" ) { Link Here
215
                    }
216
                    }
216
                )->count;
217
                )->count;
217
            }
218
            }
219
218
            AddIssue( $borrower, $barcode );
220
            AddIssue( $borrower, $barcode );
219
            push @newissueslist, $barcode;
221
            push @newissueslist, $barcode;
220
            print 'Issues \n';
222
221
            print join(',', @newissueslist);
222
            if ( $hold_existed ) {
223
            if ( $hold_existed ) {
223
                my $dtf = Koha::Database->new->schema->storage->datetime_parser;
224
                my $dtf = Koha::Database->new->schema->storage->datetime_parser;
224
                $template->param(
225
                $template->param(
Lines 248-254 elsif ( $patron and $op eq "checkout" ) { Link Here
248
} # $op
249
} # $op
249
250
250
if ($borrower) {
251
if ($borrower) {
251
    print 'borrower \n';
252
#   warn "issuer's  branchcode: " .   $issuer->{branchcode};
252
#   warn "issuer's  branchcode: " .   $issuer->{branchcode};
253
#   warn   "user's  branchcode: " . $borrower->{branchcode};
253
#   warn   "user's  branchcode: " . $borrower->{branchcode};
254
    my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || '');
254
    my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || '');
255
- 

Return to bug 19458