added volume plugin icons
added environemt warnings
This commit is contained in:
parent
09b4aa12d6
commit
2d7b34afaa
4 changed files with 45 additions and 21 deletions
|
@ -69,5 +69,11 @@
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?cs if:?Data.EnvironmentWarning ?>
|
||||||
|
<div id="EnvironmentWarning">
|
||||||
|
<?cs call:warning(Data.EnvironmentWarning) ?>
|
||||||
|
</div>
|
||||||
|
<?cs /if ?>
|
||||||
|
|
||||||
<div id="words">
|
<div id="words">
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,14 @@ def:link(path, attr1, value1, attr2, value2)
|
||||||
/def ?><?cs
|
/def ?><?cs
|
||||||
|
|
||||||
|
|
||||||
|
def:show_messageNode(node) ?>
|
||||||
|
<h1><?cs var:html_escape(node.Title) ?></h1>
|
||||||
|
<p><?cs var:html_escape(node.Text) ?></p><?cs
|
||||||
|
if:?node.Link.Text ?>
|
||||||
|
<p class="message_link"><a href="<?cs var:node.Link.Link ?>" title="<?cs var:html_escape(node.Link.Text) ?>"><?cs var:html_escape(node.Link.Text) ?></a></p><?cs /if ?><?cs
|
||||||
|
/def ?><?cs
|
||||||
|
|
||||||
|
|
||||||
# the following macro is as ugly as possible - but somehow we have to manage
|
# the following macro is as ugly as possible - but somehow we have to manage
|
||||||
to use 'normal' and 'plugin' messages in a clean way:
|
to use 'normal' and 'plugin' messages in a clean way:
|
||||||
Lang.WarningMessage.??? - used by core functions
|
Lang.WarningMessage.??? - used by core functions
|
||||||
|
@ -45,18 +53,16 @@ def:message_dispatch(mname, type, category)
|
||||||
call:link('cryptobox-misc/' + symbolFile,'','','','')
|
call:link('cryptobox-misc/' + symbolFile,'','','','')
|
||||||
?>" alt="icon: info" /></td><td><?cs
|
?>" alt="icon: info" /></td><td><?cs
|
||||||
# check if it is a 'normal' message ?><?cs
|
# check if it is a 'normal' message ?><?cs
|
||||||
if:?Lang[category][mname].Title ?>
|
if:?Lang[category][mname].Title ?><?cs
|
||||||
<h1><?cs var:html_escape(Lang[category][mname].Title) ?></h1>
|
call:show_messageNode(Lang[category][mname]) ?><?cs
|
||||||
<p><?cs var:html_escape(Lang[category][mname].Text) ?></p>
|
# check if the mname starts with "Plugins." ... ?><?cs
|
||||||
<?cs # check if the mname starts with "Plugins." ... ?><?cs
|
elif:(string.slice(mname,0,8) == "Plugins.") && ?Lang[plugPrefix][category][plugSuffix].Title ?><?cs
|
||||||
elif:(string.slice(mname,0,8) == "Plugins.") && ?Lang[plugPrefix][category][plugSuffix].Title ?>
|
call:show_messageNode(Lang[plugPrefix][category][plugSuffix]) ?><?cs
|
||||||
<h1><?cs var:html_escape(Lang[plugPrefix][category][plugSuffix].Title) ?></h1>
|
# the message does not seem to exist ... ?><?cs
|
||||||
<p><?cs var:html_escape(Lang[plugPrefix][category][plugSuffix].Text) ?></p>
|
|
||||||
<?cs # the message does not seem to exist ... ?><?cs
|
|
||||||
else ?>
|
else ?>
|
||||||
<h1>unknown <?cs var:type ?> message</h1>
|
<h1>unknown <?cs var:type ?> message</h1>
|
||||||
<p>could not find <?cs var:type ?> message: '<?cs var:mname ?>'</p>
|
<p>could not find <?cs var:type ?> message: '<?cs var:mname ?>'</p><?cs
|
||||||
<?cs /if ?></td></tr></table></div><?cs
|
/if ?></td></tr></table></div><?cs
|
||||||
/def ?><?cs
|
/def ?><?cs
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,26 +96,32 @@ def:show_plugin(plugin, type) ?><?cs
|
||||||
/def ?><?cs
|
/def ?><?cs
|
||||||
|
|
||||||
|
|
||||||
def:show_volume(index) ?><?cs
|
def:show_volume_icon(volume) ?><?cs
|
||||||
# show the icon of the volume ?>
|
# show the appropriate icon for the current state of the volume ?>
|
||||||
<?cs if:Data.Disks[index].active ?><?cs
|
<?cs if:volume.active ?><?cs
|
||||||
if:Data.Disks[index].encryption ?><?cs
|
if:volume.encryption ?><?cs
|
||||||
set:filename='volume_active_crypto.png' ?><?cs
|
set:filename='volume_active_crypto.png' ?><?cs
|
||||||
else ?><?cs
|
else ?><?cs
|
||||||
set:filename='volume_active_plain.png' ?><?cs
|
set:filename='volume_active_plain.png' ?><?cs
|
||||||
/if ?><?cs
|
/if ?><?cs
|
||||||
else ?><?cs
|
else ?><?cs
|
||||||
if:Data.Disks[index].encryption ?><?cs
|
if:volume.encryption ?><?cs
|
||||||
set:filename='volume_passive_crypto.png' ?><?cs
|
set:filename='volume_passive_crypto.png' ?><?cs
|
||||||
else ?><?cs
|
else ?><?cs
|
||||||
set:filename='volume_passive_plain.png' ?><?cs
|
set:filename='volume_passive_plain.png' ?><?cs
|
||||||
/if ?><?cs
|
/if ?><?cs
|
||||||
/if ?>
|
/if ?>
|
||||||
|
<img src="<?cs call:link('cryptobox-misc/' + filename,'','','','') ?>" alt="icon: volume" /><?cs
|
||||||
|
/def ?><?cs
|
||||||
|
|
||||||
|
|
||||||
|
def:show_volume(volume) ?><?cs
|
||||||
|
# show the icon of the volume ?>
|
||||||
<div class="volume">
|
<div class="volume">
|
||||||
<a href="<?cs call:link('plugins/volume_mount','device',Data.Disks[index].device,'','') ?>" title="<?cs var:html_escape(Data.Disks[index].name) ?>">
|
<a href="<?cs call:link('plugins/volume_mount','device',volume.device,'','') ?>" title="<?cs var:html_escape(volume.name) ?>">
|
||||||
<img src="<?cs call:link('cryptobox-misc/' + filename,'','','','') ?>" alt="icon: volume" /><br/><?cs
|
<?cs call:show_volume_icon(volume) ?><br/><?cs
|
||||||
var:html_escape(Data.Disks[index].name) ?> (<?cs
|
var:html_escape(volume.name) ?> (<?cs
|
||||||
var:html_escape(Data.Disks[index].size) ?>)</a></div><?cs
|
var:html_escape(volume.size) ?>)</a></div><?cs
|
||||||
/def ?><?cs
|
/def ?><?cs
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,13 @@
|
||||||
|
|
||||||
<?cs # TODO: show buttons for available plugins ?>
|
<?cs # TODO: show buttons for available plugins ?>
|
||||||
|
|
||||||
|
<div id="volume_name">
|
||||||
|
<table><tr><td>
|
||||||
<h1><?cs var:html_escape(Lang.Title.Volume) ?> <i><?cs var:html_escape(Data.CurrentDisk.name) ?></i></h1>
|
<h1><?cs var:html_escape(Lang.Title.Volume) ?> <i><?cs var:html_escape(Data.CurrentDisk.name) ?></i></h1>
|
||||||
|
</td><td>
|
||||||
|
<?cs call:show_volume_icon(Data.CurrentDisk) ?>
|
||||||
|
</td></tr></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table id="volume_area">
|
<table id="volume_area">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<td <?cs if:Data.ActivePlugin == name(x)
|
<td <?cs if:Data.ActivePlugin == name(x)
|
||||||
?>class="volume_plugin_active"<?cs
|
?>class="volume_plugin_active"<?cs
|
||||||
else ?>class="volume_plugin_passive"<?cs
|
else ?>class="volume_plugin_passive"<?cs
|
||||||
/if ?>><a href="<?cs call:link('plugins/' + name(x),'device',Data.CurrentDisk.device,'','') ?>" title="<?cs var:html_escape(x.Link) ?>"><?cs var:html_escape(x.Link) ?></a></td><?cs
|
/if ?>><a href="<?cs call:link('plugins/' + name(x),'device',Data.CurrentDisk.device,'','') ?>" title="<?cs var:html_escape(x.Link) ?>"><img src="<?cs call:link("icons/plugins/" + name(x),'','','','') ?>" alt="icon: <?cs var:html_escape(name(x)) ?>" /> <?cs var:html_escape(x.Link) ?></a></td><?cs
|
||||||
/if ?><?cs
|
/if ?><?cs
|
||||||
/each ?><?cs
|
/each ?><?cs
|
||||||
/loop ?>
|
/loop ?>
|
||||||
|
|
Loading…
Reference in a new issue