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 399-404 OPAC: Link Here
399
                yes: Display
399
                yes: Display
400
                no: Don't display
400
                no: Don't display
401
            - the list of authors/subjects in a popup for a combined search on OPAC detail pages.
401
            - the list of authors/subjects in a popup for a combined search on OPAC detail pages.
402
        -
403
            - pref: OpacShowHoldNotes
404
              default: 0
405
              choices:
406
                  yes: Allow
407
                  no: Do not allow
408
            - users to add a note when placing a hold.
409
402
    Policy:
410
    Policy:
403
        -
411
        -
404
            - pref: singleBranchMode
412
            - pref: singleBranchMode
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (+11 lines)
Lines 2781-2786 div.authorizedheading { Link Here
2781
    width: 75%;
2781
    width: 75%;
2782
}
2782
}
2783
2783
2784
2784
.contentblock {
2785
.contentblock {
2785
    position: relative;
2786
    position: relative;
2786
    margin-left: 2em;
2787
    margin-left: 2em;
Lines 2920-2922 a.reviewlink,a.reviewlink:visited { Link Here
2920
.idbresult img {
2921
.idbresult img {
2921
    padding-right: 6px;
2922
    padding-right: 6px;
2922
}
2923
}
2924
2925
.notesrow label {
2926
    font-weight: bold;
2927
}
2928
.notesrow span {
2929
    display: block;
2930
}
2931
.notesrow textarea {
2932
    width: 100%;
2933
}
(-)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 171-177 foreach my $biblioNumber (@biblionumbers) { Link Here
171
#
171
#
172
#
172
#
173
if ( $query->param('place_reserve') ) {
173
if ( $query->param('place_reserve') ) {
174
    my $notes = $query->param('notes');
175
    my $reserve_cnt = 0;
174
    my $reserve_cnt = 0;
176
    if ($MAXIMUM_NUMBER_OF_RESERVES) {
175
    if ($MAXIMUM_NUMBER_OF_RESERVES) {
177
        $reserve_cnt = GetReservesFromBorrowernumber( $borrowernumber );
176
        $reserve_cnt = GetReservesFromBorrowernumber( $borrowernumber );
Lines 255-260 if ( $query->param('place_reserve') ) { Link Here
255
            # Inserts a null into the 'itemnumber' field of 'reserves' table.
254
            # Inserts a null into the 'itemnumber' field of 'reserves' table.
256
            $itemNum = undef;
255
            $itemNum = undef;
257
        }
256
        }
257
        my $notes = $query->param('notes_'.$biblioNum)||'';
258
258
259
        if (   $MAXIMUM_NUMBER_OF_RESERVES
259
        if (   $MAXIMUM_NUMBER_OF_RESERVES
260
            && $reserve_cnt >= $MAXIMUM_NUMBER_OF_RESERVES )
260
            && $reserve_cnt >= $MAXIMUM_NUMBER_OF_RESERVES )
Lines 374-379 foreach my $biblioNum (@biblionumbers) { Link Here
374
    $biblioLoopIter{rank} = $biblioData->{rank};
374
    $biblioLoopIter{rank} = $biblioData->{rank};
375
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
375
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
376
    $biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
376
    $biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
377
    $biblioLoopIter{mandatorynotes}=0; #FIXME: For future use
377
378
378
    if (!$itemLevelTypes && $biblioData->{itemtype}) {
379
    if (!$itemLevelTypes && $biblioData->{itemtype}) {
379
        $biblioLoopIter{description} = $itemTypes->{$biblioData->{itemtype}}{description};
380
        $biblioLoopIter{description} = $itemTypes->{$biblioData->{itemtype}}{description};
Lines 550-562 if ( $numBibsAvailable == 0 || !$anyholdable) { Link Here
550
    $template->param( none_available => 1 );
551
    $template->param( none_available => 1 );
551
}
552
}
552
553
553
my $itemTableColspan = 7;
554
my $itemTableColspan = 8;
554
if (! $template->{VARS}->{'OPACItemHolds'}) {
555
if (! $template->{VARS}->{'OPACItemHolds'}) {
555
    $itemTableColspan--;
556
    $itemTableColspan--;
556
}
557
}
557
if (! $template->{VARS}->{'singleBranchMode'}) {
558
if (! $template->{VARS}->{'singleBranchMode'}) {
558
    $itemTableColspan--;
559
    $itemTableColspan--;
559
}
560
}
561
my $show_notes=C4::Context->preference('OPACShowHoldNotes');
562
$template->param(OPACShowHoldNotes=>$show_notes);
563
$itemTableColspan-- if !$show_notes;
560
$template->param(itemtable_colspan => $itemTableColspan);
564
$template->param(itemtable_colspan => $itemTableColspan);
561
565
562
# display infos
566
# display infos
563
- 

Return to bug 9722