cryptonas/plugins/plugin_manager/plugin_list.cs
2006-11-09 17:43:14 +00:00

106 lines
5.3 KiB
C#

<?cs # $Id$ ?>
<style type="text/css">
table.plugin_list {
text-align: center;
}
table.plugin_list td, table.plugin_list th {
padding-left: 5px;
padding-right: 5px;
}
table.plugin_list td img {
width: 24px;
height: 24px;
}
table.plugin_list a img {
border: none;
}
</style>
<h1><?cs var:html_escape(Lang.Plugins.plugin_manager.Title.PluginManager) ?></h1>
<?cs call:handle_messages() ?>
<h2><a name="volume_plugins"/><?cs var:html_escape(Lang.Plugins.plugin_manager.Title.VolumePlugins) ?></h2>
<?cs call:print_form_header("manage_plugins", "plugin_manager") ?>
<table class="plugin_list">
<tr>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginName) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginEnabled) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.RequestsAuth) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginRank) ?></th>
</tr>
<?cs # count volume plugins ?><?cs set: all_count = #0
?><?cs each:x = Settings.PluginList ?><?cs if: x.Types.volume ?><?cs
set: all_count = all_count + 1 ?><?cs /if ?><?cs /each ?>
<?cs set:run_counter = 0 ?><?cs
loop: index = #0, #100, #1 ?><?cs
each:x = Settings.PluginList ?><?cs if:(x.Rank == index) && x.Types.volume
?><?cs set: run_counter = run_counter + 1 ?><tr>
<td style="text-align:left"><a name="<?cs var:html_escape(name(x)) ?>"><?cs var:html_escape(x.Name) ?></a></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_visible_volume" <?cs if:x.Visible.volume ?>checked="checked"<?cs /if ?> /></td>
<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") ?>#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 ?>
<?cs if:run_counter != 1 ?><a href="<?cs call:link("plugin_manager", "plugin_name", name(x), "action", "up") ?>#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 ?>
<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 ?>
</table>
<h2><a name="system_plugins"/><?cs var:html_escape(Lang.Plugins.plugin_manager.Title.SystemPlugins) ?></h2>
<table class="plugin_list">
<tr>
<th></th>
<th colspan="2"><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.WhereVisible) ?></th>
<th></th>
<th></th>
<th></th>
</tr>
<?cs # count non-volume plugins ?><?cs set: all_count = #0
?><?cs each:x = Settings.PluginList ?><?cs if: !x.Types.volume ?><?cs
set: all_count = all_count + 1 ?><?cs /if ?><?cs /each ?>
<tr>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginName) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.InMenu) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.InPreferences) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.RequestsAuth) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginRank) ?></th>
</tr>
<?cs set:run_counter = 0 ?><?cs
loop:index = #0, #100, #1 ?><?cs
each:x = Settings.PluginList ?><?cs if:(x.Rank == index) && !x.Types.volume
?><?cs set: run_counter = run_counter + 1 ?><tr>
<td style="text-align:left"><a name="<?cs var:html_escape(name(x)) ?>"><?cs var:html_escape(x.Name) ?></a></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_visible_menu" <?cs if:x.Visible.menu ?>checked="checked"<?cs /if ?> /></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_visible_preferences" <?cs if:x.Visible.preferences ?>checked="checked"<?cs /if ?> /></td>
<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") ?>#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 ?>
<?cs if:run_counter != 1 ?><a href="<?cs call:link("plugin_manager", "plugin_name", name(x), "action", "up") ?>#<?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 ?>
<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 ?>
</table>
<p>
<input type="hidden" name="store" value="1" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.plugin_manager.Button.SaveSettings) ?></button>
</p>
</form>