Created attachment 62344 [details] [review] 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 This looks fine to me but it doesn't cover all item type image instances. Searching the templates for ".imageurl" shows several others. Created attachment 62807 [details] [review] Bug 7960: [FOLLOW-UP] Adding to places missed in first patch This patch adds the use of the syspref to: = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Created attachment 62932 [details] [review] [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> Created attachment 62933 [details] [review] [SIGNED OFF] Bug 7960: [FOLLOW-UP] Adding to places missed in first patch This patch adds the use of the syspref to: = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice one to test! 2 notes: - In order to see some of the changes you need to set item-level_itypes to 'biblio record'. - In the OPAC the 'most popular' page currently displays the biblio level itemtype description. A later patch could make it show the icon and add support for the system preferences. Have the impression that we should not hide labels with a syspref but resolve this with custom css. Please convince me that I am wrong. (In reply to Marcel de Rooy from comment #7) > Have the impression that we should not hide labels with a syspref but > resolve this with custom css. Please convince me that I am wrong. The syspref just provides the functionality for the library to hide or show the text, without having to play around with css or ask us to do it for them. I don't think it's fair to assume that librarians know how to write css. (In reply to Aleisha Amohia from comment #8) > (In reply to Marcel de Rooy from comment #7) > > Have the impression that we should not hide labels with a syspref but > > resolve this with custom css. Please convince me that I am wrong. > > The syspref just provides the functionality for the library to hide or show > the text, without having to play around with css or ask us to do it for > them. I don't think it's fair to assume that librarians know how to write > css. We have to find a balance between adding a syspref for showing/hiding elements and css customization. Yes, not each librarian writes css. I will not block this patch and change the status to Signed off again. Another QA opinion please. (In reply to Marcel de Rooy from comment #9) > (In reply to Aleisha Amohia from comment #8) > > (In reply to Marcel de Rooy from comment #7) > > > Have the impression that we should not hide labels with a syspref but > > > resolve this with custom css. Please convince me that I am wrong. > > > > The syspref just provides the functionality for the library to hide or show > > the text, without having to play around with css or ask us to do it for > > them. I don't think it's fair to assume that librarians know how to write > > css. > > We have to find a balance between adding a syspref for showing/hiding > elements and css customization. Yes, not each librarian writes css. I will > not block this patch and change the status to Signed off again. Another QA > opinion please. I must agree, my first thought was to ask why not just add a class to make it easy to hide with css. Agreeing with other QA here, moving to failed QA > add a class to make it easy to hide with css.
+1
Not another system preference please :(
Actually you may use a trick by painting text with background color :
#holdings_table .itype { color: #F3F3F3; }
Or maybe one could change the existing preference noItemTypeImages to use choices : image and text, image only, text only. My2c Created attachment 76608 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Forgot to make original patches obsolete. Ready to test. Seems to unfortunately not apply anymore because of additional '| html' filters in the most recent templates. Created attachment 83853 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Created attachment 84219 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Comment on attachment 84219 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS Review of attachment 84219 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ +121,4 @@ > <tr> > [% FOREACH itemtypeloo IN advsearchloo.code_loop %] > <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />[% END %] [% END %] > + <span class="itypetext">[% itemtypeloo.description | html %]<span></label></td> Bad ending tag - missing "/" ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ +534,4 @@ > [% IF ( onloan_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% onloan_items_loo.itemcallnumber |uri %]%22">[% onloan_items_loo.itemcallnumber | html %]</a>][% END %] > ([% onloan_items_loo.count | html %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue | html %] long overdue[% END %]) date due: [% onloan_items_loo.due_date | $KohaDates %] > [% IF item_level_itypes && onloan_items_loo.description %] > +<<<<<<< HEAD Merge markers @@ +566,4 @@ > [% IF ( other_items_loo.notforloan ) %][% other_items_loo.notforloan | html %][% END %] > ([% other_items_loo.count | html %]) > [% IF item_level_itypes && other_items_loo.description %] > +<<<<<<< HEAD Merge markers Created attachment 98778 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Hi Aleisha. Everything looks okay to me except for the details page for records on the staff interface from search results. I think this is this file about line 269: koha/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt Note for testing: - Some icons only display for some pages if the item-level_itypes system preference is set to bibliographic record Created attachment 137760 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-results-grouped.tt - opac-shelves.tt - opac-user.tt Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> I've tested, but haven't signed off. Notes from testing (using koha-testing-docker): 1. Some icons only display for some pages if the item-level_itypes system preference is set to bibliographic record. 2. May also need to set the noItemTypeImages (for staff interface) or OpacNoItemTypeImages system preferences to 'Show'. 3. For the staff interface and with the CSS to hide the text description: . catalogue/detail.tt: see note for staff interface and catalogue/detail.tt - can't hide text description for 'Itemtype' shown on the details page before the holdings tab 4. For the OPAC, I'm not sure how to test opac-results-grouped.tt: there is no opac-results-grouped.tt file, item type icon and text show for normal OPAC search results when OPACnoItemTypeImages system preference is set to 'Show', with OPAC CSS to hide no text description is shown in search results (but icon is). 5. How to access pages to test, along with some notes: = STAFF INTERFACE = - catalogue/advsearch.tt (Home page > Advanced search) - catalogue/detail.tt (view the details page for a record with items - note: . if item-level_itypes = specific item and noItemTypeImages set to 'Don't show' ==> text only descriptions shown for both . if item-level_itypes = specific item and noItemTypeImages set to 'Show' ==> icons and text description shown for both . if item-level_itypes = bibliographic record and noItemTypeImages set to 'Show' ==> icons and text description only shown for the record, the Item types column under the holdings tab is not shown . if item-level_itypes = bibliographic record and noItemTypeImages set to 'Don't show' ==> text description only for the record, the Item types column under the holdings tab is not shown - catalogue/results.tt (set noItemTypeImages system preference to 'Show', search in the staff interface) - reserve/request.tt (place a hold for a record, select a patron, item type column displayed for specific items) - virtualshelves/shelves.tt (set noItemTypeImages to 'Show', set item-level_itypes to bibliographic record: create and add items to a public list, Lists > select the list) = OPAC = - opac-advsearch.tt (advanced search page) - opac-detail.tt (view the details page for a record with items) - opac-readingrecord.tt (check out some items for a patron, go to Your account > your checkout history for that patron) - opac-reserve.tt (place a hold for a record, select 'a specific item', table lists the item type) - opac-results-grouped.tt (not sure how to test this on, no longer an opac-results-grouped.tt file; item type icon and text show on normal OPAC search results when OPACnoItemTypeImages system preference set to 'Show') - opac-shelves.tt (set OPACnoItemTypeImages to 'Show', set item-level_itypes to bibliographic record: add items to a list, view list More > Lists > select the list) - opac-user.tt (set OPACnoItemTypeImages to 'Show', set item-level_itypes to bibliographic record: check some items to a patron, go to Your account > summary for the patron) 6. Personally, I think enhancing the existing system preferences item-level_itypes, noItemTypeImages and OpacNoItemTypeImages would be a better way to go. But having some way to do it is better than no way... Created attachment 140217 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-shelves.tt - opac-user.tt Refer to David Nind's test notes from Comment 23 for a more detailed plan for acessing these pages. Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Have rebased and addressed: (In reply to David Nind from comment #23) > I've tested, but haven't signed off. > > 3. For the staff interface and with the CSS to hide the text description: > . catalogue/detail.tt: see note for staff interface and > catalogue/detail.tt - can't hide text description for 'Itemtype' shown on > the details page before the holdings tab > Fixed this > 4. For the OPAC, I'm not sure how to test opac-results-grouped.tt: there is > no opac-results-grouped.tt file, item type icon and text show for normal > OPAC search results when OPACnoItemTypeImages system preference is set to > 'Show', with OPAC CSS to hide no text description is shown in search results > (but icon is). > From an old version of Koha, have removed this from the test plan Created attachment 140237 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-shelves.tt - opac-user.tt Refer to David Nind's test notes from Comment 23 for a more detailed plan for acessing these pages. Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: David Nind <david@davidnind.com> Just realized that I tested this for the first time in 2017... ouch. Created attachment 141284 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-shelves.tt - opac-user.tt Refer to David Nind's test notes from Comment 23 for a more detailed plan for acessing these pages. Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Please rebase ASAP. Created attachment 141286 [details] [review] Bug 7960: Add class to item type descriptions so they can be hidden with CSS This patch adds the class "itypetext" around item type descriptions so they can easily be hidden with CSS. To test: 1. Navigate to the pages listed below to confirm that the text descriptions do show. 2. Add .itypetext { display:none; } to IntranetUserCSS and OPACUserCSS system preferences and save. 3. Go back to the pages listed below and confirm that the text descriptions DO NOT show. = STAFF CLIENT = - catalogue/advsearch.tt - catalogue/detail.tt - catalogue/results.tt - reserve/request.tt - virtualshelves/shelves.tt = OPAC = - opac-advsearch.tt - opac-detail.tt - opac-readingrecord.tt - opac-reserve.tt - opac-shelves.tt - opac-user.tt Refer to David Nind's test notes from Comment 23 for a more detailed plan for acessing these pages. Sponsored-by: Catalyst IT Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Patch now applies - have changed status back to Passed QA. Pushed to master for 22.11. Nice work everyone, thanks! |
Created attachment 9189 [details] label and icon It would be nice if on the opac there was a way to choose not to show the text labels next to item types. For libraries with clear types this text looks ugly and many have asked to have it removed.