<script type="text/javascript">
// <![CDATA[
var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
+ var ForceHoldNotesReasons=new Array(
+ _("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific copy information may be helpful."),
+ "*** Add a new reason above this line ***" ); // NOTE: Do not renumber reasons; this will affect use of existing ones.
function prefixOf (s, tok) {
var index = s.indexOf(tok);
});
// Hides all 'specific copy' table rows on load.
$(".copiesrow").hide();
+ $(".notesrow").hide();
+
+ // Insert reasons for forced hold notes
+ $(".forcenotesreason").each(function(){
+ biblioNum = suffixOf($(this).attr("id"), "_");
+ var j=$("#notesmandatory_"+biblioNum).val();
+ if(j>0) {
+ $(this).html(ForceHoldNotesReasons[j-1]);
+ }
+ });
$("#place_on_hdr").show();
$(".place_on_type").show();
$(".copiesrow").hide();
});
+ // Show or hide holds notes
+ $(".shownotes").click(function(){
+ biblioNum = suffixOf($(this).attr("id"), "_");
+ $(".notesrow").hide();
+ $("#notesrow_"+biblioNum).show();
+ });
+
// When 'Place Hold' button is clicked
$(".placehold").click(function(){
var biblionumbers = "";
<th>Hold starts on date</th>
[% END %]
<th>Hold not needed after</th>
+ [% IF ( OPACShowHoldNotes ) %]<th>Notes</th>[% END %]
[% IF ( OPACItemHolds ) %]
<th id="place_on_hdr" style="display:none">Place on</th>
[% END %]
<th>Pickup location</th>
[% END %]
[% END %]
- </tr>[% ELSE %]<tr><th colspan="5">Title</th></tr>[% END %]
+ </tr>[% ELSE %]<tr><th colspan="[% itemtable_colspan + 1 %]">Title</th></tr>[% END %]
[% FOREACH bibitemloo IN bibitemloop %]
<tr>
[% ELSE %]
[% UNLESS ( none_available ) %]<td class="hold"> </td>[% END %]
[% END %]
- [% IF ( bibitemloo.holdable ) %]<td class="title">[% ELSE %]<td class="title" colspan="5">[% END %]
+ [% IF ( bibitemloo.holdable ) %]<td class="title">[% ELSE %]<td class="title" colspan="[% itemtable_colspan + 1 %]">[% END %]
<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>
[% IF ( bibitemloo.author ) %], by [% bibitemloo.author %][% END %]
<a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
</td>[% END %]
+ [% IF ( OPACShowHoldNotes ) %][% IF ( bibitemloo.holdable ) %]<td><input type="button" id="shownotes_[% bibitemloo.biblionumber %]" class="shownotes" value="Show notes"/></td>[% END %][% END %]
+
[% IF ( bibitemloo.holdable ) %]
<!-- HOLD ABLE -->
[% IF ( OPACItemHolds ) %]
[% END %]
</tr>
+ [% IF ( OPACShowHoldNotes ) %]
+ [% IF ( bibitemloo.holdable ) %]
+ <tr class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]">
+ <td> </td>
+ <td colspan="[% itemtable_colspan %]">
+ <label for="holdnotes">Hold notes:</label>
+ <span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span>
+ <textarea name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea>
+ <input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/>
+ </td>
+ </tr>
+ [% END %]
+ [% END %]
+
[% IF ( OPACItemHolds ) %]
[% IF ( bibitemloo.holdable ) %]
<tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
#
#
if ( $query->param('place_reserve') ) {
- my $notes = $query->param('notes');
my $reserve_cnt = 0;
if ($MAXIMUM_NUMBER_OF_RESERVES) {
$reserve_cnt = GetReservesFromBorrowernumber( $borrowernumber );
# Inserts a null into the 'itemnumber' field of 'reserves' table.
$itemNum = undef;
}
+ my $notes = $query->param('notes_'.$biblioNum)||'';
if ( $MAXIMUM_NUMBER_OF_RESERVES
&& $reserve_cnt >= $MAXIMUM_NUMBER_OF_RESERVES )
$biblioLoopIter{rank} = $biblioData->{rank};
$biblioLoopIter{reservecount} = $biblioData->{reservecount};
$biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
+ $biblioLoopIter{mandatorynotes}=0; #FIXME: For future use
if (!$itemLevelTypes && $biblioData->{itemtype}) {
$biblioLoopIter{description} = $itemTypes->{$biblioData->{itemtype}}{description};
$template->param( none_available => 1 );
}
-my $itemTableColspan = 7;
+my $itemTableColspan = 8;
if (! $template->{VARS}->{'OPACItemHolds'}) {
$itemTableColspan--;
}
if (! $template->{VARS}->{'singleBranchMode'}) {
$itemTableColspan--;
}
+my $show_notes=C4::Context->preference('OPACShowHoldNotes');
+$template->param(OPACShowHoldNotes=>$show_notes);
+$itemTableColspan-- if !$show_notes;
$template->param(itemtable_colspan => $itemTableColspan);
# display infos