[Bug 10135] New: Adding the ability to define customised basketgroups pdf layouts
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 Bug ID: 10135 Summary: Adding the ability to define customised basketgroups pdf layouts Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P3 Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: mathieu.saby@univ-rennes2.fr We have 2 available layouts for basketgroups : layout2pages and layout3pages. Both are untranslatable, and not very pretty. We defined our own layout in Rennes 2, in french, with the logo of the universiy, etc... To use it, we were forced to make a local development, because there is a safty condition in basketgroup.pl. M. Saby -- 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=10135 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |mathieu.saby@univ-rennes2.f |ity.org |r -- 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=10135 --- Comment #1 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- I have prepared a patch for improving Koha behavior ; it is checking all *.pm files in acqui/pdfformat and building a list from there names. These names is used to create an option list OrderPdfFormat syspref. So, in a standard Koha, you will have 2 choices, like before, but if you create an other pm file in acqui/pdfformat (and if needed, new pdf files in koha-tmpl/prof/pdf), you will have new choices. M. Saby -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 --- Comment #2 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 17756 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17756&action=edit [PATCH] Bug 10135 : Add the ability to define customised basketgroups pdf layouts This patch create a sub in Koha.pm which get the list of .pm files in acqui/pdfformat. The list is used to build an option list for OrderPdfFormat syspref, instead of a free input. In a standard Koha, only the design of OrderPdfFormat should be altered. If you put a new .pm file in acqui/pdfformat (and if needed a new pdf file in koha-tmpl/intranet/prog/pdf), you will see the name of the file as a new option in OrderPdfFormat. To test : A. in a standard Koha, check everything is working like before: - 1. you have 2 options in OrderPdfFormat (pdfformat::layout2pages ; pdfformat::layout3pages) - 2. select one layout, and try to print a basketgroup - 3. select the 2d layout, and try to print a basketgroup B. check you can add a new layout - 1. Either create your own layout if you know how to do Or dowload and apply the 2d attachment to this bug. It contains an example : a layout named "pdfformat::msaby" - 2. Check the new layout is visible in OrderPdfFormat - 3. Select it, and try to print a basketgroup - 4. Select one of the "old" layouts, and try to print a basketgroup. M. Saby -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 mathieu saby <mathieu.saby@univ-rennes2.fr> 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=10135 --- Comment #3 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 17757 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17757&action=edit Example to test : new layout "msaby" This is not a part of the enhancement, but just an example to test it. (see test plan) M. Saby -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17756|0 |1 is obsolete| | --- Comment #4 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 18226 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18226&action=edit [PATCH] Bug 10135 : Add the ability to define customised basketgroups pdf layouts correction of a typo -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Mathieu, your patch adds a new routine. Could you provide a unit test for it please? Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 --- Comment #6 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- OK. But this is a QA issue, and the patch has not been tested yet. I think Pierre Angot want to so so. Could I set it again in "need sign off" ? Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 --- Comment #7 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Maybe there is also other QA issue, for example, what is the best location in Koha directory hierarchy to store customized layout templates? Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- A new type of this kind for syspref is not a best choice I think. Why do you want to list the directory? The value can be filled manually. I agree with your changes in /acqui/basketgroup.pl I think we just want: - if ($pdfformat eq 'pdfformat::layout3pages' || $pdfformat eq 'pdfformat::layout2pages'){ eval { eval "require $pdfformat"; import $pdfformat; }; if ($@){ + print $input->header; + print $input->start_html; # FIXME Should do a nicer page + print "<h1>Invalid PDF Format set</h1>"; + print "Please go to the systempreferences and set a valid pdfformat"; + exit; } - } - else { - print $input->header; - print $input->start_html; # FIXME Should do a nicer page - print "<h1>Invalid PDF Format set</h1>"; - print "Please go to the systempreferences and set a valid pdfformat"; - exit; - } I completely disagree with others changes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 --- Comment #9 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Someone added a control to prevent librarians to choose a non existing layout : at present we only can choose only layout2pages and layout3pages. So I thought we cannot just let librarians put any value in the syspref, as this could create a new way to "break" Koha. That's why I thought we could use a dropdow menu like the one beeing used for opac templates, to be sure a librarian cannot use a non existing layout. But maybe that's useless. That's why I asked the help of koha-devel list in december, but I had no real advice, so I decided to realize my idea ;-) http://web.archiveorange.com/archive/v/O5wWPk28B1FY7zsUFIz8 I believe I asked Chris too, but I cannot find his answer. Maybe I dreamt... Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10746 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10135 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org