Clean up the Print stylesheet

Bug #692769 reported by François Marier on 2010-12-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Robert Lyon

Bug Description

We should make sure that views have a working print stylesheet.

Changed in mahara:
importance: Medium → Low
milestone: 1.4.0 → none
importance: Low → Medium
Melissa Newman (melissa-l) wrote :

Fixed the actual print style sheet to work correctly.

File: theme/raw/static/style/print.css (fixed and attached)
File: theme/raw/templates/header/head.tpl (if somebody knows how to fix that part, it would be appreciated).

The problem is that the template code (/theme/raw/templates/header/head.tpl) is trying to read the style sheet from only the theme instead of raw and then the theme, if the theme has a print style sheet. I could not figure out how to fix that part, so I only attached the print.css file.

If an end user wants to attach this patch, they will need to temporarily add a hardcoded fixed to the head.tpl file:

Old code in head.tpl:
   <link rel="stylesheet" type="text/css" href="{theme_url filename='style/print.css'}" media="print">
New code in head.tpl:
    <link rel="stylesheet" type="text/css" href="http://localhost/portfolio/theme/raw/static/style/print.css" media="print">

FYI: The print.css file was completely rewritten, so just copy it over, don't try to patch it. This file has not been extensively tested. Tested only on Firefox (current version) using print-preview on a US computer system. Also, only the view, dashboard, collection, and profile were tested. Did not test the printing of other pages.

Related issues:
* What to do about navigation -- Do we need two classes, so the end user can choose if they want their page navigations (page views) to be included or not included)?
* print-page-breaks -- adding the class to the print.css file is done, but how does a user add this to their page? Do we need to add a blocktype called "print-page-break"?
* Do we want to allow the user to add a print MLA at the end of a print page?

Melissa Draper (melissa) wrote :

Hi Melissa,

Could you please give me some background info on this so I can test it?

I'm uploading some pdfs that were generated by printing to a file. What are the expected changes and what are not expected?

I've had a fair poke around, and it appears as though this is still very incomplete.

Melissa Draper (melissa) wrote :

For comparison, the before.

tags: added: printing
Changed in mahara:
milestone: none → 1.7.0
Aaron Wells (u-aaronw) on 2013-04-19
Changed in mahara:
milestone: 1.7.0 → 1.8.0
Robert Lyon (robertl-9) on 2013-09-02
summary: - Make sure that the print stylesheet still works
+ [Ongoing] Make sure that the print stylesheet still works
Aaron Wells (u-aaronw) on 2013-09-30
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Aaron Wells (u-aaronw) wrote :

I did a test run, using the Print button in Mahara 1.8. It prints everything in a fairly reasonable way, including the new flexible layouts. The biggest problem is that the URL for each link is printed in parentheses after each link. Kristina informs me this is the standard behavior for Firefox, and it's been this way for some time, so this is not a new problem.

So, I'll kick this down the road to 1.9.

summary: - [Ongoing] Make sure that the print stylesheet still works
+ Clean up the Print stylesheet
Changed in mahara:
milestone: 1.8.0 → 1.9.0
Melissa Newman (melissa-l) wrote :

Actually, the printing out the url in parenthasis is not part of Firefox. It is programmed in the stylesheet. Personally, I don't see the purpose of keeping it for the headers, but it should be kept for URLs that might be included in a page. Therefore, we would need to distinguish between a link in a header vs. a link in the content.

Second, the header links should not be printed.

Third, the footer links should not be printed.

Fourth, the user should have the option to include or not include feedback in the printing.

Fifth, there needs to be a way to specify that a group of artifacts go together and they should be kept together in printing. Maybe a check box at the bottom of each artifact saying "keep with next artifact in print".

What do you mean by "keep with next artifact in print", Melissa? Would that be like not printing part of a table on one page and the rest on the next?

Son Nguyen (ngson2000) wrote :

I found some things:

