use C4::ClassSource;
use C4::Log;
use C4::Output;
-use C4::Context;
# use Smart::Comments;
# FIXME, shouldnt we store this stuff in the systempreferences table?
+# FIXME: This uses hash in a backwards way. What we really want is:
+# $tabsysprefs{key} = $array_ref;
+# like
+# $tabsysprefs{Cataloguing} = [qw(autoBarcode ISBD marc ...)];
+#
+# Because some things *should* be on more than one tab.
+# And the tabname is the unique part (the key).
+
my %tabsysprefs;
# Acquisitions
$tabsysprefs{acquisitions}="Acquisitions";
$tabsysprefs{gist}="Acquisitions";
$tabsysprefs{emailPurchaseSuggestions}="Acquisitions";
+ $tabsysprefs{RenewSerialAddsSuggestion}="Acquisitions";
+ $tabsysprefs{serialsadditems}="Acquisitions";
# Admin
$tabsysprefs{singleBranchMode}="Admin";
$tabsysprefs{SessionStorage}="Admin";
$tabsysprefs{noItemTypeImages}="Admin";
$tabsysprefs{OPACBaseURL}="Admin";
- $tabsysprefs{CheckSpecificUserPermissions}="Admin";
+ $tabsysprefs{GranularPermissions}="Admin";
# Authorities
$tabsysprefs{authoritysep}="Authorities";
$tabsysprefs{LabelMARCView}="Cataloguing";
$tabsysprefs{marc}="Cataloguing";
$tabsysprefs{marcflavour}="Cataloguing";
- $tabsysprefs{serialsadditems}="Cataloguing";
$tabsysprefs{MARCOrgCode}="Cataloguing";
$tabsysprefs{z3950AuthorAuthFields}="Cataloguing";
$tabsysprefs{z3950NormalizeAuthor}="Cataloguing";
$tabsysprefs{previousIssuesDefaultSortOrder}="Circulation";
$tabsysprefs{todaysIssuesDefaultSortOrder}="Circulation";
$tabsysprefs{HomeOrHoldingBranch}="Circulation";
+ $tabsysprefs{RandomizeHoldsQueueWeight}="Circulation";
+ $tabsysprefs{StaticHoldsQueueWeight}="Circulation";
+ $tabsysprefs{AllowOnShelfHolds}="Circulation";
+ $tabsysprefs{AllowHoldsOnDamagedItems}="Circulation";
# Staff Client
$tabsysprefs{TemplateEncoding}="StaffClient";
$tabsysprefs{NoReturnSetLost}="Patrons";
$tabsysprefs{MaxFine}="Patrons";
$tabsysprefs{NotifyBorrowerDeparture}="Patrons";
+ $tabsysprefs{AddPatronLists}="Patrons";
$tabsysprefs{PatronsPerPage}="Patrons";
-
-# FRBR
- $tabsysprefs{FRBRizeEditions}="FRBR";
- $tabsysprefs{XISBN}="FRBR";
- $tabsysprefs{OCLCAffiliateID}="FRBR";
- $tabsysprefs{XISBNDailyLimit}="FRBR";
- $tabsysprefs{PINESISBN}="FRBR";
- $tabsysprefs{ThingISBN}="FRBR";
- $tabsysprefs{OPACFRBRizeEditions}="FRBR";
+ $tabsysprefs{ExtendedPatronAttributes}="Patrons";
+ $tabsysprefs{AutoEmailOpacUser}="Patrons";
+ $tabsysprefs{AutoEmailPrimaryAddress}="Patrons";
+ $tabsysprefs{EnhancedMessagingPreferences}="Patrons";
# I18N/L10N
$tabsysprefs{dateformat}="I18N/L10N";
$tabsysprefs{sortbynonfiling}="Searching";
$tabsysprefs{QueryAutoTruncate}="Searching";
$tabsysprefs{QueryRemoveStopwords}="Searching";
-
-# Amazon.com
- $tabsysprefs{AmazonContent}="Amazon";
- $tabsysprefs{AWSAccessKeyID}="Amazon";
- $tabsysprefs{AmazonLocale}="Amazon";
- $tabsysprefs{AmazonAssocTag}="Amazon";
- $tabsysprefs{AmazonSimilarItems}="Amazon";
- $tabsysprefs{OPACAmazonContent}="Amazon";
- $tabsysprefs{OPACAmazonSimilarItems}="Amazon";
+ $tabsysprefs{AdvancedSearchTypes}="Searching";
+
+# EnhancedContent
+ $tabsysprefs{AmazonContent}="EnhancedContent";
+ $tabsysprefs{AWSAccessKeyID}="EnhancedContent";
+ $tabsysprefs{AmazonLocale}="EnhancedContent";
+ $tabsysprefs{AmazonAssocTag}="EnhancedContent";
+ $tabsysprefs{AmazonSimilarItems}="EnhancedContent";
+ $tabsysprefs{OPACAmazonContent}="EnhancedContent";
+ $tabsysprefs{OPACAmazonSimilarItems}="EnhancedContent";
+
+# Baker & Taylor
+ $tabsysprefs{BakerTaylorBookstoreURL} = 'EnhancedContent';
+ $tabsysprefs{BakerTaylorEnabled} = 'EnhancedContent';
+ $tabsysprefs{BakerTaylorPassword} = 'EnhancedContent';
+ $tabsysprefs{BakerTaylorUsername} = 'EnhancedContent';
+# FRBR
+ $tabsysprefs{FRBRizeEditions}="EnhancedContent";
+ $tabsysprefs{XISBN}="EnhancedContent";
+ $tabsysprefs{OCLCAffiliateID}="EnhancedContent";
+ $tabsysprefs{XISBNDailyLimit}="EnhancedContent";
+ $tabsysprefs{PINESISBN}="EnhancedContent";
+ $tabsysprefs{ThingISBN}="EnhancedContent";
+ $tabsysprefs{OPACFRBRizeEditions}="EnhancedContent";
+# Tags
+ $tabsysprefs{TagsEnabled} = 'EnhancedContent';
+ $tabsysprefs{TagsExternalDictionary} = 'EnhancedContent';
+ $tabsysprefs{TagsInputOnDetail} = 'EnhancedContent';
+ $tabsysprefs{TagsInputOnList} = 'EnhancedContent';
+ $tabsysprefs{TagsShowOnDetail} = 'EnhancedContent';
+ $tabsysprefs{TagsShowOnList} = 'EnhancedContent';
+ $tabsysprefs{TagsModeration} = 'EnhancedContent';
+ $tabsysprefs{GoogleJackets} = 'EnhancedContent';
+ $tabsysprefs{AuthorisedValueImages} = "EnhancedContent";
# OPAC
$tabsysprefs{BiblioDefaultView}="OPAC";
$tabsysprefs{LibraryName}="OPAC";
$tabsysprefs{opaccolorstylesheet}="OPAC";
$tabsysprefs{opaccredits}="OPAC";
- $tabsysprefs{opaclargeimage}="OPAC";
$tabsysprefs{opaclayoutstylesheet}="OPAC";
$tabsysprefs{OpacNav}="OPAC";
$tabsysprefs{opacsmallimage}="OPAC";
$tabsysprefs{opacuserjs}="OPAC";
$tabsysprefs{SubscriptionHistory}="OPAC";
$tabsysprefs{opacheader}="OPAC";
-
- $tabsysprefs{hideBiblioNumber}="OPAC";
$tabsysprefs{noOPACUserLogin}="OPAC";
+ $tabsysprefs{hideBiblioNumber}="OPAC";
$tabsysprefs{OPACDisplayExtendedSubInfo}="OPAC";
$tabsysprefs{OpacMainUserBlock}="OPAC";
$tabsysprefs{OPACSubscriptionDisplay}="OPAC";
$tabsysprefs{OpacBrowser}="OPAC";
$tabsysprefs{kohaspsuggest} = "OPAC";
$tabsysprefs{OpacRenewalAllowed} = "OPAC";
+ $tabsysprefs{OPACItemHolds} = "OPAC";
+ $tabsysprefs{OPACGroupResults}="OPAC";
+ $tabsysprefs{XSLTDetailsDisplay}="OPAC";
+ $tabsysprefs{XSLTResultsDisplay}="OPAC";
# LOGFeatures
- $tabsysprefs{CataloguingLog} = "LOGFeatures";
- $tabsysprefs{BorrowersLog} = "LOGFeatures";
- $tabsysprefs{SubscriptionLog} = "LOGFeatures";
- $tabsysprefs{IssueLog} = "LOGFeatures";
- $tabsysprefs{ReturnLog} = "LOGFeatures";
- $tabsysprefs{LetterLog} = "LOGFeatures";
- $tabsysprefs{FinesLog} = "LOGFeatures";
+ $tabsysprefs{CataloguingLog} = "Logs";
+ $tabsysprefs{BorrowersLog} = "Logs";
+ $tabsysprefs{SubscriptionLog} = "Logs";
+ $tabsysprefs{IssueLog} = "Logs";
+ $tabsysprefs{ReturnLog} = "Logs";
+ $tabsysprefs{LetterLog} = "Logs";
+ $tabsysprefs{FinesLog} = "Logs";
# OAI-PMH variables
$tabsysprefs{'OAI-PMH'} = "OAI-PMH";
$tabsysprefs{'OAI-PMH:Set'} = "OAI-PMH";
$tabsysprefs{'OAI-PMH:Subset'} = "OAI-PMH";
-
sub StringSearch {
my ($searchstring,$type)=@_;
my $dbh = C4::Context->dbh;
while (my $data=$sth->fetchrow_hashref){
$data->{value} =~ s/</</g;
$data->{value} =~ s/>/>/g;
- $data->{value}=substr($data->{value},0,100)."..." if length($data->{value}) >100;
+ $data->{value}=substr($data->{value},0,60)."..." if length($data->{value}) >60;
push(@results,$data);
$cnt++;
}
while (my $data=$sth->fetchrow_hashref){
$data->{value} =~ s/</</g;
$data->{value} =~ s/>/>/g;
- $data->{value}=substr($data->{value},0,100)."..." if length($data->{value}) >100;
+ $data->{value}=substr($data->{value},0,60)."..." if length($data->{value}) >60;
push(@results,$data);
$cnt++;
}
my $sth=$dbh->prepare($strsth);
$sth->execute();
while (my $data=$sth->fetchrow_hashref){
- $data->{value}=substr($data->{value},0,100);
+ $data->{value}=substr($data->{value},0,60);
push(@results,$data);
$cnt++;
}