In printout, links to [edit] or [add] a statement should not be visible.
Description
Details
Related Objects
- Mentioned Here
- T160256: Wikidata items render badly in Wikilabels
Event Timeline
In EntityParserOutputGenerator, call $options->setEditSection( false ) if $options->getIsPrintable()
Some CSS similar to
@media print { .wikibase-toolbarbutton { display: none; } }
should fix it.
Change 343851 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
[mediawiki/extensions/Wikibase] Disable editing in printable=yes mode
I demoed this to @Lydia_Pintscher and got approval to add this to #wikidata-sprint. I spend most time on figuring out why the test behaves different from the production code, and found https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/MediaWiki.php;69fab9a8179350fc01876d9ea3a253d6e080e1db$179 *shudder*. All solved in https://gerrit.wikimedia.org/r/343851.
Change 343851 merged by jenkins-bot:
[mediawiki/extensions/Wikibase] Disable editing in printable=yes mode
Ehm you can print without using printable=yes of course...
This is what CSS media queries are for, not our printable=yes mode...
you can print without using printable=yes […] This is what CSS media queries are for […]
Both should work. It appears the later was never a problem, but printable=yes was.
- When calling a page with printable=yes, section editing is disabled on wikitext pages. The Wikibase UI should respect this and not initialize it's edit toolbars. Fixed with https://gerrit.wikimedia.org/r/343851.
- When printing a page without calling the printable version first, a print stylesheet is applied, which already works fine, as far as I can see.
Well i include a screenshot what of what I currently see when hitting print:
The blocks are a bug with svg images in print mode in Safari, but i clearly get edit buttons atm, I see no evidence that they are being hidden for me. Am I misunderstanding the problem ?
I must have done something wrong. You are right, I also see edit buttons in the Firefox print preview now. I'm moving this ticket back because an essential part of it is not done. However, what we needed to do for T160256 in our current #wikidata-sprint is done.
Change 364615 had a related patch set uploaded (by AnotherLadsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Wikibase@master] Do not show edit buttons when it's being printed
Change 364615 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Do not show edit buttons when it's being printed