Bug 10135 - Adding the ability to define customised basketgroups PDF layouts
Summary: Adding the ability to define customised basketgroups PDF layouts
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P3 enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on: 10746
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-27 17:04 UTC by Mathieu Saby
Modified: 2023-12-28 20:42 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
[PATCH] Bug 10135 : Add the ability to define customised basketgroups pdf layouts (4.91 KB, patch)
2013-04-27 17:38 UTC, Mathieu Saby
Details | Diff | Splinter Review
Example to test : new layout "msaby" (64.23 KB, patch)
2013-04-27 17:40 UTC, Mathieu Saby
Details | Diff | Splinter Review
[PATCH] Bug 10135 : Add the ability to define customised basketgroups pdf layouts (4.92 KB, patch)
2013-05-18 13:10 UTC, Mathieu Saby
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Saby 2013-04-27 17:04:13 UTC
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
Comment 1 Mathieu Saby 2013-04-27 17:06:42 UTC
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
Comment 2 Mathieu Saby 2013-04-27 17:38:09 UTC Comment hidden (obsolete)
Comment 3 Mathieu Saby 2013-04-27 17:40:30 UTC
Created attachment 17757 [details] [review]
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
Comment 4 Mathieu Saby 2013-05-18 13:10:18 UTC
Created attachment 18226 [details] [review]
[PATCH]  Bug 10135 : Add the ability to define customised basketgroups pdf layouts

correction of a typo
Comment 5 Jonathan Druart 2013-05-22 14:07:00 UTC
Mathieu, your patch adds a new routine. Could you provide a unit test for it please?
Marked as Failed QA.
Comment 6 Mathieu Saby 2013-05-22 14:35:11 UTC
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
Comment 7 Mathieu Saby 2013-05-22 14:36:27 UTC
Maybe there is also other QA issue, for example, what is the best location in Koha directory hierarchy to store customized layout templates?

Mathieu
Comment 8 Jonathan Druart 2013-05-22 14:50:28 UTC
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.
Comment 9 Mathieu Saby 2013-05-22 15:29:14 UTC
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
Comment 10 Marc Véron 2016-10-04 16:38:47 UTC
Still valid?
Comment 11 Katrin Fischer 2016-10-08 10:26:30 UTC
yes.
Comment 12 Katrin Fischer 2023-01-25 22:36:33 UTC
Still valid, but maybe we should mark it WONTFIX and move away from the PDF printing in favor of something more flexible/easier to customize?
I've filed bug 31723 for this.

I'll go ahead and close it, please reopen if you disagree!