Adding OpacRenewalAllowed systempref (bump to 047)
authorPaul POULAIN <paul.poulain@biblibre.com>
Sun, 13 Jan 2008 07:39:12 +0000 (01:39 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 14 Jan 2008 22:47:52 +0000 (16:47 -0600)
to let the library decide wheter their patrons can or can't renew checked-out items directly from their account.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
admin/systempreferences.pl
installer/data/mysql/en/mandatory/sysprefs.sql
installer/data/mysql/fr/1-Obligatoire/unimarc_standard_systemprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
kohaversion.pl
opac/opac-user.pl

index 773fbfe..94281a9 100755 (executable)
@@ -251,6 +251,7 @@ my %tabsysprefs;
     $tabsysprefs{OpacTopissue}="OPACFeatures";
     $tabsysprefs{OpacBrowser}="OPACFeatures";
     $tabsysprefs{kohaspsuggest} = "OPACFeatures";
+    $tabsysprefs{OpacRenewalAllowed} = "OPACFeatures";
 
 # LOGFeatures
     $tabsysprefs{CataloguingLog}  = "LOGFeatures";
index 76e5e4d..4d95633 100644 (file)
@@ -170,3 +170,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('QueryAutoTruncate',1,'If ON, query truncation is enabled by default',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('QueryRemoveStopwords',0,'If ON, stopwords listed in the Administration area will be removed from queries',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NoZebraIndexes','\'title\' => \'130a,210a,222a,240a,243a,245a,245b,246a,246b,247a,247b,250a,250b,440a,830a\',\r\n\'author\' => \'100a,100b,100c,100d,110a,111a,111b,111c,111d,245c,700a,710a,711a,800a,810a,811a\',\r\n\'isbn\' => \'020a\',\r\n\'issn\' => \'022a\',\r\n\'lccn\' => \'010a\',\r\n\'biblionumber => \'999c\',\r\n\'itemtype\' => \'942c\',\r\n\'publisher\' => \'260b\',\r\n\'date\' => \'260c\',\r\n\'note\' => \'500a, 501a,504a,505a,508a,511a,518a,520a,521a,522a,524a,526a,530a,533a,538a,541a,546a,555a,556a,562a,563a,583a,585a,582a\',\r\n\'subject\' => \'600*,610*,611*,630*,650*,651*,653*,654*,655*,662*,690*\',\r\n\'dewey\' => \'082\',\r\n\'bc\' => \'952p\',\r\n\'callnum\' => \'952o\',\r\n\'an\' => \'6009,6109,6119\',\r\n\'host-item\' => \'952a,952c\'','','Enter a specific hash for NoZebra indexes. Enter : \'indexname\' => \'100a,245a,500*\',\'index2\' => \'...\'','Free');
+
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacRenewalAllowed',0,'If ON, users can renew their issues directly from their OPAC account',NULL,'YesNo');
index 578aed7..56af849 100644 (file)
@@ -166,3 +166,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailPurchaseSuggestions',0,'If ON, patron suggestions are emailed rather than managed in Acquisitions',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemsResultsDisplay',"statuses",'statuses : N''affiche que le statut des exemplaires dans la liste de résultat. . itemdetails : affiche la localisation complète des exemplaires (site+localisation+cote) comme dans l''interface professionnelle ',"statuses|itemdetails",'Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACBaseURL',NULL,'Specify the Base URL of the OPAC, e.g., opac.mylibrary.com, the http:// will be added automatically by Koha.',NULL,'Free');
+
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacRenewalAllowed',0,'Si activé, les utilisateurs peuvent renouveller leurs prêts directement depuis leur compte à l''OPAC',NULL,'YesNo');
\ No newline at end of file
index 1424d83..91df4e0 100755 (executable)
@@ -946,6 +946,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.00.00.047";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacRenewalAllowed',0,'If ON, users can renew their issues directly from their OPAC account',NULL,'YesNo');");
+       print "Upgrade to $DBversion done ( Added OpacRenewalAllowed syspref )\n";
+    SetVersion ($DBversion);
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
index cead61a..4ee677f 100644 (file)
         <th colspan="2">Title</th>
         <th>Call No.</th>
         <th>Due</th>
+        <!-- TMPL_IF name="OpacRenewalAllowed" -->
         <!-- TMPL_UNLESS name="patron_flagged" --><th>Renew</th><!-- /TMPL_UNLESS -->
+        <!-- /TMPL_IF -->
         <th>Fines</th>
         </tr>
         <!-- TMPL_LOOP NAME="ISSUES" -->
                 <!-- TMPL_ELSE -->
                     <td><!-- TMPL_VAR NAME="date_due" --></td>
                 <!-- /TMPL_IF -->
-                <!-- TMPL_UNLESS name="patron_flagged" -->
-                <td>
-                    <!-- TMPL_IF NAME="status" -->
-                        <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew</a> <span class="renewals">(<!-- TMPL_VAR NAME="renewsleft" --> of <!-- TMPL_VAR NAME="renewsallowed" --> renewals remaining)</span>
-                    <!-- TMPL_ELSE -->
-                        Not renewable
-                    <!-- /TMPL_IF -->
-                </td>
-                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_IF name="OpacRenewalAllowed" -->
+                    <!-- TMPL_UNLESS name="patron_flagged" -->
+                    <td>
+                        <!-- TMPL_IF NAME="status" -->
+                            <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew</a> <span class="renewals">(<!-- TMPL_VAR NAME="renewsleft" --> of <!-- TMPL_VAR NAME="renewsallowed" --> renewals remaining)</span>
+                        <!-- TMPL_ELSE -->
+                            Not renewable
+                        <!-- /TMPL_IF -->
+                    </td>
+                    <!-- /TMPL_UNLESS -->
+                <!-- /TMPL_IF -->
                 <td><!-- TMPL_IF NAME="charges" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
             </tr>
         <!-- /TMPL_LOOP -->
index 1863f94..f5bb270 100644 (file)
@@ -10,7 +10,7 @@
 use strict;
 
 sub kohaversion {
-    our $VERSION = "3.00.00.046";
+    our $VERSION = "3.00.00.047";
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install
index 96e0bdd..8626fda 100755 (executable)
@@ -222,6 +222,7 @@ $template->param(
     waiting_count      => $wcount,
     textmessaging      => $borr->{textmessaging},
        patronupdate => $patronupdate,
+       OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;