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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+8 lines)
Lines 417-422 OPAC: Link Here
417
                yes: Display
417
                yes: Display
418
                no: Don't display
418
                no: Don't display
419
            - the list of authors/subjects in a popup for a combined search on OPAC detail pages.
419
            - the list of authors/subjects in a popup for a combined search on OPAC detail pages.
420
        -
421
            - pref: OpacShowHoldNotes
422
              default: 0
423
              choices:
424
                  yes: Allow
425
                  no: Do not allow
426
            - users to add a note when placing a hold.
427
420
    Policy:
428
    Policy:
421
        -
429
        -
422
            - pref: singleBranchMode
430
            - pref: singleBranchMode
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (+10 lines)
Lines 2795-2800 div.authorizedheading { Link Here
2795
    width: 75%;
2795
    width: 75%;
2796
}
2796
}
2797
2797
2798
2798
.contentblock {
2799
.contentblock {
2799
    position: relative;
2800
    position: relative;
2800
    margin-left: 2em;
2801
    margin-left: 2em;
Lines 2950-2952 a.reviewlink,a.reviewlink:visited { Link Here
2950
float:left;
2951
float:left;
2951
padding: 0.1em 0;
2952
padding: 0.1em 0;
2952
}
2953
}
2954
.notesrow label {
2955
    font-weight: bold;
2956
}
2957
.notesrow span {
2958
    display: block;
2959
}
2960
.notesrow textarea {
2961
    width: 100%;
2962
}
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt (-2 / +39 lines)
Lines 4-9 Link Here
4
<script type="text/javascript">
4
<script type="text/javascript">
5
// <![CDATA[
5
// <![CDATA[
6
 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
6
 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
7
 var ForceHoldNotesReasons=new Array(
8
    _("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific copy information may be helpful."),
9
    "*** Add a new reason above this line ***" ); // NOTE: Do not renumber reasons; this will affect use of existing ones.
7
10
8
 function prefixOf (s, tok) {
11
 function prefixOf (s, tok) {
9
     var index = s.indexOf(tok);
12
     var index = s.indexOf(tok);
Lines 29-34 Link Here
29
	});
32
	});
30
    // Hides all 'specific copy' table rows on load.
33
    // Hides all 'specific copy' table rows on load.
31
    $(".copiesrow").hide();
34
    $(".copiesrow").hide();
35
    $(".notesrow").hide();
36
37
    // Insert reasons for forced hold notes
38
    $(".forcenotesreason").each(function(){
39
        biblioNum = suffixOf($(this).attr("id"), "_");
40
        var j=$("#notesmandatory_"+biblioNum).val();
41
        if(j>0) {
42
            $(this).html(ForceHoldNotesReasons[j-1]);
43
        }
44
    });
32
45
33
    $("#place_on_hdr").show();
46
    $("#place_on_hdr").show();
34
    $(".place_on_type").show();
47
    $(".place_on_type").show();
Lines 101-106 Link Here
101
        $(".copiesrow").hide();
114
        $(".copiesrow").hide();
102
    });
115
    });
103
116
117
    // Show or hide holds notes
118
    $(".shownotes").click(function(){
119
        biblioNum = suffixOf($(this).attr("id"), "_");
120
        $(".notesrow").hide();
121
        $("#notesrow_"+biblioNum).show();
122
    });
123
104
    // When 'Place Hold' button is clicked
124
    // When 'Place Hold' button is clicked
