Bug 5897: Add new syspref ShowReviewer

This patch adds a new syspref ShowReviewer.

If ON (default) the reviewer/author of an OPAC comment will show.
If OFF the reviewer's name will be hidden.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Katrin Fischer 2011-03-26 06:26:34 -04:00 committed by Chris Cormack
parent 0a429b78d8
commit 284cfbc234
11 changed files with 24 additions and 0 deletions

View file

@ -437,6 +437,7 @@ sub get_template_and_user {
opacuserjs => C4::Context->preference("opacuserjs"),
opacuserlogin => "" . C4::Context->preference("opacuserlogin"),
reviewson => C4::Context->preference("reviewson"),
ShowReviewer => C4::Context->preference("ShowReviewer"),
suggestion => "" . C4::Context->preference("suggestion"),
virtualshelves => "" . C4::Context->preference("virtualshelves"),
OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),

View file

@ -97,6 +97,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory',';','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog',1,'If ON, enables subscriptions log',NULL,'YesNo');

View file

@ -98,6 +98,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory',';','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog',1,'If ON, enables subscriptions log',NULL,'YesNo');

View file

@ -110,6 +110,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry', '0', 'Si ce paramètre est positionné, la date de retour d''un document ne peut pas dépasser la date de fin d''inscription d''un lecteur.', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog', '0', 'Activer ce paramètre pour enregistrer les actions sur la circulation (les retours)', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson', '1', 'Active ou non les commentaires sur notice à l''OPAC', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SessionStorage', 'mysql', 'Utiliser mySQL ou un fichier temporaire pour stocker les informations de session. mySQL pose problème dans certains cas en France. Si vous avez des problèmes de perte d''identifiant, choisissez tmp', 'mysql|tmp', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory', 'simplified', 'Ce paramètre définit la vue par défaut de l''état de collection, pour les abonnements. Habituellement, c''est "simplified". Choisissez "full" pour avoir l''état de collection complet par défaut', 'simplified|full', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog', '0', 'Activer ce paramètre pour enregistrer les actions sur le bulletinage', '', 'YesNo');

View file

@ -166,6 +166,7 @@ insert into `systempreferences` (`variable`, `value`, `options`, `explanation`,
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('ReturnBeforeExpiry','1','','Se su ON, la durata del prestito sarà anticipata se la data di rientro prevista è successiva alla scadenza della tessera dell\'utente.','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('ReturnLog','1','','Se su ON, abilita i log delle restituzioni dal prestito.','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('reviewson','1','','Se ON, abilita la possibilità per gli utenti a inserire recensioni di record bibliografici nell\'OPAC.','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('RoutingSerials','1','','Se ON, il serial routing è attivato.','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('SearchMyLibraryFirst','0','','Se ON, le ricerche in OPAC restituiranno risultati limitatamente alla biblioteca impostata di default dellutente se questi si è loggato.','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('SessionStorage','mysql','mysql|Pg|tmp','Per usare un database o un file temporaneo per l\'archiviazione dei dati della sessione.','Choice');
@ -291,3 +292,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice');

View file

@ -96,6 +96,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory',';','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog',1,'If ON, enables subscriptions log',NULL,'YesNo');

View file

@ -125,6 +125,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory',';','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog',1,'If ON, enables subscriptions log',NULL,'YesNo');
@ -358,3 +359,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice');

View file

@ -124,6 +124,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory',';','Define the display preference for serials issue history in OPAC','simplified|full','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog',1,'If ON, enables subscriptions log',NULL,'YesNo');

View file

@ -4187,6 +4187,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowSelfCheckReturns',0,'If enabled, patrons may return items through the Web-based Self Checkout','','YesNo')");
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('SelfCheckHelpMessage','','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','70|10','Textarea')");
print "Upgrade to $DBversion done ( Add Self-checkout by Login system preferences )\n";
}
$DBversion = "3.03.00.XXX";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC',NULL,'YesNo');");
print "Upgrade to $DBversion done (Add syspref ShowReviewer)\n";
SetVersion ($DBversion);
}

View file

@ -239,6 +239,12 @@ OPAC:
yes: Allow
no: "Don't allow"
- patrons to make comments on items on the OPAC.
-
- pref: ShowReviewer
choices:
yes: Show
no: Hide
- reviewer's name above comments in OPAC.
-
- pref: RequestOnOpac
choices:

View file

@ -668,12 +668,14 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
</p></div>
<!-- TMPL_ELSE -->
<div class="commentline">
<!-- TMPL_IF NAME="ShowReviewer" -->
<h5>
Comment by
<!-- TMPL_VAR NAME="title" -->
<!-- TMPL_VAR NAME="firstname" -->
<!-- TMPL_VAR NAME="surname" -->
</h5>
<!-- /TMPL_IF -->
<small><!-- TMPL_VAR NAME="datereviewed" --></small>
<p>
<!-- TMPL_VAR NAME="review" ESCAPE=0 -->