From 4073b27c503f8192a144b4762e6ff5d40576627f Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Sat, 31 May 2008 00:01:51 -0500 Subject: [PATCH] Wrap up Tags integration - add sysprefs for new installs. Note that when the user is not logged in, the Tags input box/button will not display. The user will see a message telling them to log in to add tags. However, in order to keep the results display clean, the message will display only once, utilizing the loop context variable "__first__". Useful stuff! I also threw OPACShelfBrowser sysprefs.sql, but it still needs added to updatedatabase. Signed-off-by: Joshua Ferraro --- .../data/mysql/en/mandatory/sysprefs.sql | 24 ++++++++++++++++--- installer/data/mysql/updatedatabase.pl | 2 +- .../prog/en/modules/tools/tools-home.tmpl | 5 ++++ .../prog/en/modules/opac-detail.tmpl | 4 ++++ .../prog/en/modules/opac-results.tmpl | 10 ++++---- 5 files changed, 37 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index ab52bc5b1f..93feea2ba6 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -185,8 +185,26 @@ INSERT INTO `systempreferences` (variable, value,options,type, explanation) VALU INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RenewSerialAddsSuggestion','0','If ON, adds a new suggestion at serial subscription renewal',NULL,'YesNo'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('GoogleJackets','0','if ON, displays jacket covers from Google Books API',NULL,'YesNo'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'TextArea'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GoogleJackets','0','if ON, displays jacket covers from Google Books API',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RandomizeHoldsQueueWeight','0','if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaticHoldsQueueWeight','0','Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective',NULL,'TextArea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailOpacUser','0','Sends notification emails containing new account details to patrons - when account is created.',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoEmailPrimaryAddress','0','Defines the default email address where \'Account Details\' emails are sent.','email|emailpro|B_email|cardnumber|OFF','Choice'); + +-- Tags and BakerTaylor (note field order differs from above) +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES + ('BakerTaylorBookstoreURL','','','URL template for \"My Libary Bookstore\" links, to which the \"key\" value is appended, and \"https://\" is prepended. It should include your hostname and \"Parent Number\". Make this variable empty to turn MLB links off.
Example: ocls.mylibrarybookstore.com/MLB/actions/searchHandler.do?nextPage=bookDetails&parentNum=10923&key=',''), + ('BakerTaylorEnabled','0','','Enable or disable all Baker & Taylor features.','YesNo'), + ('BakerTaylorPassword','','','Baker & Taylor Password for Content Cafe (external content)','Textarea'), + ('BakerTaylorUsername','','','Baker & Taylor Username for Content Cafe (external content)','Textarea'), + ('TagsEnabled','1','','Enables or disables all tagging features. This is the main switch for tags.','YesNo'), + ('TagsExternalDictionary',NULL,'','Path on server to local ispell executable, used to set $Lingua::Ispell::path
This dictionary is used as a \"whitelist\" of pre-allowed tags.',''), + ('TagsInputOnDetail','1','','Allow users to input tags from the detail page.', 'YesNo'), + ('TagsInputOnList', '0','','Allow users to input tags from the search results list.', 'YesNo'), + ('TagsModeration', NULL,'','Require tags from patrons to be approved before becoming visible.','YesNo'), + ('TagsShowOnDetail','10','','Number of tags to display on detail page. 0 is off.', 'Integer'), + ('TagsShowOnList', '6','','Number of tags to display on search results list. 0 is off.','Integer'); + +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OPACShelfBrowser','1','','Enable/disable Shelf Browser on item details page','YesNo'); + +-- FIXME: add FrameworksLoaded, noOPACUserLogin, ReadingHistory ? diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e53f3b83bd..414d5cee48 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1386,7 +1386,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { ('TagsExternalDictionary',NULL,'','Path on server to local ispell executable, used to set $Lingua::Ispell::path
This dictionary is used as a \"whitelist\" of pre-allowed tags.',''), ('TagsInputOnDetail','1','','Allow users to input tags from the detail page.', 'YesNo'), ('TagsInputOnList', '0','','Allow users to input tags from the search results list.', 'YesNo'), - ('TagsModeration', NULL,'','(unimplemented) Requires tags from patrons to be approved before becoming visible.','YesNo'), + ('TagsModeration', NULL,'','Require tags from patrons to be approved before becoming visible.','YesNo'), ('TagsShowOnDetail','10','','Number of tags to display on detail page. 0 is off.', 'Integer'), ('TagsShowOnList', '6','','Number of tags to display on search results list. 0 is off.','Integer') #); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl index 2faa5cf11a..57b52bb0d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl @@ -33,6 +33,11 @@
Comments
Moderate patron comments
+ + +
Tags
+
Moderate patron tags
+
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 540263de5e..6655f29a9b 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -191,6 +191,7 @@ No tags for this title. + Add
" method="post" action="/cgi-bin/koha/opac-tags.pl" id="tagform"> " id="newtag" maxlength="100" /> @@ -201,6 +202,9 @@ Tag status here.
+ + Log in to add tags. +
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index 797240d7fe..bf452d355c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -243,18 +243,17 @@ $(document).ready(function(){ - - -
+
Tags: + " method="post" action="/cgi-bin/koha/opac-tags.pl"> " id="newtag" maxlength="100" /> @@ -263,8 +262,11 @@ $(document).ready(function(){ _status" class="tagstatus" style="display:none;"> Tag status here. + Log in to add tags. + -
+ +
Match: -- 2.39.5