[Koha-devel] KohaDates filter questions...

Marcel de Rooy M.de.Rooy at rijksmuseum.nl
Mon Mar 31 08:40:51 CEST 2014


From the TT manual:
Named parameters can be specified using either => or = and can appear anywhere in the argument list.

Hard to find that btw ..

So both seem to be fine.

Marcel

Van: koha-devel-bounces at lists.koha-community.org [mailto:koha-devel-bounces at lists.koha-community.org] Namens Mark Tompsett
Verzonden: zondag 30 maart 2014 4:06
Aan: koha-devel at lists.koha-community.org
Onderwerp: [Koha-devel] KohaDates filter questions...

Greetings,

I was looking at a bug, and I thought to myself, “What if I wanted the time stamp portion of included in this column, and not just a date?”. I ran:
grep '| \$KohaDates with' `find . -name "*.tt" | grep "\/en\/"`
just to see how others had done it. Well, initially without the with, and then with the with, because obviously I found the examples. [Smile]

./koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt:        <td><span title="[% QUEUED_MESSAGE.time_queued %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td>
./koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt:                    ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
./koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt:                       <td><span title="[% batch_lis.staged_date %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</span></td>
./koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt:                                on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
./koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt:                          on <span title="[% timestamp | $KohaDates with_hours = 1%]">

Is it supposed to be ‘=>’ or ‘=’? Does it matter? What is our standard? Should we have one?

GPML,
Mark Tompsett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140331/fcfcbaff/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1046 bytes
Desc: image001.png
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140331/fcfcbaff/attachment.png>


More information about the Koha-devel mailing list