Bugzilla – Attachment 62344 Details for
Bug 7960
Choice to not show the text labels for item types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7960: Add syspref to hide/show item type text labels in catalog
Bug-7960-Add-syspref-to-hideshow-item-type-text-la.patch (text/plain), 5.83 KB, created by
Aleisha Amohia
on 2017-04-19 00:46:12 UTC
(
hide
)
Description:
Bug 7960: Add syspref to hide/show item type text labels in catalog
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-04-19 00:46:12 UTC
Size:
5.83 KB
patch
obsolete
>From 580579026253ff6b595ab7d7d86d3d364197b1b0 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 19 Apr 2017 00:42:17 +0000 >Subject: [PATCH] Bug 7960: Add syspref to hide/show item type text labels in > catalog > >To test: >1) Apply patch and update database >2) Go to Admin -> Sysprefs -> Find system preference 'ItemTypeText' >3) Should have default value 'Show'. Change to 'Don't show'. >4) Make sure 'noItemTypeImages' is enabled. >5) Search for a record in catalog on staff client. Go to detail page. >6) Confirm the text label for the item type is hidden, but the item type >image still shows. >7) Search for a record in catalog on OPAC. Go to detail page. >8) Confirm the text label for the item type is hidden, but the item type >image still shows. >9) Go back to sysprefs and set 'ItemTypeText' to 'Show'. >10) Confirm text labels now show on detail pages. > >Sponsored-by: Catalyst IT >--- > .../mysql/atomicupdate/bug_7690_-_add_ItemTypeText_syspref.sql | 1 + > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/admin.pref | 7 +++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- > 5 files changed, 11 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_7690_-_add_ItemTypeText_syspref.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_7690_-_add_ItemTypeText_syspref.sql b/installer/data/mysql/atomicupdate/bug_7690_-_add_ItemTypeText_syspref.sql >new file mode 100644 >index 0000000..5549069 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_7690_-_add_ItemTypeText_syspref.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('ItemTypeText', 1, NULL, 'Show/hide the item type text label. It is recommended to have ItemTypeText enabled if noItemTypeImages is disabled.', 'YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 64aa493..c19b189 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -226,6 +226,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('itemBarcodeFallbackSearch','',NULL,'If set, uses scanned item barcodes as a catalogue search if not found as barcodes','YesNo'), > ('itemBarcodeInputFilter','','whitespace|T-prefix|cuecat|libsuite8|EAN13','If set, allows specification of a item barcode input filter','Choice'), > ('itemcallnumber','082ab',NULL,'The MARC field/subfield that is used to calculate the itemcallnumber (Dewey would be 082ab or 092ab; LOC would be 050ab or 090ab) could be 852hi from an item record','free'), >+('ItemTypeText', 1, NULL, 'Show/hide the item type text label. It is recommended to have ItemTypeText enabled if noItemTypeImages is disabled.', 'YesNo'), > ('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'), > ('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'), > ('language','en',NULL,'Set the default language in the staff client.','Languages'), >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 ba49128..d9fe912 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 >@@ -2,6 +2,13 @@ Administration: > # Only used internally, omitted: FrameworksLoaded, Version > Interface options: > - >+ - pref: ItemTypeText >+ default: 1 >+ choices: >+ yes: "Show" >+ no: "Don't show" >+ - " itemtype text labels in the catalog. NOTE: It is recommended to have ItemTypeText enabled if noItemTypeImages is disabled." >+ - > - "Email address for the administrator of Koha: " > - pref: KohaAdminEmailAddress > class: email >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index b9bf9ed..117ab82 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -666,7 +666,7 @@ function verify_images() { > [% IF !noItemTypeImages && item.imageurl %] > <img src="[% item.imageurl %]" alt="[% item.translated_description %]" title="[% item.translated_description %]" /> > [% END %] >- [% item.translated_description %] >+ [% IF ( Koha.Preference('ItemTypeText') ) %][% item.translated_description %][% END %] > </td> > [% END %] > <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) %] [% END %]</td> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index ca6e1b1..59acde7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1199,7 +1199,7 @@ > <img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" /> > [% END %] > [% END %] >- [% ITEM_RESULT.description %] >+ [% IF ( Koha.Preference('ItemTypeText') ) %][% ITEM_RESULT.description %][% END %] > </td> > [% END %] > [% UNLESS singleBranchMode %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7960
:
9189
|
62344
|
62807
|
62932
|
62933
|
76608
|
83853
|
84219
|
98778
|
137760
|
140217
|
140237
|
141284
|
141286