From 39ff256231f8cbcf250885ba608ba3304aed825d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 18 Oct 2023 16:00:45 +0000 Subject: [PATCH] Bug 35097: Use country-list.inc to display choices for UsageStatsCountry preference This patch updates the system preferences interface so that it uses country-list.inc for the selection of countries for the UsageStatsCountry preference. To test, apply the patch and restart services. - Go to Administration -> System preferences and search for "UsageStatsCountry" - The dropdown of countries should look correct. - Select a country, save, and confirm that your choice is saved correctly. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../prog/en/modules/admin/preferences.tt | 12 ++ .../en/modules/admin/preferences/admin.pref | 198 +----------------- 2 files changed, 13 insertions(+), 197 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index f18de5130e..0321b61679 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -196,6 +196,18 @@ [% END # IF language.plural %] [% END # FOREACH language %] + [% ELSIF ( CHUNK.type_countries ) %] + [% PROCESS 'country-list.inc' %] + [% END %] [% END %] [% IF LINE.WARNINGS.size %] 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 84238d0e53..f1522c8caa 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 @@ -236,203 +236,7 @@ Administration: - - "The country where your library is located to be shown on the Hea Community website: " - 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" + type: countries - . This will be shown on the Hea Koha community website. -
NOTE: This value has no effect if the UsageStats system preference is set to "No" (don't share). -- 2.39.5