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

(-)a/catalogue/updateitem.pl (-1 / +8 lines)
Lines 37-42 my $itemnumber=$cgi->param('itemnumber'); Link Here
37
my $biblioitemnumber=$cgi->param('biblioitemnumber');
37
my $biblioitemnumber=$cgi->param('biblioitemnumber');
38
my $itemlost=$cgi->param('itemlost');
38
my $itemlost=$cgi->param('itemlost');
39
my $itemnotes=$cgi->param('itemnotes');
39
my $itemnotes=$cgi->param('itemnotes');
40
my $itemnotes_nonpublic=$cgi->param('itemnotes_nonpublic');
40
my $withdrawn=$cgi->param('withdrawn');
41
my $withdrawn=$cgi->param('withdrawn');
41
my $damaged=$cgi->param('damaged');
42
my $damaged=$cgi->param('damaged');
42
43
Lines 55-61 for ($damaged,$itemlost,$withdrawn) { Link Here
55
56
56
# modify MARC item if input differs from items table.
57
# modify MARC item if input differs from items table.
57
my $item_changes = {};
58
my $item_changes = {};
58
if (defined $itemnotes) { # i.e., itemnotes parameter passed from form
59
if (defined $itemnotes_nonpublic) { # i.e., itemnotes_nonpublic parameter passed from form
60
    checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet');
61
    if ((not defined  $item_data_hashref->{'itemnotes_nonpublic'}) or $itemnotes_nonpublic ne $item_data_hashref->{'itemnotes_nonpublic'}) {
62
        $item_changes->{'itemnotes_nonpublic'} = $itemnotes_nonpublic;
63
    }
64
}
65
elsif (defined $itemnotes) { # i.e., itemnotes parameter passed from form
59
    checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet');
66
    checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet');
60
    if ((not defined  $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) {
67
    if ((not defined  $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) {
61
        $item_changes->{'itemnotes'} = $itemnotes;
68
        $item_changes->{'itemnotes'} = $itemnotes;
(-)a/circ/returns.pl (-11 / +12 lines)
Lines 569-585 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
569
        my $item   = GetItem( GetItemnumberFromBarcode($bar_code) );
569
        my $item   = GetItem( GetItemnumberFromBarcode($bar_code) );
570
        # fix up item type for display
570
        # fix up item type for display
571
        $biblio->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $biblio->{'itype'} : $biblio->{'itemtype'};
571
        $biblio->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $biblio->{'itype'} : $biblio->{'itemtype'};
572
        $ri{itembiblionumber} = $biblio->{'biblionumber'};
572
        $ri{itembiblionumber}    = $biblio->{'biblionumber'};
573
        $ri{itemtitle}        = $biblio->{'title'};
573
        $ri{itemtitle}           = $biblio->{'title'};
574
        $ri{itemauthor}       = $biblio->{'author'};
574
        $ri{itemauthor}          = $biblio->{'author'};
575
        $ri{itemcallnumber}   = $biblio->{'itemcallnumber'};
575
        $ri{itemcallnumber}      = $biblio->{'itemcallnumber'};
576
        $ri{itemtype}         = $biblio->{'itemtype'};
576
        $ri{itemtype}            = $biblio->{'itemtype'};
577
        $ri{itemnote}         = $biblio->{'itemnotes'};
577
        $ri{itemnote}            = $biblio->{'itemnotes'};
578
        $ri{ccode}            = $biblio->{'ccode'};
578
        $ri{itemnotes_nonpublic} = $item->{'itemnotes_nonpublic'};
579
        $ri{itemnumber}       = $biblio->{'itemnumber'};
579
        $ri{ccode}               = $biblio->{'ccode'};
580
        $ri{barcode}          = $bar_code;
580
        $ri{itemnumber}          = $biblio->{'itemnumber'};
581
        $ri{homebranch}       = $item->{'homebranch'};
581
        $ri{barcode}             = $bar_code;
582
        $ri{holdingbranch}    = $item->{'holdingbranch'};
582
        $ri{homebranch}          = $item->{'homebranch'};
583
        $ri{holdingbranch}       = $item->{'holdingbranch'};
583
584
584
        $ri{location}         = $biblio->{'location'};
585
        $ri{location}         = $biblio->{'location'};
585
        my $shelfcode = $ri{'location'};
586
        my $shelfcode = $ri{'location'};
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (+8 lines)
Lines 237-242 $(document).ready(function() { Link Here
237
                            title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
237
                            title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
238
                        }
238
                        }
239
239
240
                        if ( oObj.itemnotes_nonpublic ) {
241
                            var span_class = "";
242
                            if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) {
243
                                span_class = "circ-hlt";
244
                            }
245
                            title += " - <span class='" + span_class + "'>" + oObj.itemnotes_nonpublic + "</span>"
246
                        }
247
240
                        var onsite_checkout = '';
248
                        var onsite_checkout = '';
241
                        if ( oObj.onsite_checkout == 1 ) {
249
                        if ( oObj.onsite_checkout == 1 ) {
242
                            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
250
                            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-11 / +27 lines)
Lines 220-237 Link Here
220
                [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a>&nbsp;</li>[% END %]
220
                [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a>&nbsp;</li>[% END %]
221
                [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a>&nbsp;</li>[% END %]
221
                [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a>&nbsp;</li>[% END %]
222
                [% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %]&nbsp;</li>[% END %]
222
                [% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %]&nbsp;</li>[% END %]
223
223
                [% IF ( ITEM_DAT.enumchron ) %]<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %]&nbsp;</li>[% END %]
224
                [% IF ( ITEM_DAT.enumchron ) %]<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %]&nbsp;</li>[% END %]
224
                <li><span class="label">Public note:</span>
225
225
                [% IF ( CAN_user_editcatalogue_edit_items ) %]
226
                <li>
226
                <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
227
                    <span class="label">Public note:</span>
227
                    <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" />
228
                    [% IF ( CAN_user_editcatalogue_edit_items ) %]
228
                    <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" />
229
                    <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
229
                </form>
230
                        <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" />
230
                [% ELSE %]
231
                        <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" />
231
                    [% ITEM_DAT.itemnotes %]
232
                    </form>
232
                    &nbsp;
233
                    [% ELSE %]
233
                [% END %]
234
                        [% ITEM_DAT.itemnotes %]
234
            </li>
235
                        &nbsp;
236
                    [% END %]
237
                </li>
238
239
                <li>
240
                    <span class="label">Non-public note:</span>
241
                    [% IF ( CAN_user_editcatalogue_edit_items ) %]
242
                    <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
243
                        <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" />
244
                        <textarea name="itemnotes_nonpublic" rows="2" cols="30">[% ITEM_DAT.itemnotes_nonpublic %]</textarea><input type="submit" name="submit" class="submit" value="Update" />
245
                    </form>
246
                    [% ELSE %]
247
                        [% ITEM_DAT.itemnotes_nonpublic %]
248
                        &nbsp;
249
                    [% END %]
250
                </li>
235
            </ol>
251
            </ol>
236
            </div>
252
            </div>
237
</div>
253
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +4 lines)
Lines 581-588 $(document).ready(function () { Link Here
581
                    [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
581
                    [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
582
                </a>
582
                </a>
583
            [% ELSE %]Not checked out[% END %]</td>
583
            [% ELSE %]Not checked out[% END %]</td>
584
            <td class="ci-note">[% IF ( riloo.bornote ) %]<span class="circ-hlt">[% riloo.bornote %]<br /></span>[% END %]
584
            <td class="ci-note">
585
            [% IF ( riloo.itemnote ) %]<span class="circ-hlt">[% riloo.itemnote %]</span>[% END %]
585
                [% IF ( riloo.bornote ) %]<p><span class="circ-hlt">[% riloo.bornote %]</p></span>[% END %]
586
                [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt">[% riloo.itemnote %]</p></span>[% END %]
587
                [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt">[% riloo.itemnotes_nonpublic %]</p></span>[% END %]
586
            </td>
588
            </td>
587
           </tr>
589
           </tr>
588
        [% END %]
590
        [% END %]
(-)a/svc/checkouts (-18 / +16 lines)
Lines 76-81 my $sql = ' Link Here
76
        itemnumber,
76
        itemnumber,
77
        barcode,
77
        barcode,
78
        itemnotes,
78
        itemnotes,
79
        itemnotes_nonpublic,
79
        itemcallnumber,
80
        itemcallnumber,
80
        replacementprice,
81
        replacementprice,
81
82
Lines 146-161 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
146
      GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} );
147
      GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} );
147
148
148
    my $checkout = {
149
    my $checkout = {
149
        DT_RowId   => $c->{itemnumber} . '-' . $c->{borrowernumber},
150
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
150
        title      => $c->{title},
151
        title                => $c->{title},
151
        author     => $c->{author},
152
        author               => $c->{author},
152
        barcode    => $c->{barcode},
153
        barcode              => $c->{barcode},
153
        itemtype   => $item_level_itypes ? $c->{itype} : $c->{itemtype},
154
        itemtype             => $item_level_itypes ? $c->{itype} : $c->{itemtype},
154
        itemtype_description => $item_level_itypes ? $c->{itype_description} : $c->{itemtype_description},
155
        itemtype_description => $item_level_itypes ? $c->{itype_description} : $c->{itemtype_description},
155
        location   => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{},
156
        location             => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{},
156
        itemnotes  => $c->{itemnotes},
157
        itemnotes            => $c->{itemnotes},
157
        branchcode => $c->{branchcode},
158
        itemnotes_nonpublic  => $c->{itemnotes_nonpublic},
158
        branchname => $c->{branchname},
159
        branchcode           => $c->{branchcode},
160
        branchname           => $c->{branchname},
159
        itemcallnumber => $c->{itemcallnumber}   || q{},
161
        itemcallnumber => $c->{itemcallnumber}   || q{},
160
        charge         => $charge,
162
        charge         => $charge,
161
        fine           => $fine,
163
        fine           => $fine,
Lines 170-176 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
170
        date_due            => $c->{date_due},
172
        date_due            => $c->{date_due},
171
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
173
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
172
        timestamp           => $c->{timestamp},
174
        timestamp           => $c->{timestamp},
173
        onsite_checkout         => $c->{onsite_checkout},
175
        onsite_checkout     => $c->{onsite_checkout},
174
        renewals_count      => $renewals_count,
176
        renewals_count      => $renewals_count,
175
        renewals_allowed    => $renewals_allowed,
177
        renewals_allowed    => $renewals_allowed,
176
        renewals_remaining  => $renewals_remaining,
178
        renewals_remaining  => $renewals_remaining,
Lines 186-198 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
186
                as_due_date => 1
188
                as_due_date => 1
187
            }
189
            }
188
        ),
190
        ),
189
        subtitle => GetRecordValue(
191
        subtitle =>
190
            'subtitle',
192
          GetRecordValue( 'subtitle', GetMarcBiblio( $c->{biblionumber} ), GetFrameworkCode( $c->{biblionumber} ) ),
191
            GetMarcBiblio( $c->{biblionumber} ),
193
        lost    => $c->{itemlost} ? GetAuthorisedValueByCode( 'LOST',    $c->{itemlost} ) : undef,
192
            GetFrameworkCode( $c->{biblionumber} )
194
        damaged => $c->{damaged}  ? GetAuthorisedValueByCode( 'DAMAGED', $c->{damaged} )  : undef,
193
        ),
194
        lost => $c->{itemlost} ? GetAuthorisedValueByCode( 'LOST', $c->{itemlost} ) : undef,
195
        damaged => $c->{damaged} ? GetAuthorisedValueByCode( 'DAMAGED', $c->{damaged} ) : undef,
196
        borrower => {
195
        borrower => {
197
            surname    => $c->{surname},
196
            surname    => $c->{surname},
198
            firstname  => $c->{firstname},
197
            firstname  => $c->{firstname},
199
- 

Return to bug 13024