[Bug 15527] New: OAI-PMH should have a stylesheet to aid usability
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Bug ID: 15527 Summary: OAI-PMH should have a stylesheet to aid usability Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Created attachment 46429 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46429&action=edit Original style Both EPrints and DSpace projects ship XSLT stylesheets that are included in the OAI response so using a web browser to navigate the repository. We should add one ourselves. See the attached screenshots for better understanding this enhancement proposal. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 46430 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46430&action=edit Proposed style -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 46434 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46434&action=edit Bug 15527: Add a stylesheet for OAI-PMH to aid usability This patch introduces an XSLT file grabbed from DSpace and a couple css files. To test: - Point to your dev Koha's oai endpoint. For example: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListMetadataFormats => FAIL: Look how ugly it is for humans. - Apply this patch - Reload => SUCCES: It is styled and provides really useful links to interact with the OAI server verbs. - Sign off :-D Sponsored-by: Universidad Empresarial Siglo 21 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 46435 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46435&action=edit Bug 15527: (followup) Allow using custom stylesheets This patch introduces a syspref to let users choose their own XSLT stylesheets for the OAI-PMH front end. Regards Sponsored-by: Universidad Empresarial Siglo 21 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 46438 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46438&action=edit Bug 15527: (followup) Avoid replacing spaces for non-breaking spaces This causes the template not to wrap long lines correctly, -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- It doesn't work for me when your stylesheet is in opac-tmpl/xsl/. I have to put it in opac-tmpl directly, and modify Repository.pm file to make it works. Could you try on your side? I've seen in your screenshot you're working with 'localhost' as your server URL. It may come from there. A remark: you introduce a new syspref OAI-PMH:CustomStylesheet. I think that this kind of parameter belongs to the 'Extended Mode'. The YAML config file could be used to link to a local stylesheet. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Frédéric Demians from comment #5)
It doesn't work for me when your stylesheet is in opac-tmpl/xsl/. I have to put it in opac-tmpl directly, and modify Repository.pm file to make it works. Could you try on your side? I've seen in your screenshot you're working with 'localhost' as your server URL. It may come from there.
I'm using kohadevbox:ansible. I think the permissions (apache ones) on a regular dev/normal install have diverged from the packages. I'll take a look.
A remark: you introduce a new syspref OAI-PMH:CustomStylesheet. I think that this kind of parameter belongs to the 'Extended Mode'. The YAML config file could be used to link to a local stylesheet.
That's probably a good idea. I'll dig into it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hector.hecaxmmx@gmail.com --- Comment #7 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Looks very good. Good job, Tomás. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #8 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Tomás Cohen Arazi from comment #6)
I'm using kohadevbox:ansible. I think the permissions (apache ones) on a regular dev/normal install have diverged from the packages. I'll take a look.
This part in apache conf is the culprit: <DirectoryMatch "__OPAC_WWW_DIR__/.*/(modules|xslt|includes)"> Order deny,allow Deny from all </DirectoryMatch> I will propose a patch fixing that, and using OAI server conf file to define custom XSLT for web view. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46434|0 |1 is obsolete| | Attachment #46435|0 |1 is obsolete| | Attachment #46438|0 |1 is obsolete| | --- Comment #9 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 46459 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46459&action=edit Bug 15527: Add a stylesheet for OAI-PMH to aid usability This patch introduces an XSLT file grabbed from DSpace and a couple css files. To test: - Point to your dev Koha's oai endpoint. For example: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListMetadataFormats => FAIL: Look how ugly it is for humans. - Apply this patch - Reload => SUCCES: It is styled and provides really useful links to interact with the OAI server verbs. - Sign off :-D Sponsored-by: Universidad Empresarial Siglo 21 Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Works as described. Nice looking. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #10 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 46460 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46460&action=edit Bug 15527 Custom stylesheet in extended mode Add a parameter to YAML config file in order to specify a local XSLT used style the XML returned by OAI Server. Some doc. Move default XSLT from /opac-tmpl/xslt to /opac-tmpl/bootstrap/css/OAI.xslt. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #11 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Frédéric Demians from comment #10)
Created attachment 46460 [details] [review] Bug 15527 Custom stylesheet in extended mode
Add a parameter to YAML config file in order to specify a local XSLT used style the XML returned by OAI Server. Some doc.
Move default XSLT from /opac-tmpl/xslt to /opac-tmpl/bootstrap/css/OAI.xslt.
Tomás, I've signed-off your first patch, and obsoleted the 2 others. You should take a look at mine (2nd patch attached) and sign it whether it seems OK to you. Maybe a third eye (Hector) and sign-off would be welcome. Thanks for the good job. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #12 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> ---
Tomás, I've signed-off your first patch, and obsoleted the 2 others. You should take a look at mine (2nd patch attached) and sign it whether it seems OK to you. Maybe a third eye (Hector) and sign-off would be welcome. Thanks for the good job.
For me looks very good I'll signed-off if you don't care Tomás. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46460|0 |1 is obsolete| | --- Comment #13 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 46464 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46464&action=edit [SIGNED-OFF]Bug 15527: Custom stylesheet in extended mode Add a parameter to YAML config file in order to specify a local XSLT used style the XML returned by OAI Server. Some doc. Move default XSLT from /opac-tmpl/xslt to /opac-tmpl/bootstrap/css/OAI.xslt. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 46464 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46464 [SIGNED-OFF]Bug 15527: Custom stylesheet in extended mode Review of attachment 46464: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15527&attachment=46464) ----------------------------------------------------------------- ::: Koha/OAI/Server/Repository.pm @@ +111,5 @@
# Load configuration file if defined in OAI-PMH:ConfFile syspref + my $conf = C4::Context->preference("OAI-PMH:ConfFile"); + if ( $conf ) { + $self->{ conf } = $conf = LoadFile( $conf );
What's the point of this change? I personally prefer the previous version. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #15 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Jonathan Druart from comment #14)
Comment on attachment 46464 [details] [review] [SIGNED-OFF]Bug 15527: Custom stylesheet in extended mode
Review of attachment 46464 [details] [review]: -----------------------------------------------------------------
::: Koha/OAI/Server/Repository.pm @@ +111,5 @@
# Load configuration file if defined in OAI-PMH:ConfFile syspref + my $conf = C4::Context->preference("OAI-PMH:ConfFile"); + if ( $conf ) { + $self->{ conf } = $conf = LoadFile( $conf );
What's the point of this change? I personally prefer the previous version.
The $conf variable is used above (line 148) in order to get the new extended 'xslt' parameter: 148 $response->xslt( 149 $conf && $conf->{xslt} 150 ? $conf->{xslt} 151 : "/opac-tmpl/bootstrap/css/OAI.xslt" 152 ); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- QA comments: 1/ Could you please add the DSpace license (linked to the xslt) to the about page? 2/ Frédéric, why did you move the xslt file to the OPAC css dir? Why not koha-tmpl/opac-tmpl/bootstrap/en/xslt/? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- 3/ Should the new file be translatable? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #18 from Frédéric Demians <frederic@tamil.fr> ---
2/ Frédéric, why did you move the xslt file to the OPAC css dir? Why not koha-tmpl/opac-tmpl/bootstrap/en/xslt/?
See comment 8. The XSL file is accessed directly by the web browser by http. Files in koha-tmpl/opac-tmpl/bootstrap/en/xslt/ can only be accessed by Koha web scripts. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15527 --- Comment #19 from Frédéric Demians <frederic@tamil.fr> --- (In reply to Jonathan Druart from comment #17)
3/ Should the new file be translatable?
In my opinion, humble as appropriate, no. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org