moved message handling back to each plugin

adapted plugin interface specification
replaced some more transparent png files with gif
added "Get help" links to all plugins
master
lars 17 years ago
parent 0ae5ccaf15
commit fdff598a29

@ -2,6 +2,8 @@
<h1><?cs var:html_escape(Lang.Plugins.date.Title.ConfigDate) ?></h1>
<?cs call:handle_messages() ?>
<?cs call:print_form_header("set_date", "date") ?>
<p><label for="date"><?cs var:html_escape(Lang.Plugins.date.Text.Date) ?>: </label><br/>
@ -34,9 +36,11 @@
else ?><option><?cs /if ?><?cs if:x<10 ?>0<?cs /if ?><?cs var:x ?></option><?cs /loop ?>
</select></p>
<input type="hidden" name="store" value="yes" />
<p><input type="hidden" name="store" value="yes" />
<button type="submit" tabindex="6"><?cs var:html_escape(Lang.Plugins.date.Button.ConfigDate) ?></button>
<button type="submit" tabindex="6"><?cs var:html_escape(Lang.Plugins.date.Button.ConfigDate) ?></button></p>
</form>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,6 +2,8 @@
<h1><?cs var:html_escape(Lang.Plugins.disks.Title.Disks) ?></h1>
<?cs call:handle_messages() ?>
<?cs # TODO: add no-disks-available warning ?>
<?cs if:subcount(Data.Disks) == 0 ?>

@ -1,5 +1,7 @@
<?cs # $Id$ ?>
<?cs call:handle_messages() ?>
<div id="doc">
<?cs include:Settings.DocDir + '/' + Settings.Language + '/' + Data.Plugins.help.Page + '.html' ?>

@ -2,6 +2,8 @@
<h1><?cs var:html_escape(Lang.Plugins.language_selection.Title.Language) ?></h1>
<?cs call:handle_messages() ?>
<div id="lang">
<ul>
<?cs loop:index = #0, subcount(Data.Languages)-1, #1 ?>

@ -4,11 +4,11 @@
<?cs include:Data.Plugins.logs.StyleSheetFile ?>
</style>
<div id="log">
<h1><?cs var:html_escape(Lang.Plugins.logs.Title.Log) ?></h1>
<h1><?cs var:html_escape(Lang.Plugins.logs.Title.Log) ?></h1>
<?cs call:handle_messages() ?>
<?cs call:handle_messages() ?>
<div id="log">
<?cs if:Data.Plugins.logs.Content ?>
<p class="console"><?cs var:Data.Plugins.logs.Content ?></p>

@ -6,6 +6,8 @@
<h1><?cs var:html_escape(Lang.Plugins.network.Title.Network) ?></h1>
<?cs call:handle_messages() ?>
<?cs call:print_form_header("set_ip", "network") ?>
<p><label for="ip"><?cs var:html_escape(Lang.Plugins.network.Text.IP) ?>: </label>

@ -4,6 +4,8 @@
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
<?cs call:handle_messages() ?>
<?cs if:subcount(Data.Plugins.partition.BlockDevices) > 0 ?>
<?cs call:print_form_header("select_device", "partition") ?>
@ -41,3 +43,5 @@
<?cs # a warning will be displayed if there are no disks available ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -7,6 +7,8 @@
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
<?cs call:handle_messages() ?>
<div align="center">
<table class="partition">
<tr>
@ -74,5 +76,7 @@
</ul></p>
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>
<?cs /if ?>

@ -4,6 +4,8 @@
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
<?cs call:handle_messages() ?>
<p><?cs var:html_escape(Lang.Plugins.partition.Text.ProgressInfo) ?>
<ul>
<?cs loop: x = #0, subcount(Data.Plugins.partition.Parts)-1, #1 ?>

@ -58,6 +58,7 @@ Language file structure:
Clearsilver template:
- should start with a "<h1>" tag (volume plugins: "h3")
- the title should be followd by '<?cs call:handle_messages() ?>'
- links to the plugin (e.g. in form headers) could look like the following:
<?cs call:link("PLUGINNAME",'','','','') ?>

