[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6347 - Fix for itemlevel holds in OPAC
Katrin Fischer
Katrin.Fischer.83 at web.de
Fri May 20 22:56:23 CEST 2011
From: Chris Cormack <chris at bigballofwax.co.nz>
Edits by Owen:
- More variable scope corrections
- Minor markup and style tweak
- Table column span correction
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
- Item level holds can be placed and hold saved
- Table and layout are ok now
---
.../opac-tmpl/prog/en/modules/opac-reserve.tt | 29 +++++++++----------
opac/opac-reserve.pl | 6 ++--
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
index bc46b28..6a7e973 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
@@ -152,6 +152,7 @@
});
// ]]>
</script>
+<style type="text/css">td ul { padding : 0; } td li { white-space: nowrap; font-size: 90%; list-style-type:none; padding : .3em 0; }</style>
</head>
<body id="opac-holds">
@@ -371,11 +372,13 @@
<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 ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %]
+ [% IF ( bibitemloo.holdable ) %]
+ <!-- HOLD ABLE -->
+ [% IF ( OPACItemHolds ) %]
+ <!-- ITEM HOLDS -->
<td class="place_on_type" style="display:none">
- <table>
- <tr>
- <td>
+ <ul>
+ <li>
[% UNLESS ( bibitemloo.holdable ) %]
<input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
id="reqany_[% bibitemloo.biblionumber %]"
@@ -392,10 +395,8 @@
/>
[% END %]
<label for="reqany_[% bibitemloo.biblionumber %]">Next available copy</label>
- </td>
- </tr>
- <tr>
- <td>
+ </li>
+ <li>
[% UNLESS ( bibitemloo.holdable ) %]
<input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
id="reqspecific_[% bibitemloo.biblionumber %]"
@@ -411,9 +412,8 @@
/>
[% END %]
<label for="reqspecific_[% bibitemloo.biblionumber %]">A specific copy</label>
- </td>
- </tr>
- </table>
+ </li>
+ </ul>
</td>
[% END %][% END %]
@@ -440,9 +440,8 @@
[% IF ( OPACItemHolds ) %]
[% IF ( bibitemloo.holdable ) %]
<tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
- <td colspan="1">
- </td>
- <td colspan="[% bibitemloo.itemtable_colspan %]">
+ <td> </td>
+ <td colspan="[% itemtable_colspan %]">
<table>
<caption>Select a specific copy:</caption>
<tr>
@@ -466,7 +465,7 @@
<tr class="[% itemLoo.backgroundcolor %]">
<td>
[% IF ( itemLoo.available ) %]
- <input type="radio" class="checkitem checkitem_[% itemLoo.biblionumber %]" name="checkitem_[% itemLoo.biblionumber %]"
+ <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]"
value="[% itemLoo.itemnumber %]" />
[% ELSE %]
<input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]" />
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index d50480a..a92a976 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -477,11 +477,11 @@ if ( $numBibsAvailable == 0 || !$anyholdable) {
$template->param( none_available => 1 );
}
-my $itemTableColspan = 5;
-if (!$template->param('OPACItemHolds')) {
+my $itemTableColspan = 7;
+if (! $template->{VARS}->{'OPACItemHolds'}) {
$itemTableColspan--;
}
-if ($template->param('singleBranchMode')) {
+if (! $template->{VARS}->{'singleBranchMode'}) {
$itemTableColspan--;
}
$template->param(itemtable_colspan => $itemTableColspan);
--
1.7.4.1
More information about the Koha-patches
mailing list