http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8587
--- Comment #7 from Maxime Pelletier <[email protected]> --- (In reply to comment #4) > QA comments: > > Hi Maxime, > > 2/ 3 loops can be created to avoid a list of 10 lines: > [% FOREACH i IN [ 2 .. 10 ] %] > <option value="[% i %]" [% IF ( seriallifespan == [% i %] ) > %]selected="selected"[% END %]>[% i %] years</option> > [% END %] > > Furthermore you cannot write this line :-/ (see Bug 8407) > > And: > [% IF seriallifespan == -1 %] > <span>Immortal</span> > [% ELSIF ( seriallifespan == 1 ) %] > <span>1 year</span> > [% ELSIF ( seriallifespan >= 10 ) %] > [% FOREACH i IN [ 2 .. 10 ] %] > <span>[% seriallifespan %] years</span> > [% END %] > [% END %] > > Something like that, I didn't test. I have to disagree on this. I don't think hardcoding the number and just translating the word year/years is the right way to go. I'm sure there's a language out there where the number is after or something like that. Id rather have 10 lines than an if/elseif/else. I don't understand bug 8407. Maybe translation for [IF] inside options is broken inside loops, but it's working for me in this patch. In french I have : <option value="-1" [% IF ( seriallifespan == -1 ) %]selected="selected"[% END %]>Immortel</option>. Anyway that doesn't mather because : > > 3/ Fonctionnaly what is the goal of this field? Indeed, you don't use this > field, just store and display. Good question. We use it with a saved sql report here attached. Anyway I wasn't really expecting this to be accepted. I think i'm fine leaving it here as Failed QA and to be an option if something needs it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
