From ba2b622135747f695bf912a828f8c8d24951a9f9 Mon Sep 17 00:00:00 2001 From: Julian FIOL Date: Tue, 18 Aug 2015 17:16:53 +0200 Subject: [PATCH] Bug 14707 : Replace UsageStatsCountry and UsageStatsLibraryType syspref from free text to a dropdown list. This will avoid syntax problems with Hea when a user will fill this 2 sysprefs The default choice for UsageStatsLibraryType and UsageStatsCountry is 'empty' Test Plan --------- 1. Create a new Koha install 2. Go to the 'Administration' page 3. Go to 'Global system preferences' 4. Go to 'Administration' 5. At the end of this page you should see a dropdown menu for - UsageStatsCountry with all countries - UsageStatsLibraryType with all type of library They both should be empty by default. --- installer/data/mysql/sysprefs.sql | 4 +- .../prog/en/modules/admin/preferences/admin.pref | 217 ++++++++++++++++++++- 2 files changed, 210 insertions(+), 11 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ac79f44..206b05e 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -457,11 +457,11 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'), ('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'), ('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'), -('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'YesNo'), +('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'Choice'), ('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'), ('UsageStatsLastUpdateTime', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'), ('UsageStatsLibraryName', '', NULL, 'The library name to be shown on Hea Koha community website', 'Free'), -('UsageStatsLibraryType', 'public', 'public|school|academic|research|private|societyAssociation|corporate|government|religiousOrg|subscription', 'The library type to be shown on the Hea Koha community website', 'Choice'), +('UsageStatsLibraryType', '', 'public|school|academic|research|private|societyAssociation|corporate|government|religiousOrg|subscription', 'The library type to be shown on the Hea Koha community website', 'Choice'), ('UsageStatsLibraryUrl', '', NULL, 'The library URL to be shown on Hea Koha community website', 'Free'), ('UseAuthoritiesForTracings','1','0','Use authority record numbers for subject tracings instead of heading strings.','YesNo'), ('UseBranchTransferLimits','0','','If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index 4ec683f..1a3dde7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -139,6 +139,204 @@ Administration: - - "The country where your library is located:" - pref: UsageStatsCountry + default: "" + choices: + "" : "" + Afghanistan : "Afghanistan" + Albania : "Albania" + Algeria : "Algeria" + Andorra : "Andorra" + Angola : "Angola" + Antigua & Deps : "Antigua & Deps" + Argentina : "Argentina" + Armenia : "Armenia" + Australia : "Australia" + Austria : "Austria" + Azerbaijan : "Azerbaijan" + Bahamas : "Bahamas" + Bahrain : "Bahrain" + Bangladesh : "Bangladesh" + Barbados : "Barbados" + Belarus : "Belarus" + Belgium : "Belgium" + Belize : "Belize" + Benin : "Benin" + Bhutan : "Bhutan" + Bolivia : "Bolivia" + Bosnia Herz. : "Bosnia Herz." + Botswana : "Botswana" + Brazil : "Brazil" + Brunei : "Brunei" + Bulgaria : "Bulgaria" + Burkina : "Burkina" + Burundi : "Burundi" + Cambodia : "Cambodia" + Cameroon : "Cameroon" + Canada : "Canada" + Cape Verde : "Cape Verde" + Centr. Afr. Rep: "Centr. Afr. Rep" + Chad : "Chad" + Chile : "Chile" + China : "China" + Colombia : "Colombia" + Comoros : "Comoros" + Congo : "Congo" + Costa Rica : "Costa Rica" + Croatia : "Croatia" + Cuba : "Cuba" + Cyprus : "Cyprus" + Czech Republic : "Czech Republic" + Denmark : "Denmark" + Djibouti : "Djibouti" + Dominica : "Dominica" + Dominican Rep. : "Dominican Rep." + East Timor : "East Timor" + Ecuador : "Ecuador" + Egypt : "Egypt" + El Salvador : "El Salvador" + Equator. Guinea: "Equator. Guinea" + Eritrea : "Eritrea" + Estonia : "Estonia" + Ethiopia : "Ethiopia" + Fiji : "Fiji" + Finland : "Finland" + France : "France" + Gabon : "Gabon" + Gambia : "Gambia" + Georgia : "Georgia" + Germany : "Germany" + Ghana : "Ghana" + Greece : "Greece" + Grenada : "Grenada" + Guatemala : "Guatemala" + Guinea : "Guinea" + Guinea-Bissau : "Guinea-Bissau" + Guyana : "Guyana" + Haiti : "Haiti" + Honduras : "Honduras" + Hungary : "Hungary" + Iceland : "Iceland" + India : "India" + Indonesia : "Indonesia" + Iran : "Iran" + Iraq : "Iraq" + Ireland : "Ireland" + Israel : "Israel" + Italy : "Italy" + Ivory Coast : "Ivory Coast" + Jamaica : "Jamaica" + Japan : "Japan" + Jordan : "Jordan" + Kazakhstan : "Kazakhstan" + Kenya : "Kenya" + Kiribati : "Kiribati" + Korea North : "Korea North" + Korea South : "Korea South" + Kosovo : "Kosovo" + Kuwait : "Kuwait" + Kyrgyzstan : "Kyrgyzstan" + Laos : "Laos" + Latvia : "Latvia" + Lebanon : "Lebanon" + Lesotho : "Lesotho" + Liberia : "Liberia" + Libya : "Libya" + Liechtenstein : "Liechtenstein" + Lithuania : "Lithuania" + Luxembourg : "Luxembourg" + Macedonia : "Macedonia" + Madagascar : "Madagascar" + Malawi : "Malawi" + Malaysia : "Malaysia" + Maldives : "Maldives" + Mali : "Mali" + Malta : "Malta" + Marshall Isl. : "Marshall Isl." + Mauritania : "Mauritania" + Mauritius : "Mauritius" + Mexico : "Mexico" + Micronesia : "Micronesia" + Moldova : "Moldova" + Monaco : "Monaco" + Mongolia : "Mongolia" + Montenegro : "Montenegro" + Morocco : "Morocco" + Mozambique : "Mozambique" + Myanmar : "Myanmar" + Namibia : "Namibia" + Nauru : "Nauru" + Nepal : "Nepal" + Netherlands : "Netherlands" + New Zealand : "New Zealand" + Nicaragua : "Nicaragua" + Niger : "Niger" + Nigeria : "Nigeria" + Norway : "Norway" + Oman : "Oman" + Pakistan : "Pakistan" + Palau : "Palau" + Panama : "Panama" + Papua N. Guinea: "Papua N. Guinea" + Paraguay : "Paraguay" + Peru : "Peru" + Philippines : "Philippines" + Poland : "Poland" + Portugal : "Portugal" + Qatar : "Qatar" + Romania : "Romania" + Russian Fed. : "Russian Fed." + Rwanda : "Rwanda" + St Kitts & Nev.: "St Kitts & Nev." + St Lucia : "St Lucia" + St Vincent : "Saint Vincent" + Samoa : "Samoa" + San Marino : "San Marino" + Sao Tome : "Sao Tome" + Saudi Arabia : "Saudi Arabia" + Senegal : "Senegal" + Serbia : "Serbia" + Seychelles : "Seychelles" + Sierra Leone : "Sierra Leone" + Singapore : "Singapore" + Slovakia : "Slovakia" + Slovenia : "Slovenia" + Solomon Islands: "Solomon Islands" + Somalia : "Somalia" + South Africa : "South Africa" + Spain : "Spain" + Sri Lanka : "Sri Lanka" + Sudan : "Sudan" + Suriname : "Suriname" + Swaziland : "Swaziland" + Sweden : "Sweden" + Switzerland : "Switzerland" + Syria : "Syria" + Taiwan : "Taiwan" + Tajikistan : "Tajikistan" + Tanzania : "Tanzania" + Thailand : "Thailand" + Togo : "Togo" + Tonga : "Tonga" + Trinidad & Tob.: "Trinidad & Tob." + Tunisia : "Tunisia" + Turkey : "Turkey" + Turkmenistan : "Turkmenistan" + Tuvalu : "Tuvalu" + Uganda : "Uganda" + Ukraine : "Ukraine" + UAE : "UAE" + United Kingdom : "United Kingdom" + USA : "USA" + Uruguay : "Uruguay" + Uzbekistan : "Uzbekistan" + Vanuatu : "Vanuatu" + Vatican City : "Vatican City" + Venezuela : "Venezuela" + Vietnam : "Vietnam" + Yemen : "Yemen" + Zambia : "Zambia" + Zimbabwe : "Zimbabwe" + - This will be shown on the Hea Koha community website. - Note that this value has no effect if the UsageStats system preference is set to "Don't share" - @@ -150,16 +348,17 @@ Administration: - - The library type - pref: UsageStatsLibraryType - default: public + default: "" choices: - public: "public" - school: "school" - academic: "academic" - research: "research" - private: "private" - societyAssociation: "society or association" - corporate: "corporate" - government: "government" + "" : "" + public : "public" + school : "school" + academic : "academic" + research : "research" + private : "private" + societyAssoc: "society or association" + corporate : "corporate" + government : "government" religiousOrg: "religious organization" subscription: "subscription" - will be shown on the Hea Koha community website. -- 2.4.5