[Koha-patches] [PATCH] bug 2874 [2/3]: added awareness of circulate/override_renewals subpermission
Galen Charlton
galen.charlton at liblime.com
Mon Dec 22 18:07:54 CET 2008
From: John Beppu <john.beppu at liblime.com>
A few minor whitespace cleanups were thrown in as well.
Signed-off-by: Galen Charlton <galen.charlton at liblime.com>
---
circ/circulation.pl | 2 +-
.../prog/en/modules/circ/circulation.tmpl | 17 +++++++++++------
.../prog/en/modules/members/moremember.tmpl | 4 ++++
members/moremember.pl | 4 ++--
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/circ/circulation.pl b/circ/circulation.pl
index 198ab2d..14f94f1 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -86,7 +86,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { circulate => 1 },
+ flagsrequired => { circulate => 'circulate_remaining_permissions' },
}
);
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
index a41e0f2..6bc70b2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -432,8 +432,9 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<th>Item Type</th>
<th>Call no</th>
<th>Barcode</th>
+ <th>Renewals</th>
<th>Renew?</th>
- <th>Check In?</th>
+ <th>Check In?</th>
</tr>
<!-- TMPL_IF NAME="todayissues" --></thead>
<tbody>
@@ -454,6 +455,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
</td>
<td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
+ <td><!-- TMPL_VAR NAME="renewals" --></td>
<td>
<!-- TMPL_IF NAME="can_renew" -->
<input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
@@ -492,8 +494,8 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- /TMPL_LOOP --> <!-- /loop todayissues -->
<!-- /if todayissues --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="previssues" -->
-<!-- TMPL_IF NAME="todayissues" --><tr><th colspan="7"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
-<tr><th class="{sorter: false}" colspan="7"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
+<!-- TMPL_IF NAME="todayissues" --><tr><th colspan="8"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
+<tr><th class="{sorter: false}" colspan="8"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
<tbody>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="previssues" -->
@@ -514,6 +516,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
</td>
<td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
+ <td><!-- TMPL_VAR NAME="renewals" --></td>
<td>
<!-- TMPL_IF NAME="can_renew" -->
<input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
@@ -552,18 +555,20 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
</tr>
<!-- /loop previssues --><!-- /TMPL_LOOP -->
<!--/if previssues --><!-- /TMPL_IF -->
- </tbody>
+ </tbody>
</table>
<!--TMPL_IF NAME="issuecount"-->
<fieldset class="action">
- <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
+ <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
+ <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
<label for="override_limit">Override Renewal Limit:</label>
<input type="checkbox" name="override_limit" id="override_limit" value="1" />
+ <!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<input type="submit" name="renew_checked" value="Renew Checked Items" />
<input type="submit" name="renew_all" value="Renew All" />
</fieldset>
- <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
</form>
<!-- TMPL_ELSE -->
<p>Patron has nothing checked out.</p>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
index 53e3d58..cf85083 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
@@ -42,6 +42,7 @@ $(document).ready(function() {
$("#CheckAllreturns").click(function(){ $(".checkboxed").checkCheckboxes(":input[@name*=barcodes]"); $(".checkboxed").unCheckCheckboxes(":input[@name*=items]"); return false; });
$("#CheckNoreturns").click(function(){ $(".checkboxed").unCheckCheckboxes(":input[@name*=barcodes]"); return false; });
+ <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
<!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
$( '#override_limit' ).click( function () {
if ( this.checked ) {
@@ -51,6 +52,7 @@ $(document).ready(function() {
}
} ).attr( 'checked', false );
<!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
$("td").click(function(e){
if(e.target.tagName.toLowerCase() == 'td'){
$(this).find("input:checkbox").each( function() {
@@ -466,10 +468,12 @@ if (nodename =="barcodes[]"){
</tr>
</table>
<fieldset class="action">
+ <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
<!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
<label for="override_limit">Override Renewal Limit:</label>
<input type="checkbox" name="override_limit" id="override_limit" value="1" />
<!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
<input type="submit" name="renew_checked" value="Renew or Return checked items" />
<input type="submit" id="renew_all" name="renew_all" value="Renew all" />
<input type="submit" id="return_all" name="return_all" value="Return all" />
diff --git a/members/moremember.pl b/members/moremember.pl
index 03d3323..5688ae9 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -350,9 +350,9 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
}
$template->param(
- detailview => 1,
+ detailview => 1,
AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
- DHTMLcalendar_dateformat=>C4::Dates->DHTMLcalendar(),
+ DHTMLcalendar_dateformat=>C4::Dates->DHTMLcalendar(),
roaddetails => $roaddetails,
borrowernumber => $borrowernumber,
categoryname => $data->{'description'},
--
1.5.5.GIT
More information about the Koha-patches
mailing list