@ -16,6 +16,7 @@
}
table.plugin_list a img {
moved
border: none;
}
</style>
@ -23,6 +24,8 @@
<h1><?cs var:html_escape(Lang.Plugins.plugin_manager.Title.PluginManager) ?></h1>
<?cs call:handle_messages() ?>
<?cs # just as a sidenote: we add the strange 'x' argument below to prevent the browser
from thinking, that it can use the cached page again, if a user calls the "down" or
"up" action twice for the same plugin ?>
@ -59,9 +62,9 @@ each:x = Settings.PluginList ?><?cs if:(x.Rank == index) && x.Types.volume
<td><input type="checkbox" name="<?cs var:name(x) ?>_auth" <?cs if:x.RequestAuth ?>checked="checked"<?cs /if ?> /></td>
<td>
<?cs if:run_counter != all_count ?><a href="<?cs call:link("plugin_manager", "plugin_name", name(x), "action", "down") ?>&x=<?cs var:run_counter ?>#volume_plugins">
<img src="icons/plugin_manager?image=tango-go-down.png" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" /></a><?cs /if ?>
<img src="icons/plugin_manager?image=tango-go-down.gif" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" /></a><?cs /if ?>
<?cs if:run_counter != 1 ?><a href="<?cs call:link("plugin_manager", "plugin_name", name(x), "action", "up") ?>&x=<?cs var:run_counter ?>#volume_plugins" >
<img src="icons/plugin_manager?image=tango-go-up.png" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" /></a><?cs /if ?>
<img src="icons/plugin_manager?image=tango-go-up.gif" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" /></a><?cs /if ?>
<input type="hidden" name="<?cs var:html_escape(name(x)) ?>_rank" value="<?cs var:html_escape(x.Rank) ?>" />
<input type="hidden" name="<?cs var:name(x) ?>_listed" value="1" /></td>
</tr><?cs /if ?><?cs /each ?><?cs /loop ?>
@ -98,9 +101,9 @@ each:x = Settings.PluginList ?><?cs if:(x.Rank == index) && !x.Types.volume
<td><input type="checkbox" name="<?cs var:name(x) ?>_auth" <?cs if:x.RequestAuth ?>checked="checked"<?cs /if ?> /></td>
<td>
<?cs if:run_counter != all_count ?><a href="<?cs call:link("plugin_manager", "plugin_name", name(x), "action", "down") ?>&x=<?cs var:run_counter ?>#system_plugins">
<img src="icons/plugin_manager?image=tango-go-down.png" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" /></a><?cs /if ?>
<img src="icons/plugin_manager?image=tango-go-down.gif" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Down) ?>" /></a><?cs /if ?>
<?cs if:run_counter != 1 ?><a href="<?cs call:link("plugin_manager", "plugin_name", name(x), "action", "up") ?>&x=<?cs var:run_counter ?>#<?cs var:html_escape(name(x)) ?>" >
<img src="icons/plugin_manager?image=tango-go-up.png" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" /></a><?cs /if ?>
<img src="icons/plugin_manager?image=tango-go-up.gif" alt="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" title="<?cs var:html_escape(Lang.Plugins.plugin_manager.Button.Up) ?>" /></a><?cs /if ?>
<input type="hidden" name="<?cs var:html_escape(name(x)) ?>_rank" value="<?cs var:html_escape(x.Rank) ?>" />
<input type="hidden" name="<?cs var:name(x) ?>_listed" value="1" /></td>
</tr><?cs /if ?><?cs /each ?><?cs /loop ?>
@ -113,4 +116,5 @@ each:x = Settings.PluginList ?><?cs if:(x.Rank == index) && !x.Types.volume
</form>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,12 +2,17 @@
<h1><?cs var:html_escape(Lang.Plugins.shutdown.Title.Shutdown) ?></h1>
<?cs call:handle_messages() ?>
<div class="plugin_system">
<a href="<?cs call:link('shutdown','type','shutdown','','') ?>">
<img src="<?cs call:link('icons/shutdown','image','gnome-shutdown.png','','')
<img src="<?cs call:link('icons/shutdown','image','gnome-shutdown.gif','','')
?>" alt="icon: shutdown" /><br/><?cs var:html_escape(Lang.Plugins.shutdown.Button.Shutdown) ?></a></div>
<div class="plugin_system">
<a href="<?cs call:link('shutdown','type','reboot','','') ?>">
<img src="<?cs call:link('icons/shutdown','image','gnome-reboot.png','','')
<img src="<?cs call:link('icons/shutdown','image','gnome-reboot.gif','','')
?>" alt="icon: reboot" /><br/><?cs var:html_escape(Lang.Plugins.shutdown.Button.Reboot) ?></a></div>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,3 +2,5 @@
<h1><?cs var:html_escape(Lang.Plugins.shutdown.Title.ProgressReboot) ?></h1>
<?cs call:handle_messages() ?>

@ -2,3 +2,5 @@
<h1><?cs var:html_escape(Lang.Plugins.shutdown.Title.ProgressShutdown) ?></h1>
<?cs call:handle_messages() ?>

