Bugzilla – Attachment 62932 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]
[SIGNED OFF] Bug 7960: Add syspref to hide/show item type text labels in catalog
SIGNED-OFF-Bug-7960-Add-syspref-to-hideshow-item-t.patch (text/plain), 5.90 KB, created by
Katrin Fischer
on 2017-05-01 20:41:02 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 7960: Add syspref to hide/show item type text labels in catalog
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-05-01 20:41:02 UTC
Size:
5.90 KB
patch
obsolete
>From de5fc8931975b0918adbd3809dd7b25ddfb3bc25 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 19 Apr 2017 00:42:17 +0000 >Subject: [PATCH] [SIGNED OFF] 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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../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 3e0f93b..9cd61ad 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -227,6 +227,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 ab8cfa5..08255ea 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 31f7723..fe1f57c 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 b5066fe..b6b569e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1210,7 +1210,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.7.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