|
|
|
@ -26,6 +26,14 @@ def:link(path, attr1, value1, attr2, value2)
|
|
|
|
|
/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
|
|
|
|
|
to use 'normal' and 'plugin' messages in a clean way:
|
|
|
|
|
Lang.WarningMessage.??? - used by core functions
|
|
|
|
@ -45,18 +53,16 @@ def:message_dispatch(mname, type, category)
|
|
|
|
|
call:link('cryptobox-misc/' + symbolFile,'','','','')
|
|
|
|
|
?>" alt="icon: info" /></td><td><?cs
|
|
|
|
|
# check if it is a 'normal' message ?><?cs
|
|
|
|
|
if:?Lang[category][mname].Title ?>
|
|
|
|
|
<h1><?cs var:html_escape(Lang[category][mname].Title) ?></h1>
|
|
|
|
|
<p><?cs var:html_escape(Lang[category][mname].Text) ?></p>
|
|
|
|
|
<?cs # check if the mname starts with "Plugins." ... ?><?cs
|
|
|
|
|
elif:(string.slice(mname,0,8) == "Plugins.") && ?Lang[plugPrefix][category][plugSuffix].Title ?>
|
|
|
|
|
<h1><?cs var:html_escape(Lang[plugPrefix][category][plugSuffix].Title) ?></h1>
|
|
|
|
|
<p><?cs var:html_escape(Lang[plugPrefix][category][plugSuffix].Text) ?></p>
|
|
|
|
|
<?cs # the message does not seem to exist ... ?><?cs
|
|
|
|
|
if:?Lang[category][mname].Title ?><?cs
|
|
|
|
|
call:show_messageNode(Lang[category][mname]) ?><?cs
|
|
|
|
|
# check if the mname starts with "Plugins." ... ?><?cs
|
|
|
|
|
elif:(string.slice(mname,0,8) == "Plugins.") && ?Lang[plugPrefix][category][plugSuffix].Title ?><?cs
|
|
|
|
|
call:show_messageNode(Lang[plugPrefix][category][plugSuffix]) ?><?cs
|
|
|
|
|
# the message does not seem to exist ... ?><?cs
|
|
|
|
|
else ?>
|
|
|
|
|
<h1>unknown <?cs var:type ?> message</h1>
|
|
|
|
|
<p>could not find <?cs var:type ?> message: '<?cs var:mname ?>'</p>
|
|
|
|
|
<?cs /if ?></td></tr></table></div><?cs
|
|
|
|
|
<p>could not find <?cs var:type ?> message: '<?cs var:mname ?>'</p><?cs
|
|
|
|
|
/if ?></td></tr></table></div><?cs
|
|
|
|
|
/def ?><?cs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -90,26 +96,32 @@ def:show_plugin(plugin, type) ?><?cs
|
|
|
|
|
/def ?><?cs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def:show_volume(index) ?><?cs
|
|
|
|
|
# show the icon of the volume ?>
|
|
|
|
|
<?cs if:Data.Disks[index].active ?><?cs
|
|
|
|
|
if:Data.Disks[index].encryption ?><?cs
|
|
|
|
|
def:show_volume_icon(volume) ?><?cs
|
|
|
|
|
# show the appropriate icon for the current state of the volume ?>
|
|
|
|
|
<?cs if:volume.active ?><?cs
|
|
|
|
|
if:volume.encryption ?><?cs
|
|
|
|
|
set:filename='volume_active_crypto.png' ?><?cs
|
|
|
|
|
else ?><?cs
|
|
|
|
|
set:filename='volume_active_plain.png' ?><?cs
|
|
|
|
|
/if ?><?cs
|
|
|
|
|
else ?><?cs
|
|
|
|
|
if:Data.Disks[index].encryption ?><?cs
|
|
|
|
|
if:volume.encryption ?><?cs
|
|
|
|
|
set:filename='volume_passive_crypto.png' ?><?cs
|
|
|
|
|
else ?><?cs
|
|
|
|
|
set:filename='volume_passive_plain.png' ?><?cs
|
|
|
|
|
/if ?><?cs
|
|
|
|
|
/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">
|
|
|
|
|
<a href="<?cs call:link('plugins/volume_mount','device',Data.Disks[index].device,'','') ?>" title="<?cs var:html_escape(Data.Disks[index].name) ?>">
|
|
|
|
|
<img src="<?cs call:link('cryptobox-misc/' + filename,'','','','') ?>" alt="icon: volume" /><br/><?cs
|
|
|
|
|
var:html_escape(Data.Disks[index].name) ?> (<?cs
|
|
|
|
|
var:html_escape(Data.Disks[index].size) ?>)</a></div><?cs
|
|
|
|
|
<a href="<?cs call:link('plugins/volume_mount','device',volume.device,'','') ?>" title="<?cs var:html_escape(volume.name) ?>">
|
|
|
|
|
<?cs call:show_volume_icon(volume) ?><br/><?cs
|
|
|
|
|
var:html_escape(volume.name) ?> (<?cs
|
|
|
|
|
var:html_escape(volume.size) ?>)</a></div><?cs
|
|
|
|
|
/def ?><?cs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|