removed some unclean html stuff

updated plugin specfication
This commit is contained in:
lars 2007-01-27 02:19:41 +00:00
parent 48b1ecb926
commit be8131d529
4 changed files with 16 additions and 16 deletions

View file

@ -44,17 +44,16 @@
value="<?cs var:Data.Plugins.network.gw.oc4 ?>" /> value="<?cs var:Data.Plugins.network.gw.oc4 ?>" />
</td></tr> </td></tr>
</table> </table>
<?cs call:show_help(Lang.Plugins.network.Help.DHCP) ?>
<p> <p>
<?cs call:show_help(Lang.Plugins.network.Help.DHCP) ?>
<input type="checkbox" name="dhcp" value="1" id="dhcp" /><label for="dhcp"><?cs var:html_escape(Lang.Plugins.network.Text.DHCP) ?></label> <input type="checkbox" name="dhcp" value="1" id="dhcp" /><label for="dhcp"><?cs var:html_escape(Lang.Plugins.network.Text.DHCP) ?></label>
</p><p> </p>
<p>
<input type="hidden" name="store" value="set_network" /> <input type="hidden" name="store" value="set_network" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.network.Button.Network) ?></button> <button type="submit"><?cs var:html_escape(Lang.Plugins.network.Button.Network) ?></button>
</p> </p>
</form> </form>
</fieldset> </fieldset>
</fieldset>

View file

@ -11,11 +11,10 @@ Python code interface:
- method "do_action": - method "do_action":
- this function will get called whenever this plugins is involved in a request - this function will get called whenever this plugins is involved in a request
- all arguments should be optional (e.g. for displaying a form without previous input values) - all arguments should be optional (e.g. for displaying a form without previous input values)
- the argument "store" should be used to process a form submission (just a recommendation)
- if the processing failed for some reason (invalid input, ...), it should manually set - if the processing failed for some reason (invalid input, ...), it should manually set
"Data.Warning" or "Data.Success") to a value of your choice (preferably "Data.Warning" or "Data.Success") to a value of your choice (preferably
you may want to use messages of the namespace of your plugin you may want to use messages of the namespace of your plugin
(e.g. "Data.Plugins.PLUGINNAME.WarningMessage.InvalidInput")) (e.g. "Plugins.PLUGINNAME.InvalidInput"))
- the return value should be the name of the template that should be displayed after processing - the return value should be the name of the template that should be displayed after processing
(a template file in the plugin directory takes precedence over global template files) (a template file in the plugin directory takes precedence over global template files)
- the return value may also be a dictionary with the following elements: - the return value may also be a dictionary with the following elements:
@ -65,14 +64,15 @@ Language file structure:
- the following top level settings _must_ be defined: - the following top level settings _must_ be defined:
Name (a short description) Name (a short description)
Link (the visible text for links to this plugin) Link (the visible text for links to this plugin)
- all warnings, hints and success messages should be stored below WarningMessage.??? - only system plugins: "Title" is necessary, too
(resp. AdviceMessage or SuccessMessage) - all warnings, hints and success messages as well as environment warnings should
be stored below WarningMessage/AdviceMessage/SuccessMessage/EnvironmentWarning
Clearsilver template: Clearsilver template:
- for a nice title & icon insert: '<?cs call:show_plugin_title() - volume plugins do not have a title
?>' at the top of the template - system plugins should contain '<?cs call:show_plugin_title() ?>' at the
- define the displayed title with 'Title' in the language file top of the template
- the title should be followd by '<?cs call:handle_messages() ?>' - the title should be followd by '<?cs call:handle_messages() ?>'
this will display important messages this will display important messages
- usually you should supply some helpful information afterwards (only displayed - usually you should supply some helpful information afterwards (only displayed

View file

@ -10,7 +10,7 @@
<?cs call:show_help(Lang.Plugins.volume_mount.Help.Open) ?> <?cs call:show_help(Lang.Plugins.volume_mount.Help.Open) ?>
<?cs call:print_form_header("mount", "volume_mount") ?><p> <?cs call:print_form_header("mount", "volume_mount") ?>
<table> <table>
<tr> <tr>
<td> <td>
@ -33,6 +33,6 @@
</td> </td>
</tr> </tr>
</table> </table>
</p></form> </form>
</fieldset> </fieldset>

View file

@ -226,7 +226,8 @@ def:handle_messages() ?><?cs
def:show_plugin_title() ?> def:show_plugin_title() ?>
<div class="plugin_system_title"> <div class="plugin_system_title">
<img src="icons/<?cs var:html_escape(Data.ActivePlugin) ?>" /> <img alt="icon: <?cs var:html_escape(Data.ActivePlugin) ?>" src="icons/<?cs
var:html_escape(Data.ActivePlugin) ?>" />
<h1><?cs var:Lang.Plugins[Data.ActivePlugin].Title ?></h1> <h1><?cs var:Lang.Plugins[Data.ActivePlugin].Title ?></h1>
</div><?cs </div><?cs
/def ?> /def ?>