koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] template system abuse


From: Pierrick LE GALL
Subject: Re: [Koha-devel] template system abuse
Date: Thu, 13 Apr 2006 17:38:01 +0200

On Thu, 13 Apr 2006 10:46:22 -0400
Owen Leonard <address@hidden> wrote:

> > and in template:
> > 
> > href="<!-- TMPL_VAR NAME="url" -->"
> 
> Paul's point is the same as I would like to make: using this method
> removes the option for the template designer to use a form instead of
> a link. [...]

You know my opinion on this subject: form button should not be used
instead of links. A good template designer/writer (with HTML/CSS skills)
can apply a style to HTML "A" element which could make it look very
like a button. I'm far from being skilled in CSS, but do you think any
librarian will find which is a button and which is a link on this
screenshot? [1]

> [...] What about leaving both options open?  Have the script
> create the URL variable but also make all the individual variables
> available for use?

Well, it seems to be a huge work in my opinion. Do you suggest we do
this for every href of a template? I don't say you proposition is not
interesting, I believe it is not feasible. 

> URLs which are generated by the script must include proper encoding of
> ampersands (&amp; instead of &)
> 
> "selected" attributes generated by the script must follow the rules
> of no implied attributes: selected="selected"

We could have to functions for this: make_URL and
get_selected_string (returning 'selected="selected"'). Example of
make_URL usage:

my $url = make_url(
    'script.pl',
    [
        {key => 'key1', val => 'val1'},
        {key => 'key2', val => 'val2'},
        {key => 'key3', val => 'val3'},
    ]
);

=> script.pl?key1=val1&amp;key2=val2&amp;key3=val3

[1] http://le-gall.net/pierrick/images/koha-link_or_button.png

-- 
Pierrick LE GALL
INEO media system




reply via email to

[Prev in Thread] Current Thread [Next in Thread]