105
    $(".placehold").click(function(){
125
    $(".placehold").click(function(){
106
        var biblionumbers = "";
126
        var biblionumbers = "";
Lines 253-258 Link Here
253
        <th>Hold starts on date</th>
273
        <th>Hold starts on date</th>
254
		  [% END %]
274
		  [% END %]
255
        <th>Hold not needed after</th>
275
        <th>Hold not needed after</th>
276
        [% IF ( OPACShowHoldNotes ) %]<th>Notes</th>[% END %]
256
                  [% IF ( OPACItemHolds ) %]
277
                  [% IF ( OPACItemHolds ) %]
257
                    <th id="place_on_hdr" style="display:none">Place on</th>
278
                    <th id="place_on_hdr" style="display:none">Place on</th>
258
                  [% END %]
279
                  [% END %]
Lines 261-267 Link Here
261
                        <th>Pickup location</th>
282
                        <th>Pickup location</th>
262
		    [% END %]
283
		    [% END %]
263
                  [% END %]
284
                  [% END %]
264
                </tr>[% ELSE %]<tr><th colspan="5">Title</th></tr>[% END %]
285
                </tr>[% ELSE %]<tr><th colspan="[% itemtable_colspan + 1 %]">Title</th></tr>[% END %]
265
286
266
                [% FOREACH bibitemloo IN bibitemloop %]
287
                [% FOREACH bibitemloo IN bibitemloop %]
267
                  <tr>
288
                  <tr>
Lines 281-287 Link Here
281
                      [% ELSE %]
302
                      [% ELSE %]
282
                                      [% UNLESS ( none_available ) %]<td class="hold">&nbsp;</td>[% END %]
303
                                      [% UNLESS ( none_available ) %]<td class="hold">&nbsp;</td>[% END %]
283
                      [% END %]
304
                      [% END %]
284
                    [% IF ( bibitemloo.holdable ) %]<td class="title">[% ELSE %]<td class="title" colspan="5">[% END %]
305
                    [% IF ( bibitemloo.holdable ) %]<td class="title">[% ELSE %]<td class="title" colspan="[% itemtable_colspan + 1 %]">[% END %]
285
                      <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber %]">[% bibitemloo.title |html %][% IF ( bibitemloo.subtitle ) %] [% FOREACH subtitl IN bibitemloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
306
                      <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber %]">[% bibitemloo.title |html %][% IF ( bibitemloo.subtitle ) %] [% FOREACH subtitl IN bibitemloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
286
                      [% IF ( bibitemloo.author ) %],  by [% bibitemloo.author %][% END %]
307
                      [% IF ( bibitemloo.author ) %],  by [% bibitemloo.author %][% END %]
287
308
Lines 339-344 Link Here
339
      <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
360
      <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
340
    </td>[% END %]
361
    </td>[% END %]
341
362
363
    [% IF ( OPACShowHoldNotes ) %][% IF ( bibitemloo.holdable ) %]<td><input type="button" id="shownotes_[% bibitemloo.biblionumber %]" class="shownotes" value="Show notes"/></td>[% END %][% END %]
364
342
                    [% IF ( bibitemloo.holdable ) %]
365
                    [% IF ( bibitemloo.holdable ) %]
343
		    <!-- HOLD ABLE -->
366
		    <!-- HOLD ABLE -->
344
		    [% IF ( OPACItemHolds ) %]
367
		    [% IF ( OPACItemHolds ) %]
Lines 415-420 Link Here
415
                    [% END %]
438
                    [% END %]
416
                  </tr>
439
                  </tr>
417
440
441
                  [% IF ( OPACShowHoldNotes ) %]
442
                  [% IF ( bibitemloo.holdable ) %]
443
                  <tr class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]">
444
                      <td>&nbsp;</td>
445
                      <td colspan="[% itemtable_colspan %]">
446
                          <label for="holdnotes">Hold notes:</label>&nbsp;
447
                          <span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span>
448
                          <textarea name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea>
449
                          <input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/>
450
                      </td>
451
                  </tr>
452
                  [% END %]
453
                  [% END %]
454
418
                  [% IF ( OPACItemHolds ) %]
455
                  [% IF ( OPACItemHolds ) %]
419
                  [% IF ( bibitemloo.holdable ) %]
456
                  [% IF ( bibitemloo.holdable ) %]
420
                    <tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
457
                    <tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
(-)a/opac/opac-reserve.pl (-3 / +6 lines)
Lines 170-176 foreach my $biblioNumber (@biblionumbers) { Link Here
170
#
170
#
171
#
171
#
172
if ( $query->param('place_reserve') ) {
172
if ( $query->param('place_reserve') ) {
173
    my $notes = $query->param('notes');
174
    my $reserve_cnt = 0;
173
    my $reserve_cnt = 0;
175
    if ($MAXIMUM_NUMBER_OF_RESERVES) {
174
    if ($MAXIMUM_NUMBER_OF_RESERVES) {
176
        $reserve_cnt = GetReservesFromBorrowernumber( $borrowernumber );
175
        $reserve_cnt = GetReservesFromBorrowernumber( $borrowernumber );
Lines 254-259 if ( $query->param('place_reserve') ) { Link Here
254
            # Inserts a null into the 'itemnumber' field of 'reserves' table.
253
            # Inserts a null into the 'itemnumber' field of 'reserves' table.
255
            $itemNum = undef;
254
            $itemNum = undef;
256
        }
255
        }
256
        my $notes = $query->param('notes_'.$biblioNum)||'';
257
257
258
        if (   $MAXIMUM_NUMBER_OF_RESERVES
258
        if (   $MAXIMUM_NUMBER_OF_RESERVES
259
            && $reserve_cnt >= $MAXIMUM_NUMBER_OF_RESERVES )
259
            && $reserve_cnt >= $MAXIMUM_NUMBER_OF_RESERVES )
Lines 373-378 foreach my $biblioNum (@biblionumbers) { Link Here
373
    $biblioLoopIter{rank} = $biblioData->{rank};
373
    $biblioLoopIter{rank} = $biblioData->{rank};
374
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
374
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
375
    $biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
375
    $biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
376
    $biblioLoopIter{mandatorynotes}=0; #FIXME: For future use
376
377
377
    if (!$itemLevelTypes && $biblioData->{itemtype}) {
378
    if (!$itemLevelTypes && $biblioData->{itemtype}) {
378
        $biblioLoopIter{description} = $itemTypes->{$biblioData->{itemtype}}{description};
379
        $biblioLoopIter{description} = $itemTypes->{$biblioData->{itemtype}}{description};
Lines 547-559 if ( $numBibsAvailable == 0 || $anyholdable == 0) { Link Here
547
    $template->param( none_available => 1 );
548
    $template->param( none_available => 1 );
548
}
549
}
549
550
550
my $itemTableColspan = 7;
551
my $itemTableColspan = 8;
551
if (! $template->{VARS}->{'OPACItemHolds'}) {
552
if (! $template->{VARS}->{'OPACItemHolds'}) {
552
    $itemTableColspan--;
553
    $itemTableColspan--;
553
}
554
}
554
if (! $template->{VARS}->{'singleBranchMode'}) {
555
if (! $template->{VARS}->{'singleBranchMode'}) {
555
    $itemTableColspan--;
556
    $itemTableColspan--;
556
}
557
}
558
my $show_notes=C4::Context->preference('OPACShowHoldNotes');
559
$template->param(OPACShowHoldNotes=>$show_notes);
560
$itemTableColspan-- if !$show_notes;
557
$template->param(itemtable_colspan => $itemTableColspan);
561
$template->param(itemtable_colspan => $itemTableColspan);
558
562
559
# display infos
563
# display infos
560
- 

Return to bug 9722