Bug 12260

Summary: Printing a page from bootstrap shows unnecessary links
Product: Koha Reporter: paxed <pasi.kallinen>
Component: OPACAssignee: Ava <liav>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrewfh, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, katrin.fischer, liav, martin.renvoize, stina.hallin
Version: MainKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03
Attachments: Bug 12260: Hide unnecessary links when printing
Bug 12260: Minified CSS
Bug 12260: Minified CSS
Bug 12260: Hide unnecessary links when printing
Bug 12260: Minified CSS

Description paxed 2014-05-15 08:39:04 UTC
Should add these to bootstrap/css/print.css:

#changelanguage { display: none; }
#cartmenulink { display: none; }
#listsmenu { display: none; }

Hides the language bar, the cart menu and the lists menu from printing.
Comment 1 paxed 2014-05-15 09:24:00 UTC
Actually, the complete list of stuff I added to OPACUserCSS is:

@media print {
  #changelanguage { display: none; }
  #cartmenulink { display: none; }
  #listsmenu { display: none; }
  #koha_url { display:none; }
  .breadcrumb { display:none; }
  a[href]:after { display:none; }
  #social_networks { display:none; }
  a.tag_add { display:none; }
  .results_summary.online_resources { display:none; }
  a#Normalview,
  a#MARCview,
  a#ISBDview { display:none; }
  .ui-tabs-panel { border:none !important; }
  #addcomment { display:none; }
  #ulactioncontainer { display:none; }
  #usermenu { display:none; }
  #didyoumean { display:none; }
  #top-pages, #bottom-pages { display:none; }
  #selections-toolbar { display: none; }
  .actions-menu { display: none; }
  #numresults a { display:none; }
  #numresults { float:left; }
}
Comment 2 Ava 2021-01-19 02:26:21 UTC
Created attachment 115285 [details] [review]
Bug 12260: Hide unnecessary links when printing

TEST PLAN:
try printing every page in the opac and confirm these sections don't
show

  #cartmenulink { display: none; }
  #listsmenu { display: none; }
  #koha_url { display:none; }
  .breadcrumb { display:none; }
  a[href]:after { display:none; }
  #social_networks { display:none; }
  a.tag_add { display:none; }
  .results_summary.online_resources { display:none; }
  a#Normalview,
  a#MARCview,
  a#ISBDview { display:none; }
  .ui-tabs-panel { border:none !important; }
  #addcomment { display:none; }
  #ulactioncontainer { display:none; }
  #usermenu { display:none; }
  #didyoumean { display:none; }
  #top-pages, #bottom-pages { display:none; }
  #selections-toolbar { display: none; }
  .actions-menu { display: none; }
  #numresults a { display:none; }
  #numresults { float:left; }
Comment 3 Ava 2021-01-19 02:26:25 UTC
Created attachment 115286 [details] [review]
Bug 12260: Minified CSS
Comment 4 PTFS Europe Sandboxes 2021-01-29 13:27:26 UTC
Created attachment 116028 [details] [review]
Bug 12260: Minified CSS

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
Comment 5 Stina Hallin 2021-01-29 13:34:31 UTC
Tested this using Firefox
  Didn't show after patch
  a.tag_add { display:none; }		ok
  .ui-tabs-panel { border:none !important; }	ok	
  #addcomment { display:none; }			ok	
  #didyoumean { display:none; }			ok	
  #numresults { float:left; }			ok		


  Didn't show either before or after patch
  #koha_url { display:none; }				
  .breadcrumb { display:none; }				
  #social_networks { display:none; }			
  .results_summary.online_resources { display:none; }	 - resultat and bib view
  a#Normalview,						
  a#MARCview,						
  a#ISBDview { display:none; }				
  #ulactioncontainer { display:none; }			
  #usermenu { display:none; }				
  #top-pages, #bottom-pages { display:none; }		
  #selections-toolbar { display: none; }		
  .actions-menu { display: none; }			
  #numresults a { display:none; }			

  Didn't find 
  a[href]:after { display:none; }	

Maybe  #moresearches should also be removed?
Comment 6 Martin Renvoize 2021-02-02 10:51:37 UTC
Created attachment 116197 [details] [review]
Bug 12260: Hide unnecessary links when printing

TEST PLAN:
try printing every page in the opac and confirm these sections don't
show

  #cartmenulink { display: none; }
  #listsmenu { display: none; }
  #koha_url { display:none; }
  .breadcrumb { display:none; }
  a[href]:after { display:none; }
  #social_networks { display:none; }
  a.tag_add { display:none; }
  .results_summary.online_resources { display:none; }
  a#Normalview,
  a#MARCview,
  a#ISBDview { display:none; }
  .ui-tabs-panel { border:none !important; }
  #addcomment { display:none; }
  #ulactioncontainer { display:none; }
  #usermenu { display:none; }
  #didyoumean { display:none; }
  #top-pages, #bottom-pages { display:none; }
  #selections-toolbar { display: none; }
  .actions-menu { display: none; }
  #numresults a { display:none; }
  #numresults { float:left; }

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-02-02 10:51:40 UTC
Created attachment 116198 [details] [review]
Bug 12260: Minified CSS

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2021-02-02 10:52:17 UTC
Works as expected, no regressions.

Passing QA
Comment 9 Jonathan Druart 2021-02-08 16:04:30 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 10 Fridolin Somers 2021-02-12 13:51:51 UTC
Small useful enhancement asked a long time ago.
I choose to backport.

Pushed to 20.11.x for 20.11.03
Comment 11 Andrew Fuerste-Henry 2021-02-18 13:28:17 UTC
Not backporting for 20.05, but please ask if needed