[pLog-svn] r4233 - plog/trunk/templates/admin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sat Nov 4 12:15:54 GMT 2006
Author: oscar
Date: 2006-11-04 12:15:52 +0000 (Sat, 04 Nov 2006)
New Revision: 4233
Modified:
plog/trunk/templates/admin/pluginsettings.template
Log:
fixed the UI a bit and added support for drop-down lists and textareas
Modified: plog/trunk/templates/admin/pluginsettings.template
===================================================================
--- plog/trunk/templates/admin/pluginsettings.template 2006-11-04 11:27:23 UTC (rev 4232)
+++ plog/trunk/templates/admin/pluginsettings.template 2006-11-04 12:15:52 UTC (rev 4233)
@@ -6,29 +6,54 @@
<fieldset class="inputField">
<legend>{$locale->tr("pluginSettings")}</legend>
{include file="$admintemplatepath/formvalidate.template"}
+
{foreach from=$plugins item=plugin}
<h4>{$plugin->getId()}</h4>
+ <table style="width:100%">
+ <thead>
+ <tr>
+ <th style="width:10%;align:left">{$locale->tr("parameter")}</th>
+ <th style="width:80%:align:left">{$locale->tr("value")}</th>
+ <th style="width:10%:align:center">{$locale->tr("override")}</th>
+ </tr>
+ </thead>
+
{assign var=pluginsettings value=$plugin->getPluginConfigurationKeys()}
{foreach from=$pluginsettings item=setting}
- <div class="field">
+ <tr>
{assignvar var=key value=$setting.name}
{assign var=name value=$setting.name}
{assign var=overrideValue value=$canOverride[$setting.name]}
- <select name="canOverride[{$setting.name}]">
- <option value="1" {if $overrideValue==1}selected="selected"{/if}>{$locale->tr("user_can_override")}</option>
- <option value="2" {if $overrideValue==2}selected="selected"{/if}>{$locale->tr("user_cannot_override")}</option>
- </select>
- {$setting.name}:
- {if $setting.type=="boolean"}
- <input type="checkbox" name="{$setting.name}" value="1" class="checkbox" {if $key}checked="checked"{/if}/>
- {elseif $setting.type=="string"}
- <input type="text" name="{$setting.name}" value="{$key}" />
- {elseif $setting.type=="integer"}
- <input type="text" name="{$setting.name}" value="{$key}" />
- {/if}
- {include file="$admintemplatepath/validate.template" field=$setting.name message=$locale->tr("error_incorrect_value")}
- </div>
+
+ <td>{$setting.name}</td>
+ <td style="width:100%">
+ {if $setting.type=="boolean"}
+ <input type="checkbox" name="{$setting.name}" value="1" class="checkbox" {if $key}checked="checked"{/if}/>
+ {elseif $setting.type=="string"}
+ <input type="text" name="{$setting.name}" value="{$key}" />
+ {elseif $setting.type=="integer"}
+ <input type="text" name="{$setting.name}" value="{$key}" />
+ {elseif $setting.type=="list"}
+ <select name="{$setting.name}">
+ {assign var=options value=$setting.options}
+ {foreach from=$options item=name key=value}
+ <option value="{$value}" {if $key==$value}selected="selected"{/if}>{$name}</option>
+ {/foreach}
+ </select>
+ {elseif $setting.type=="text"}
+ <textarea name="{$setting.name}" rows="5" style="width:100%">{$key}</textarea>
+ {/if}
+ {include file="$admintemplatepath/validate.template" field=$setting.name message=$locale->tr("error_incorrect_value")}
+ </td>
+ <td>
+ <select name="canOverride[{$setting.name}]">
+ <option value="1" {if $overrideValue==1}selected="selected"{/if}>{$locale->tr("user_can_override")}</option>
+ <option value="2" {if $overrideValue==2}selected="selected"{/if}>{$locale->tr("user_cannot_override")}</option>
+ </select>
+ </td>
+ </tr>
{/foreach}
+ </table>
{/foreach}
</fieldset>
<div id="list_action_bar">
More information about the pLog-svn
mailing list