@ -2,6 +2,8 @@
<h1><?cs var:html_escape(Lang.Plugins.system_preferences.Title.Preferences) ?></h1>
<?cs call:handle_messages() ?>
<?cs # sort the Plugins - using the most stupid way :) ?>
<?cs loop: order = #0, #100, #1
?><?cs # plugins ?><?cs each:x = Settings.PluginList

@ -11,7 +11,7 @@
<h1><?cs var:html_escape(Lang.Plugins.user_manager.Title.UserManager) ?></h1>
<?cs call:handle_messages() ?>
<h2><?cs var:html_escape(Lang.Plugins.user_manager.Title.AddUser) ?></h2>
<?cs call:print_form_header("add_user", "user_manager") ?>
@ -72,3 +72,5 @@
</form></td></tr></table>
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,6 +2,8 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_automount.Title.AutoMountVolume) ?></h3>
<?cs call:handle_messages() ?>
<?cs if:!Data.CurrentDisk.encryption ?>
<p><?cs call:print_form_header("automount", "volume_automount") ?>
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
@ -19,3 +21,5 @@
<?cs call:hint("Plugins.volume_automount.NoAutoMountForEncryptedVolumes") ?>
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,6 +2,8 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_chpasswd.Title.ChangePassword) ?></h3>
<?cs call:handle_messages() ?>
<?cs # show password change form only for encrypted volumes ?>
<?cs if:Data.CurrentDisk.encryption ?>
<?cs call:print_form_header("set_password", "volume_chpasswd") ?>
@ -31,3 +33,5 @@
<?cs call:hint("Plugins.volume_chpasswd.FormatForEncryptionSupport") ?>
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,6 +2,8 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_details.Title.Details) ?></h3>
<?cs call:handle_messages() ?>
<ul>
<li><?cs var:html_escape(Lang.Text.ContainerName) ?>: <?cs var:html_escape(Data.CurrentDisk.name) ?></li>
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.DeviceName) ?>: <?cs var:html_escape(Data.CurrentDisk.device) ?></li>

@ -2,6 +2,8 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_format_fs.Title.Format) ?></h3>
<?cs call:handle_messages() ?>
<?cs if:Data.CurrentDisk.active ?>
<?cs call:hint("Plugins.volume_format_fs.UnmountBeforeInit") ?>
<?cs else ?>
@ -30,3 +32,5 @@
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,6 +2,8 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_format_fs.Title.Format) ?></h3>
<?cs call:handle_messages() ?>
<?cs if:Data.CurrentDisk.active ?>
<?cs call:hint("Plugins.volume_format_fs.UnmountBeforeInit") ?>
<?cs else ?>
@ -25,3 +27,5 @@
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -1,5 +1,7 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_mount.Title.Mount) ?></h3>
<?cs call:handle_messages() ?>
<?cs call:print_form_header("mount", "volume_mount") ?><p>
<input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<?cs if:Data.CurrentDisk.encryption ?>
@ -14,3 +16,5 @@
<button type="submit" tabindex="2"><?cs var:html_escape(Lang.Plugins.volume_mount.Button.Mount) ?></button>
</p></form>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -1,8 +1,12 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_mount.Title.Umount) ?></h3>
<?cs call:handle_messages() ?>
<?cs call:print_form_header("umount", "volume_mount") ?>
<p><input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="action" value="umount" />
<button type="submit" tabindex="2"><?cs var:html_escape(Lang.Plugins.volume_mount.Button.Umount) ?></button></p>
</form>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

@ -2,6 +2,8 @@
<h2><?cs var:html_escape(Lang.Plugins.volume_props.Title.Properties) ?></h2>
<?cs call:handle_messages() ?>
<?cs if:Data.Plugins.volume_props.includePlugins ?>
<?cs # we use 'evar', as we expect 'include' commands inside the variable ?>
<?cs evar:Data.Plugins.volume_props.includePlugins ?>

@ -2,6 +2,8 @@
<h3><?cs var:html_escape(Lang.Plugins.volume_rename.Title.ChangeVolumeName) ?></h3>
<?cs call:handle_messages() ?>
<?cs if:Data.CurrentDisk.active ?>
<?cs call:hint("Plugins.volume_rename.NoRenameIfActive") ?>
<?cs else ?>
@ -14,3 +16,5 @@
</form></p>
<?cs /if ?>
<?cs call:help_link("CryptoBoxUserConfiguration") ?>

Loading…
Cancel
Save