[Koha-devel] An idea for consolidating staff interface header search forms

Katrin Fischer katrin.fischer.83 at web.de
Sun Jul 12 14:19:09 CEST 2020


Hi Owen,

I like the idea of centralizing this code a bit more.

I am not sure if bug 20988 will fix the translation issue, but maybe we
could work around it for the time being?

Maybe instead of using [% form.label | html %] we could use the
form.formid and translate that to labels. Then we'd also not have to
repeat the label descriptions in the search definitions for the
different use cases.

Hope that makes sense,

Katrin

On 09.07.20 19:25, Owen Leonard wrote:
> I'm playing around with the idea of eliminating all the many search
> form include files (serials-search.inc, cat-search.inc,
> checking-search.inc, etc.) and replacing them with a single template
> which can be processed in different ways.
>
> For instance, in the circulation-home.tt template, "[% INCLUDE
> 'circ-search.inc' %]" would be replaced with "[% PROCESS
> header_searches.inc searches="circulation_searches" %]"
>
> In header_searches.inc (see https://gitlab.com/snippets/1994424), an
> array of search forms and their labels would be output according to
> the "searches" variable passed to the include file for processing.
>
> Unfortunately this doesn't appear to be translatable, but Bug 20988
> might make it possible.
>
> Does this sound like a worthwhile pursuit? A sensible way to leverage
> Template toolkit's functionality?
>
> Thanks,
>
>   -- Owen
>


More information about the Koha-devel mailing list