Going from our own syntax to a more general format is good. If we along that way, improve Letters.pm, that is fine too ! For developers it is great that is more powerful but that is probably the pitfall too.
I think we should make sure that we can (automatically) convert old notices to the new format. And perhaps harder: How do we guarantee that we do not loose the ability for librarians to add or edit notices? If you need "an expert" to do so, we went too far.. ________________________________________ Van: koha-devel-boun...@lists.koha-community.org [koha-devel-boun...@lists.koha-community.org] namens Jonathan Druart [jonathan.dru...@bugs.koha-community.org] Verzonden: woensdag 3 februari 2016 11:23 Aan: Koha Devel Onderwerp: Re: [Koha-devel] Discussion for Bug 14757 - Allow the use of Template Toolkit syntax for slips and notices Hello Kyle and others, I really like the idea :) I don't see major issues, and the lack of editor is a wrong issue (what kind of editor do you want??) The main point is that it will be much more powerful that our current homemade syntax parser. I have already used this enhancement on bug 15705: without the TT syntax, I would never managed to answer the need (display a specific error on notifying the user, depending on what was wrong). IMO there are 3 steps to implement: 1/ Update existing notices to match our current TT syntax: [% var %] OR (and maybe better) set START_TAG and END_TAG to '<<' and '>>' and we have nothing to do here :) 2/ Take care of some specific variables we currently support: LibrarianFirstname, LibrarianSurname, LibrarianEmailaddress, count, today, ... 3/ Support of "repeatable": at the moment we cannot loop on elements with [% FOREACH %], it's a shame and frustrating Note that we already support the TT syntax in the CSV profiles (bug 12404). The main question is: could we add TT directive in newly created notices (see bug 15705 again)? I would answer yes: it will add examples and people will notice that something has changed. With a good help and good examples, it should not be too hard to understand what does the code. Cheers, Jonathan 2016-02-02 17:52 GMT+00:00 Kyle Hall <kyle.m.h...@gmail.com>: > I would like to start the discussion Marcel wanted to have at the dev > meeting. > > Right now, we have one bespoke syntax for slips and notices with all kinds > of caveats and limitations. > > My first instinct was that we should over time tear out this old syntax and > replace it with TT. However, there are some issues: > > 1) TT is a bit more complicated ( and more powerful of course ) than our > custom syntax > 2) We have an editor for our current syntax ( though it is somewhat > problematic to use at times, as not all fields in the editor are actually > available on the notices where they display ) > 3) Creating an editor for TT would be somewhat non-trivial if we were to > replace what we have with a better and more advanced way of dealing with > data passed to the slip or notice. > > I'm wondering if we should, at least for the time being, consider the > existing notice syntax as the "basic" mode for slips and notices, and have > the ability for TT in notices and slips be an 'advanced' mode. > > Basically, that means that nothing will change for librarians. The current > syntax and editor will continue to be what they are. Instead, 'advanced' > users can simply start using TT in their notices and slips. What we will do > is document how to use TT in slips and notices in the manual. > > So, what I would do at this point is deprecate my replacement notices ( > keeping the new methods where necessary for the advanced mode ), and create > some good documentation. That way we get the power of TT while retaining > backwards compatibility! > > What does everyone think? > Kyle > > http://www.kylehall.info > ByWater Solutions ( http://bywatersolutions.com ) > Meadville Public Library ( http://www.meadvillelibrary.org ) > Crawford County Federated Library System ( http://www.ccfls.org ) > > _______________________________________________ > Koha-devel mailing list > Koha-devel@lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/