Bug 11574 - Clean up printing of lists in OPAC
Summary: Clean up printing of lists in OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Liz Rea
QA Contact: Testopia
URL:
Keywords:
: 5855 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-16 23:42 UTC by Christopher Brannon
Modified: 2015-12-03 22:02 UTC (History)
8 users (show)

See Also:
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 (34.53 KB, image/png)
2014-01-16 23:42 UTC, Christopher Brannon
Details
PDF output of print (138.54 KB, application/pdf)
2014-01-17 07:57 UTC, Liz Rea
Details
Bug 11574 - Clean up lists interface for printing (1.47 KB, patch)
2014-01-17 08:01 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 11574 - Clean up lists interface for printing (7.54 KB, patch)
2014-02-05 02:06 UTC, Liz Rea
Details | Diff | Splinter Review
[Signed-off] Bug 11574 - Clean up lists interface for printing (7.75 KB, patch)
2014-03-06 07:08 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 11574 - Clean up Printing Lists (12.72 KB, patch)
2015-04-04 20:58 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 11574 - Clean up Printing Lists (12.79 KB, patch)
2015-04-05 23:01 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2014-01-16 23:42:41 UTC
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.
Comment 1 Liz Rea 2014-01-17 07:57:36 UTC
Created attachment 24482 [details]
PDF output of print

Christopher,

Like this?

Liz
Comment 2 Liz Rea 2014-01-17 08:01:16 UTC Comment hidden (obsolete)
Comment 3 Liz Rea 2014-01-17 08:02:15 UTC
I should add I suppose, the patch is for the bootstrap theme. If he likes it, I'll do one for prog for backporting.
Comment 4 Katrin Fischer 2014-01-18 07:22:12 UTC
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.
Comment 5 Liz Rea 2014-01-18 08:52:04 UTC
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 6 Liz Rea 2014-01-23 20:25:13 UTC
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.
Comment 7 Liz Rea 2014-02-05 02:06:24 UTC Comment hidden (obsolete)
Comment 8 Chris Cormack 2014-02-16 04:55:52 UTC
This needs an outside of catalyst sign off please
Comment 9 Marc Véron 2014-03-06 07:05:59 UTC
Comment #1 talks about staff client, but this bug cleans up printing from OPAC.
Comment 10 Marc Véron 2014-03-06 07:08:14 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2014-03-12 17:36:05 UTC
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".
Comment 12 Nicole C. Engard 2014-05-16 22:12:31 UTC
*** Bug 5855 has been marked as a duplicate of this bug. ***
Comment 13 Christopher Brannon 2014-06-03 22:39:39 UTC
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
Comment 14 Liz Rea 2014-08-28 01:14:16 UTC
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?
Comment 15 Christopher Brannon 2014-08-28 19:57:27 UTC
(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
Comment 16 Mark Tompsett 2015-04-04 14:55:28 UTC
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.
Comment 17 Christopher Brannon 2015-04-04 17:15:53 UTC
(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.
Comment 18 Mark Tompsett 2015-04-04 18:57:08 UTC
(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.
Comment 19 Christopher Brannon 2015-04-04 19:03:24 UTC
(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.
Comment 20 Mark Tompsett 2015-04-04 20:58:16 UTC Comment hidden (obsolete)
Comment 21 Katrin Fischer 2015-04-05 22:56:25 UTC
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.
Comment 22 Katrin Fischer 2015-04-05 23:00:12 UTC
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.
Comment 23 Katrin Fischer 2015-04-05 23:01:07 UTC
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>
Comment 24 Mark Tompsett 2015-04-06 00:51:05 UTC
(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.
Comment 25 Liz Rea 2015-04-06 21:53:26 UTC
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
Comment 26 Mark Tompsett 2015-04-06 22:26:20 UTC
When you do, Liz Rea, please add it to the see also for this bug, so I can look at and sign it off. :)
Comment 27 Tomás Cohen Arazi 2015-04-08 18:08:38 UTC
Can someone explain the dependency on 11601 and how it is passed with the other bug ASSIGNED?
Comment 28 Katrin Fischer 2015-04-08 18:21:59 UTC
Hm, I think comment#18 - Mark created the less file, so I think that obsoleted the dependency to 11601.
Comment 29 Mark Tompsett 2015-04-08 18:35:58 UTC
(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. :)
Comment 30 Tomás Cohen Arazi 2015-05-05 18:44:59 UTC
Patch pushed to master.

Thanks code cleanup monk!
Comment 31 Chris Cormack 2015-05-17 05:40:05 UTC
Pushed to 3.18.x will be in 3.18.7