Re: [siesta-dev] thoughts about web interface

[prev] [thread] [next] [lurker] [Date index for 2002/10/16]

From: Simon Wistow
Subject: Re: [siesta-dev] thoughts about web interface
Date: 18:17 on 16 Oct 2002
On Wed, Oct 16, 2002 at 05:33:10PM +0100, Simon Wistow said:
> 4. Plugins (should) provide a method which returns a hashref. The keys
> of this hashref are the different preferences that a plugin provides,
> what type that preference is and what the preferred widget for that
> preference is. This should make it easy for a single template to
> automatically generate the html for configuring the preferences in a
> plugin. For example, in ReplyTo

For example this ...  (which isn't even close to being a prototype, it's
just me playign round with some code)


http://thegestalt.org/simon/siesta/

show's what it can do when you look at ReplyTo or SimpleSig

The template is ...

[% INCLUDE header
        title = "Configure '$plugin' for list '$list'"
%]

[% FOREACH option = options.keys %]
[% vals	= options.$option %]

<b>[% option %]</b> : 

        [% IF vals.widget == 'textbox' %]

        <input type="text" name="[% option %]" 
		value="[% vals.default%]">

        [% ELSIF vals.widget ==	'checkbox' %]

        <input	type="checkbox"	       
                [% IF vals.default == 1 %]
                        checked="checked"
                [% END %]
        name="[% option %]">

        [% END %]

<br/><i>[% vals.description %]</i><br/>


[% END %]

[% INCLUDE footer %]


I'll submit tomorrow morning.

I'm still bothered about per-user plugins but I'll get onto that later.

Simon



There's stuff above here

Generated at 13:56 on 01 Jul 2004 by mariachi 0.52