.hold-items-list-title { font-size: [% css_fonts.size_bigger %]; }
.hold-items-list-problem { color: [% css_colors.text_alert %]; }
+.mr_holds_no_formats {
+ padding: 5px;
+ margin-left: 25px;
+ font-size: 110%;
+ font-weight: bold;
+ color: [% css_colors.text_invert %];
+ background: [% css_colors.primary %];
+}
+
+.holds_item_row_separator td {
+ border-top: 2px dashed [% css_colors.accent_medium %];
+}
+
.big-strong {font-weight: bold; font-size: [% css_fonts.size_bigger %]; }
.results_header_btns, .results_header_sel {
<div id='holds_box' class='canvas' style='margin-top: 6px;'>
<h1>[% l('Place Hold') %]</h1>
+
+ [% some_holds_allowed = -1 %]
+
<form method="post">
<input type="hidden" name="hold_type" value="[% CGI.param('hold_type') | html %]" />
[%
<table id='hold-items-list'>
[% FOR hdata IN ctx.hold_data;
attrs = {marc_xml => hdata.marc_xml};
- PROCESS get_marc_attrs args=attrs %]
+ PROCESS get_marc_attrs args=attrs;
+ this_hold_disallowed = 0;
+
+ IF CGI.param('hold_type') == 'M';
+ IF hdata.metarecord_filters.formats.size == 0;
+ this_hold_disallowed = 1;
+ # if this is the first hold and it's disallowed,
+ # assume all holds are, until we proven otherwise
+ SET some_holds_allowed = 0 IF some_holds_allowed == -1;
+ ELSE; some_holds_allowed = 1; END;
+ END %]
+
<tr>
<td>
+ [% IF !this_hold_disallowed %]
<input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
+ [% END %]
<div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
- [% IF hdata.parts %]
+ [% IF hdata.parts AND !this_hold_disallowed %]
[% IF hdata.parts.size > 0 %]
<div style='padding-left: 10px'>
<span><label for='select_hold_part'>[%
END %]
</td>
</tr>
+
+ [% IF this_hold_disallowed %]
+ <tr><td>
+ <div class="mr_holds_no_formats">
+ [% l('This item does not have any formats available for holds placement') %]
+ </div>
+ </td></tr>
+ [% END %]
+
+ [% IF !loop.last AND ctx.hold_data.size > 1 %]
+ <tr class="holds_item_row_separator"><td> </td></tr>
+ [% END %]
+
[% END %]
</table>
+ [% IF some_holds_allowed %]
+
<p>
[%- org_select_id = 'pickup_lib'; -%]
<label for="[% org_select_id %]">[%l('Pickup location:') %]</label>
[% END %]
</blockquote>
</p>
- <input id="place_hold_submit" type="submit" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
+ <input id="place_hold_submit" type="submit" name="submit"
+ value="[% l('Submit') %]" title="[% l('Submit') %]"
alt="[% l('Submit') %]" class="opac-button" />
+ [% END # some_holds_allowed %]
<input type="reset" name="cancel" onclick="javascript:history.go(-1);"
value="[% l('Cancel') %]" id="holds_cancel" class="opac-button" />
</form>