Summary: | Clean up printing of lists in OPAC | ||
---|---|---|---|
Product: | Koha | Reporter: | Christopher Brannon <cbrannon> |
Component: | Lists | Assignee: | Liz Rea <liz> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, katrin.fischer, m.de.rooy, mtompset, nengard, tomascohen, veron, wizzyrea |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14211 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Sections that shouldn't print when printing list
PDF output of print Bug 11574 - Clean up lists interface for printing Bug 11574 - Clean up lists interface for printing [Signed-off] Bug 11574 - Clean up lists interface for printing Bug 11574 - Clean up Printing Lists [PASSED QA] Bug 11574 - Clean up Printing Lists |
Created attachment 24482 [details]
PDF output of print
Christopher,
Like this?
Liz
Created attachment 24483 [details] [review] Bug 11574 - Clean up lists interface for printing Removes extraneous stuff from prints - toolbars, breadcrumbs, etc. To test: 1. make a list 2. print it to a file, observe wasted paper 3. apply patch 4. print list, compare 5. if you like it, sign off. ;) I should add I suppose, the patch is for the bootstrap theme. If he likes it, I'll do one for prog for backporting. Hi Liz, I think the Bootstrap CSS files require some special magic as they are being generated - see bug 11411. Not sure how to do it yet. There seems to be no print.css in the less folder, so I'm going to assume that his point 2 doesn't apply to this patch (yet). Liz Comment on attachment 24483 [details] [review] Bug 11574 - Clean up lists interface for printing contents of patch will need to be put in the less folder, because I have other work out that creates parity between the less and css folders. I'd rather have that patch, so I'll hold off on this one for now. Created attachment 25044 [details] [review] Bug 11574 - Clean up lists interface for printing Removes extraneous stuff from prints - toolbars, breadcrumbs, etc. To test: 1. make a list 2. print it to a file, observe wasted paper 3. apply patch 4. print list, compare 5. if you like it, sign off. ;) This needs an outside of catalyst sign off please Comment #1 talks about staff client, but this bug cleans up printing from OPAC. Created attachment 25883 [details] [review] [Signed-off] Bug 11574 - Clean up lists interface for printing Removes extraneous stuff from prints - toolbars, breadcrumbs, etc. To test: 1. make a list 2. print it to a file (from OPAC), observe wasted paper 3. apply patch 4. print list, compare 5. if you like it, sign off. ;) Patch cleans up OPAC list printing as expected. Signed-off-by: Marc Véron <veron@veron.ch> Sorry, this patch doesn't apply... Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y Applying: Bug 11574 - Clean up lists interface for printing /home/katrin/kohaclone/.git/rebase-apply/patch:23: space before tab in indent. display : none; fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/css/print.css). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 11574 - Clean up lists interface for printing The copy of the patch that failed is found in: /home/katrin/kohaclone/.git/rebase-apply/patch When you have resolved this problem, run "git am --resolved". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". *** Bug 5855 has been marked as a duplicate of this bug. *** I'm bumping up the importance of this bug. Since I reported it, list printing has gotten worse. The menu now prints below the first item in the list. Also, printing the list does not print the entire list. If there is more than one page, it will only print what is currently on the page. Also, it is great that the OPAC is being addressed, but my request was specific to the staff client. Preferably, both should be addressed. Christopher I think that is a new, separate bug, Christopher - the menu bar one. I've seen that too. Do you want to file it or should I? (In reply to Liz Rea from comment #14) > I think that is a new, separate bug, Christopher - the menu bar one. I've > seen that too. > > Do you want to file it or should I? I'm not sure. From a user standpoint, it all seems related. I wasn't even sure this was going to be addressed, because I had filed the bug concerning the staff module, but the patch is addressing the OPAC. Christopher Even if I rescued this, the problem is the print() called prints the current page which includes those things, not a different template which would have them hidden. (In reply to M. Tompsett from comment #16) > Even if I rescued this, the problem is the print() called prints the current > page which includes those things, not a different template which would have > them hidden. Well, that's pretty much what this ticket addresses. Sounds like someone needs to setup some print tags and css printing. (In reply to Christopher Brannon from comment #17) > (In reply to M. Tompsett from comment #16) > > Even if I rescued this, the problem is the print() called prints the current > > page which includes those things, not a different template which would have > > them hidden. > > Well, that's pretty much what this ticket addresses. Sounds like someone > needs to setup some print tags and css printing. Yes, except it doesn't work. print() doesn't load a different page. There's no @media type CSS. I did rescue it, but discovered it failed. I found there's no print.less file 1) Copied print.css to print.less 2) Got lessc installed and working -- steps left as a fun exercise for the reader. 3) edited print.less to have the following at the end ---- BEGIN SNIPPET ---- .navbar, #navigation, .pages, .actions, #toolbar, #selections-toolbar, #remove-selected, .breadcrumb, #members,#opac-main-search,#opac-user-views .ui-tabs-nav,input,h2 span.hint,td.resultscontrol,.pages,.suggestion,.views,#action,#export,#bibliodescriptions .ui-tabs-nav,#addshelf,fieldset.action, .list-actions, .ft, #facetcontainer,.results_summary.actions,.koha_url,.yui-b { display : none; } .row-fluid { margin-top: 30px; } ---- END SNIPPET ---- 4) lessc --compress < ~/kohaclone/koha-tmpl/opac-tmpl/bootstrap/less/print.less > ~/kohaclone/koha-tmpl/opac-tmpl/bootstrap/css/print.css I ignored the warned about --compress being deprecated. That basically fixes the patch, as far as I can tell. 1) Created a list. 2) Logged into the opac 3) Found my list. 4) Clicked 'Print List', but chose 'CutePDF Writer' instead of my printer. 5) Was disappointed in the results. (In reply to M. Tompsett from comment #18) > Yes, except it doesn't work. > print() doesn't load a different page. There's no @media type CSS. I did > rescue it, but discovered it failed. Odd that @media isn't working. Created attachment 37499 [details] [review] Bug 11574 - Clean up Printing Lists Removes extraneous stuff from prints - toolbars, breadcrumbs, etc. To test: 1. make a list 2. print it to a file (from OPAC), observe wasted paper 3. apply patch 4. print list, compare 5. if you like it, sign off. ;) Patch cleans up OPAC list printing as expected. Signed-off-by: Marc Véron <veron@veron.ch> NOTE: Made functional again. Turns out my issues were a result of cached CSS pages. Tested in IE and Firefox successfully. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> This report was initially for the staff client, but we got a patch for the OPAC so I think we should file a new report for staff to make it (hopefully) a little less confusing. Cleans up the printout significantly. It would be nice to move things around a bit as the removed navigation leaves a lot of blank space on the left. Created attachment 37517 [details] [review] [PASSED QA] Bug 11574 - Clean up Printing Lists Removes extraneous stuff from prints - toolbars, breadcrumbs, etc. To test: 1. make a list 2. print it to a file (from OPAC), observe wasted paper 3. apply patch 4. print list, compare 5. if you like it, sign off. ;) Patch cleans up OPAC list printing as expected. Signed-off-by: Marc Véron <veron@veron.ch> NOTE: Made functional again. Turns out my issues were a result of cached CSS pages. Tested in IE and Firefox successfully. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (In reply to Katrin Fischer from comment #21) > This report was initially for the staff client, but we got a patch for the > OPAC so I think we should file a new report for staff to make it (hopefully) > a little less confusing. Strangely, the obsoleted patches were all for opac, even though you are right it is staff client requested in comment #1. So, because it was opac, that's what I rescued and signed off. Perhaps the description was wrong? After all, staff can create lists in the staff client to use in the OPAC. Sorry to cause confusion, it is for the OPAC but he did ask for Staff all those months ago. Maybe I'll do one for the staff client (on another bug) Liz When you do, Liz Rea, please add it to the see also for this bug, so I can look at and sign it off. :) Can someone explain the dependency on 11601 and how it is passed with the other bug ASSIGNED? Hm, I think comment#18 - Mark created the less file, so I think that obsoleted the dependency to 11601. (In reply to Katrin Fischer from comment #28) > Hm, I think comment#18 - Mark created the less file, so I think that > obsoleted the dependency to 11601. I agree. :) Patch pushed to master. Thanks code cleanup monk! Pushed to 3.18.x will be in 3.18.7 |
Created attachment 24474 [details] Sections that shouldn't print when printing list Would like to see list printing from staff client cleaned up. Right now, the list printing includes buttons and the "Add and item..." section below. These should be omitted to save paper.