opaccolorstylesheet should support remotes, but does not work. opaclayoutstylesheet and opacstylesheet could just be one pref (just as opaccolorstylesheet already advertises)
Created attachment 10354 [details] [review] Patch for 8263
Created attachment 10355 [details] [review] Database revision for 8263 This patch handles the dbrev for this report. It optionally saves the value of the former opacstylesheet pref into opaclayoutstylesheet.
Test the second (dbrev) patch with: Before applying the patch, put a remote URL in pref opacstylesheet. Apply the patch and run the dbrev (cgi-bin/koha/installer/install.pl?step=3). Check if opaclayoutstylesheet now contains your URL. Test the first (functionality) patch with: 1) Blank opaccolorstylesheet. 2) Put colors.css into opaccolorstylesheet. (By default, this file is empty. But note that it should list now in the opac html page source. Right-click in your browser and find that option in the menu.) 3) Put a full URL (could be your own webserver) starting with http:// into opaccolorstylesheet. Check opac again. 4) Blank opaclayoutstylesheet. Do you have default styles in opac? 5) Put opac.css into opaclayoutstylesheet. No difference? That is expected. 6) Put a full URL into opaclayoutstylesheet. If you have a different stylesheet, put that in with the full http:// prefix. Check your opac.
Created attachment 10379 [details] [review] Rebased patch for 8263
Created attachment 10396 [details] [review] Rebased dbrev for 8263
Created attachment 10633 [details] [review] Rebased dbrev
[% IF (opaclayoutstylesheet.match('^http:|^\/')) %] Should we allow for the possibility of a stylesheet served by https:// ?
(In reply to comment #7) > Should we allow for the possibility of a stylesheet served by https:// ? Sure, good point. Will send new version. Thx.
Created attachment 10930 [details] [review] Patch for 8263 Allows https too for css url.
Created attachment 11035 [details] [review] 8263 Make OPAC stylesheet preferences more consistent (dbrev) This patch handles the dbrev for this report. It optionally saves the value of the former opacstylesheet pref into opaclayoutstylesheet. June 21, 2012 & July 4, 2012: Rebased. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 11036 [details] [review] 8263 Consistent stylesheet prefs This patch makes the use of opaccolorstylesheet and opaclayoutstylesheet more consistent. They may be: 1) just a file name, 2) a complete local path or 3) a full URL starting with http: for a remote css file. This makes the syspref opacstylesheet that was only used for a remote css file obsolete. June 20, 2012 Rebased. July 18, 2012: Regex allows https too (thanks to Owen Leonard). Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Works well It would be great to have the same behaviour for the Intranet systempreference. + Maybe a followup is required to update the description of syspref (support for http AND https) ?
(In reply to comment #12) > It would be great to have the same behaviour for the Intranet > systempreference. > > + Maybe a followup is required to update the description of syspref (support > for http AND https) ? Thanks for signing off on this one. We could start a new report for the Intranet side. Will later send a followup for textual change; I hesitated with adjusting the text because there are much more cases in the pref descriptions where http or https could or should be written. But I already wanted Koha to work with it.
QA comment: * FAUSP leader is happy ;-) * clean code that should gracefully handle existing setups * passes koha-qa.pl -c 2 * grepped opacstylesheet, and I can't see references to this string outside from updatedatabase and translations (it will be removed automatically later, when translation process start) passed QA
This report now has its staff client counterpart: bug 10052.