1. Control buttons (edit, delete) for feedbacks should not be printed.
2. Links inside a block may be cropped (see attached file)
3. Links to embedded media artefacts don't show up
4. If there is no feedback, a message should be printed

Aaron Wells (u-aaronw) wrote :

Some additional items from https://mahara.org/interaction/forum/topic.php?id=5949&offset=10&limit=10#post25342:

1. The default font size is the absolute "10pts" when it should be relative "small" or "medium", so it'll be based on the user's browser settings

2. Printing should have option to disable the header, title & author, and comments

3. The ability to prevent there from being a page break between "related" blocks, for instance an image block followed by a text block that describes it (this necessitates some kind of UI to let a user indicate which blocks are "related" to each other)

Aaron Wells (u-aaronw) on 2014-04-15
Changed in mahara:
milestone: 1.9.0 → 1.10.0
Changed in mahara:
milestone: 1.10.0 → none
Changed in mahara:
status: Triaged → In Progress
milestone: none → 17.04.0
assignee: nobody → Robert Lyon (robertl-9)

Reviewed: https://reviews.mahara.org/7109
Committed: https://git.mahara.org/mahara/mahara/commit/01d65a8faf73c1ef3b42bcf2c0b86f49602e367d
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 01d65a8faf73c1ef3b42bcf2c0b86f49602e367d
Author: Robert Lyon <email address hidden>
Date: Mon Oct 10 14:38:07 2016 +1300

Bug 692769: Print style sheet as part of sass styles

Adding a lib/_print.scss file containing an @media print clause
to do some basic styling of the site in print mode

This is based on the work of Kevin Rickis here
https://github.com/edictdev/print

behatnotneeded

Change-Id: I20cc1e526d28d2cf06b21bed927f3f0f2929edf6
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) wrote :

Have now made a theme/raw/sass/lib/_print.scss file that can hold the styles for dealing with printing

Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Robert Lyon (robertl-9) on 2017-04-27
Changed in mahara:
status: Fix Committed → Fix Released
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8094
Committed: https://git.mahara.org/mahara/mahara/commit/70ac7cec17e778da31d928ea37a7e2c7de13459f
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 70ac7cec17e778da31d928ea37a7e2c7de13459f
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Oct 5 17:06:05 2017 +1300

Bug 1720269: old_raw patches for bugs: (General)

Bug 1720264
Bug 1720235
Bug 1719736
Bug 1718821
Bug 1705126
Bug 1694908
Bug 1690687
Bug 1690232
Bug 1686843
Bug 1685041
Bug 1683561
Bug 1681987
Bug 1681934
Bug 1675223
Bug 1636064
Bug 1575512
Bug 1369569
Bug 692769

Also fixing up un-closed html tags in Bug 1701437 for raw and old raw

behatnotneeded

Change-Id: I8ac930ceebf78b4edad97289994318e7689a1e94

Reviewed: https://reviews.mahara.org/8116
Committed: https://git.mahara.org/mahara/mahara/commit/a25f4f11d35bf17d54acfb8010cd29e432fc86ea
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit a25f4f11d35bf17d54acfb8010cd29e432fc86ea
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Oct 5 17:06:05 2017 +1300

Bug 1720269: old_raw patches for bugs: (General)

Bug 1720264
Bug 1720235
Bug 1719736
Bug 1718821
Bug 1705126
Bug 1694908
Bug 1690687
Bug 1690232
Bug 1686843
Bug 1685041
Bug 1683561
Bug 1681987
Bug 1681934
Bug 1675223
Bug 1636064
Bug 1575512
Bug 1369569
Bug 692769

Also fixing up un-closed html tags in Bug 1701437 for raw and old raw

behatnotneeded

Change-Id: I8ac930ceebf78b4edad97289994318e7689a1e94
(cherry picked from commit 70ac7cec17e778da31d928ea37a7e2c7de13459f)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers