new release is tagged
This commit is contained in:
parent
25aae11576
commit
33a8c4a1bb
719 changed files with 106587 additions and 0 deletions
6
v0.3/templates/access_denied.cs
Normal file
6
v0.3/templates/access_denied.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
<h1><?cs var:html_escape(Lang.Title.AccessDenied) ?></h1>
|
||||
|
||||
<?cs call:warning("AccessDenied") ?>
|
||||
|
||||
<?cs call:handle_messages() ?>
|
||||
|
6
v0.3/templates/empty.cs
Normal file
6
v0.3/templates/empty.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<?cs # what else would you expect here? ?>
|
||||
|
||||
<?cs call:handle_messages() ?>
|
||||
|
41
v0.3/templates/footer.cs
Normal file
41
v0.3/templates/footer.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<?cs if:Data.Redirect ?>
|
||||
<p class="warning"><a href="<?cs if:Data.Redirect.URL ?><?cs var:Data.Redirect.URL ?><?cs else ?><?cs call:link(Data.Redirect.Action,'','','','') ?><?cs /if ?>"><?cs var:html_escape(Lang.Text.RedirectNote) ?></a></p>
|
||||
<?cs /if ?>
|
||||
|
||||
</div><!-- end of 'words' -->
|
||||
|
||||
<?cs # ugly way of getting a 'min-height' for IE6 ?>
|
||||
</td><td id="pane_right"><p style="height:260px;" /></tr>
|
||||
|
||||
|
||||
<tr><td/><td><div id="footer">
|
||||
<?cs var:Data.Version ?>
|
||||
<a href="http://cryptobox.org" title="<?cs var:html_escape(Lang.Text.ProjectHomePage) ?>">CryptoBox-Home</a> <?cs var:html_escape(Lang.Text.ProjectNote) ?> <a href="http://senselab.org/" title="systemausfall.org">sense.lab</a>
|
||||
</div></td><td/></tr>
|
||||
<?cs # ugly way of getting a 'min-width' for IE6 ?>
|
||||
<tr><td/><td><p style="width:600px;" /><td/></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div><!-- end of 'main' -->
|
||||
|
||||
<!-- CBOX-STATUS-begin - used for validation - do not touch!
|
||||
Settings.Language=<?cs var:html_escape(Settings.Language) ?>
|
||||
Data.Version=<?cs var:html_escape(Data.Version) ?>
|
||||
Data.ScriptURL=<?cs var:html_escape(Data.ScriptURL) ?>
|
||||
<?cs each:x = Data.Status.Plugins ?>Data.Status.Plugins.<?cs
|
||||
var:name(x) ?>=<?cs var: html_escape(x) ?>
|
||||
<?cs /each
|
||||
?>CBOX-STATUS-end -->
|
||||
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<?cs # check, if the macro 'handle_messages' was called before - otherwise place a warning ?>
|
||||
<?cs if:!messages_are_handled ?>MESSAGES WERE NOT HANDLED PROPERLY - PLEASE FIX THIS!<?cs /if ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
91
v0.3/templates/header.cs
Normal file
91
v0.3/templates/header.cs
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<?cs # $Id$ ?>
|
||||
|
||||
<head>
|
||||
<title>CryptoBox</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" media="screen" href="<?cs var:Settings.Stylesheet ?>" type="text/css" />
|
||||
<?cs if:?Data.Redirect.URL ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs var:Data.Redirect.URL ?>" /><?cs
|
||||
elif:Data.Redirect.Action ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs call:link(Data.Redirect.Action,'','','','') ?>" /><?cs /if ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="main_menu">
|
||||
<?cs # three possibilities to find the active ('to be marked') plugin:
|
||||
- the active plugin is a volume plugin -> mark 'disks'
|
||||
- the active plugin is part of the menu list -> mark it
|
||||
- the rest: mark 'preferences' ?><?cs
|
||||
if:Settings.PluginList[Data.ActivePlugin].Types.volume ?><?cs
|
||||
set:markPlugin = 'disks' ?><?cs
|
||||
else ?><?cs
|
||||
# first: set default value ?><?cs
|
||||
set:markPlugin = 'system_preferences' ?><?cs
|
||||
# check if the active plugin is visible in the menu ?><?cs
|
||||
each:plugin = Settings.PluginList ?><?cs
|
||||
if:plugin.Visible.menu && (name(plugin) == Data.ActivePlugin) ?><?cs
|
||||
set:markPlugin = name(plugin) ?><?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
/if ?><?cs
|
||||
# sort the Plugins - using the most stupid way :) ?><?cs
|
||||
loop: order = #0, #100, #1 ?><?cs
|
||||
# plugins ?><?cs each:x = Settings.PluginList ?><?cs
|
||||
if:x.Types.system && x.Visible.menu && x.Rank == order ?>
|
||||
<div class="plugin_menu plugin_menu_<?cs
|
||||
if:markPlugin == name(x) ?>active<?cs else ?>passive<?cs /if
|
||||
?>"><a href="<?cs call:link(name(x),'','','','') ?>" title="<?cs
|
||||
var:html_escape(x.Link) ?>"><img src="<?cs
|
||||
call:link('icons/' + name(x), '','','','') ?>" alt="<?cs
|
||||
var:html_escape('icon: ' + name(x)) ?>" /><br/><?cs
|
||||
var:html_escape(x.Link) ?></a></div><?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
/loop ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
<table id="pane">
|
||||
|
||||
<tr><td colspan="3"><div id="head">
|
||||
<table>
|
||||
<tr><td>
|
||||
<h1><?cs var:html_escape(Lang.Title.Top) ?></h1>
|
||||
<h2><?cs var:html_escape(Lang.Title.Slogan) ?></h2>
|
||||
</td>
|
||||
<td>
|
||||
<?cs if:Data.activeDisksCount > 0 ?><?cs
|
||||
set:logoFile = "cbx-text-logo2.png" ?><?cs
|
||||
else ?><?cs
|
||||
set:logoFile = "cbx-text-logo1.png" ?><?cs
|
||||
/if ?>
|
||||
<div class="logo"><a href="<?cs call:link("", "", "", "", "")
|
||||
?>" title="CryptoBox"><img src="cryptobox-misc/<?cs var:logoFile
|
||||
?>" alt="icon: logo" />
|
||||
</a></div>
|
||||
<?cs call:help_link() ?>
|
||||
</td></tr></table>
|
||||
</div></td></tr>
|
||||
|
||||
<?cs if:?Data.EnvironmentWarning ?>
|
||||
<tr><td colspan="3"><div id="EnvironmentWarning"><?cs
|
||||
call:environment_warning(Data.EnvironmentWarning) ?></div></td></tr>
|
||||
<?cs /if ?>
|
||||
|
||||
|
||||
<tr><td id="pane_left_top" /><td id="pane_top" /><td id="pane_right_top" /></tr>
|
||||
<tr><td id="pane_left" />
|
||||
<td id="pane_content">
|
||||
|
||||
<div id="words">
|
||||
|
109
v0.3/templates/language.hdf
Normal file
109
v0.3/templates/language.hdf
Normal file
|
@ -0,0 +1,109 @@
|
|||
Title {
|
||||
Top = The CryptoBox
|
||||
Slogan = Privacy for the rest of us.
|
||||
Volume = Volume
|
||||
AccessDenied = Access denied
|
||||
}
|
||||
|
||||
|
||||
Text {
|
||||
EnterCurrentPassword = Enter the current password
|
||||
EnterNewPassword = Enter new password
|
||||
EnterSamePassword = Repeat new password
|
||||
RedirectNote = Click here if your browser does not support automatic redirection.
|
||||
ProjectHomePage = Website of project
|
||||
ProjectNote = The CryptoBox is a project of
|
||||
ContainerName = Volume's name
|
||||
|
||||
}
|
||||
|
||||
|
||||
Button {
|
||||
EnableHelp = Enable help
|
||||
DisableHelp = Disable help
|
||||
}
|
||||
|
||||
|
||||
AdviceMessage {
|
||||
|
||||
VolumeIsBusy {
|
||||
Title = Disk is busy
|
||||
Text = This disk is currently busy. Please wait for a moment.
|
||||
Link.Rel = /
|
||||
Link.Text = Show all disks
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WarningMessage {
|
||||
|
||||
AccessDenied {
|
||||
Title = Invalid access credentials
|
||||
Text = Sorry - you did not enter the right credentials! Maybe you should try the default setting: username=>'admin' / password=>'admin'.
|
||||
}
|
||||
|
||||
EmptyPassword {
|
||||
Title = Missing password
|
||||
Text = You have to enter a password!
|
||||
}
|
||||
|
||||
EmptyNewPassword {
|
||||
Title = Missing new password
|
||||
Text = You have to enter a new password!
|
||||
}
|
||||
|
||||
DifferentPasswords {
|
||||
Title = Different passwords
|
||||
Text = The passwords you entered did not match.
|
||||
}
|
||||
|
||||
InvalidDevice {
|
||||
Title = Invalid device
|
||||
Text = The device you have chosen is invalid!
|
||||
}
|
||||
|
||||
VolumeMayNotBeMounted {
|
||||
Title = The volume is open
|
||||
Text = This action is not available while the volume is active. Please close it first.
|
||||
Link.Text = Close volume
|
||||
Link.Rel = volume_mount
|
||||
Link.Attr1.name = action
|
||||
Link.Attr1.value = umount
|
||||
}
|
||||
|
||||
InvalidAction {
|
||||
Title = Invalid request
|
||||
Text = Sorry - I do not know how to handle this request. If you think, that this is a bug, then you should send the most recent part of the CryptoBox log to info@cryptobox.org.
|
||||
Link.Text = View log
|
||||
Link.Rel = logs
|
||||
Link.Attr1.name = lines
|
||||
Link.Attr1.value = 50
|
||||
|
||||
}
|
||||
|
||||
RuntimeError {
|
||||
Title = Something weird happened
|
||||
Text = We (the developer of the CryptoBox) would like to fix this problem for you and others. Please send the most recent part of the CryptoBox log to info@cryptobox.org. Thanks for your contribution!
|
||||
Link.Text = View log
|
||||
Link.Rel = logs
|
||||
Link.Attr1.name = level
|
||||
Link.Attr1.value = ERROR
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EnvironmentWarning {
|
||||
|
||||
ReadOnlyConfig {
|
||||
Text = Read-only setup detected - probably you should create a configuration partition.
|
||||
Link.Text = Initialize partition
|
||||
Link.Rel = partition
|
||||
}
|
||||
|
||||
NoSSL {
|
||||
Text = The connection is not encrypted - passwords can be easily intercepted.
|
||||
Link.Text = Use encrypted connection
|
||||
Link.Prot = https
|
||||
}
|
||||
}
|
||||
}
|
223
v0.3/templates/macros.cs
Normal file
223
v0.3/templates/macros.cs
Normal file
|
@ -0,0 +1,223 @@
|
|||
<?cs # $Id$ ?><?cs
|
||||
|
||||
def:link(path, attr1, value1, attr2, value2)
|
||||
?><?cs # first: override previous content of "Temp"
|
||||
?><?cs each:attrs = Temp
|
||||
?><?cs set:attrs = ""
|
||||
?><?cs /each
|
||||
?><?cs each:attrs = Settings.LinkAttrs
|
||||
?><?cs set:Temp[name(attrs)] = attrs
|
||||
?><?cs /each
|
||||
?><?cs if:attr1 != "" ?><?cs set:Temp[attr1] = value1 ?><?cs /if
|
||||
?><?cs if:attr2 != "" ?><?cs set:Temp[attr2] = value2 ?><?cs /if
|
||||
?><?cs var:path
|
||||
?><?cs set:first_each = 1
|
||||
?><?cs if:subcount(Temp) > 0
|
||||
?><?cs each:attrs = Temp
|
||||
?><?cs if:(name(attrs) != "") && (attrs != "")
|
||||
?><?cs if:first_each == 1 ?><?cs
|
||||
set:first_each = 0 ?>?<?cs
|
||||
else
|
||||
?>&<?cs /if
|
||||
?><?cs var:url_escape(name(attrs)) ?>=<?cs var:url_escape(attrs)
|
||||
?><?cs /if
|
||||
?><?cs /each
|
||||
?><?cs /if ?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:show_messageNode(node) ?><?cs
|
||||
# expects a node of the hdf tree containing a warning/success/environment message
|
||||
?><td class="text"><?cs
|
||||
if:?node.Title ?><h1><?cs var:html_escape(node.Title) ?></h1><?cs /if ?><?cs
|
||||
if:?node.Text ?><?cs var:html_escape(node.Text) ?><?cs /if ?></td><?cs
|
||||
if:subcount(node.Link) > 0
|
||||
?><td class="link"><a href="<?cs
|
||||
if:node.Link.Abs ?><?cs
|
||||
var:node.Link.Abs ?><?cs
|
||||
elif:node.Link.Prot ?><?cs
|
||||
if:?Data.Proxy.ScriptPath ?><?cs
|
||||
var:node.Link.Prot + "://" + Data.Proxy.Host + Data.Proxy.ScriptPath + node.Link.Rel ?><?cs
|
||||
else ?><?cs
|
||||
var:node.Link.Prot + "://" + Data.ScriptURL.Host + Data.ScriptURL.Path + node.Link.Rel ?><?cs
|
||||
/if ?><?cs
|
||||
else ?><?cs
|
||||
call:link(node.Link.Rel, node.Link.Attr1.name, node.Link.Attr1.value, node.Link.Attr2.name, node.Link.Attr2.value) ?><?cs
|
||||
/if ?>" title="<?cs var:html_escape(node.Link.Text) ?>"><?cs
|
||||
var:html_escape(node.Link.Text) ?></a></td><?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.???: defined by core functions
|
||||
- Lang.Plugins.PLUGINNAME.WarningMessage.???: defined by plugins
|
||||
parameters:
|
||||
- mname: name of the message (e.g.: "InvalidInput")
|
||||
- type: choose one: { warning | success | environment_warning }
|
||||
- category: choose one: { WarningMessage | SuccessMessage | EnvironmentWarning }
|
||||
?><?cs
|
||||
def:message_dispatch(mname, type, category)
|
||||
?><?cs # split the message name into a (potentially existing) plugin-name prefix and the suffix (the python equivalent of the following three lines would be:
|
||||
plugPrefix, PlugSuffix = mname[0:mname.find(".",8), mname[mname.find(".",8)+1:]
|
||||
?><?cs # initialization ?><?cs set:savedX = 0 ?><?cs
|
||||
loop:x = #8, #40, #1 ?><?cs if:(string.slice(mname,x,x+1) == ".") && !savedX ?><?cs set:savedX = x ?><?cs /if ?><?cs /loop
|
||||
?><?cs set:plugPrefix = string.slice(mname,0,savedX)
|
||||
?><?cs set:plugSuffix = string.slice(mname,savedX+1,string.length(mname))
|
||||
?><?cs # choose the appropriate symbol file
|
||||
?><?cs if:type == "success" ?><?cs
|
||||
set:symbolFile = "dialog-information_tango.gif"
|
||||
?><?cs elif:type == "warning" ?><?cs
|
||||
set:symbolFile = "dialog-error_tango.gif"
|
||||
?><?cs elif type == "environment_warning" ?><?cs
|
||||
set:symbolFile = "dialog-error_tango.gif"
|
||||
?><?cs elif type == "hint" ?><?cs
|
||||
set:symbolFile = "dialog-warning_tango.gif"
|
||||
?><?cs /if
|
||||
?><?cs # preparations are done - now start writing
|
||||
?><div class="message"><table><tr><td class="message_symbol"><img src="<?cs
|
||||
call:link('cryptobox-misc/' + symbolFile,'','','','')
|
||||
?>" alt="icon: info" /></td><?cs
|
||||
# check if it is a 'normal' message ?><?cs
|
||||
if:subcount(Lang[category][mname]) > 0 ?><?cs
|
||||
call:show_messageNode(Lang[category][mname]) ?><?cs
|
||||
# check if the mname starts with "Plugins." ... ?><?cs
|
||||
elif:(string.slice(mname,0,8) == "Plugins.") && subcount(Lang[plugPrefix][category][plugSuffix]) > 0 ?><?cs
|
||||
call:show_messageNode(Lang[plugPrefix][category][plugSuffix]) ?><?cs
|
||||
# the message does not seem to exist ... ?><?cs
|
||||
else ?>
|
||||
<td><h1>unknown <?cs var:type ?> message</h1>
|
||||
could not find <?cs var:type ?> message: '<?cs var:mname ?>'</td><?cs
|
||||
/if ?></tr></table></div><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:environment_warning(mname)
|
||||
?><?cs call:message_dispatch(mname, "environment_warning", "EnvironmentWarning") ?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:hint(mname) ?><?cs
|
||||
# show a warning hint
|
||||
?><?cs call:message_dispatch(mname, "hint", "AdviceMessage") ?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:warning(mname)
|
||||
?><?cs call:message_dispatch(mname, "warning", "WarningMessage") ?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:success(mname)
|
||||
?><?cs call:message_dispatch(mname, "success", "SuccessMessage") ?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:print_form_header(form_name, action) ?><?cs #
|
||||
# the header of a form - including Setting.LinkAttrs
|
||||
?><form name="<?cs var:html_escape(form_name) ?>" action="<?cs call:link(action,"","","","") ?>" method="post" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"><?cs
|
||||
/def ?><?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
|
||||
if:volume.busy ?><?cs
|
||||
set:filename='volume_active_crypto_busy.gif' ?><?cs
|
||||
else ?><?cs
|
||||
set:filename='volume_active_crypto.gif' ?><?cs
|
||||
/if ?><?cs
|
||||
else ?><?cs
|
||||
if:volume.busy ?><?cs
|
||||
set:filename='volume_active_plain_busy.gif' ?><?cs
|
||||
else ?><?cs
|
||||
set:filename='volume_active_plain.gif' ?><?cs
|
||||
/if ?><?cs
|
||||
/if ?><?cs
|
||||
else ?><?cs
|
||||
if:volume.encryption ?><?cs
|
||||
if:volume.busy ?><?cs
|
||||
set:filename='volume_passive_crypto_busy.gif' ?><?cs
|
||||
else ?><?cs
|
||||
set:filename='volume_passive_crypto.gif' ?><?cs
|
||||
/if ?><?cs
|
||||
else ?><?cs
|
||||
if:volume.busy ?><?cs
|
||||
set:filename='volume_passive_plain_busy.gif' ?><?cs
|
||||
else ?><?cs
|
||||
set:filename='volume_passive_plain.gif' ?><?cs
|
||||
/if ?><?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('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
|
||||
|
||||
|
||||
def:reload_link(attr, value) ?><?cs
|
||||
# construct a link to reload the current page, but change/set one paramter
|
||||
?><?cs # first: override previous content of "Temp"
|
||||
?><?cs each:attrs = Temp
|
||||
?><?cs set:attrs = ""
|
||||
?><?cs /each
|
||||
?><?cs each:attrs = Data.ScriptParams
|
||||
?><?cs set:Temp[name(attrs)] = attrs
|
||||
?><?cs /each
|
||||
?><?cs if:attr != "" ?><?cs set:Temp[attr] = value ?><?cs /if
|
||||
?><?cs set:first_attr = 1
|
||||
?><?cs each:attrs = Temp
|
||||
?><?cs if:(name(attrs) != "") && (attrs != "")
|
||||
?><?cs if:first_attr ?>?<?cs
|
||||
set:first_attr = 0 ?><?cs
|
||||
else
|
||||
?>&<?cs /if
|
||||
?><?cs var:url_escape(name(attrs)) ?>=<?cs var:url_escape(attrs)
|
||||
?><?cs /if
|
||||
?><?cs /each
|
||||
?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:help_link() ?><?cs
|
||||
# show an iconed link to a specific help page for the current form ?>
|
||||
<div class="help_link">
|
||||
<?cs if:Settings.Help ?>
|
||||
<a href="<?cs call:reload_link("help","0") ?>"
|
||||
title="<?cs var:html_escape(Lang.Button.DisableHelp) ?>">
|
||||
<?cs var:html_escape(Lang.Button.DisableHelp) ?>
|
||||
<?cs else ?>
|
||||
<a href="<?cs call:reload_link("help","1") ?>"
|
||||
title="<?cs var:html_escape(Lang.Button.EnableHelp) ?>">
|
||||
<?cs var:html_escape(Lang.Button.EnableHelp) ?>
|
||||
<?cs /if ?>
|
||||
<img class="message_symbol" src="cryptobox-misc/icon_get_help.gif" alt="icon: help" />
|
||||
</a></div><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:show_help(text) ?><?cs
|
||||
# display a help text if the help setting is turned on
|
||||
?><?cs if:Settings.Help ?><div class="help_text"><?cs var:html_escape(text)
|
||||
?></div><?cs /if ?><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
def:handle_messages() ?><?cs
|
||||
# call this function once for every page - otherwise your risk to loose messages
|
||||
# if it gets called twice somehow, then we just ignore it
|
||||
?><?cs if:!messages_are_handled
|
||||
?><?cs if:Data.Warning ?><?cs call:warning(Data.Warning) ?><?cs /if
|
||||
?><?cs if:Data.Success ?><?cs call:success(Data.Success) ?><?cs /if
|
||||
?><?cs set:messages_are_handled = 1
|
||||
?><?cs /if ?><?cs
|
||||
/def ?>
|
||||
|
17
v0.3/templates/main.cs
Normal file
17
v0.3/templates/main.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<?cs include:Settings.TemplateDir + '/macros.cs' ?>
|
||||
<?cs include:Settings.TemplateDir + '/header.cs' ?>
|
||||
|
||||
<!-- chosen cryptobox template: <?cs var:Settings.TemplateFile ?> -->
|
||||
|
||||
<?cs if:Data.ActivePlugin && (Settings.PluginList[Data.ActivePlugin].Types.volume) ?>
|
||||
<?cs include:Settings.TemplateDir + '/show_volume_header.cs' ?>
|
||||
<?cs include:Settings.TemplateFile ?>
|
||||
<?cs include:Settings.TemplateDir + '/show_volume_footer.cs' ?>
|
||||
<?cs else ?>
|
||||
<?cs include:Settings.TemplateFile ?>
|
||||
<?cs /if ?>
|
||||
|
||||
|
||||
<?cs include:Settings.TemplateDir + '/footer.cs' ?>
|
3
v0.3/templates/show_volume_footer.cs
Normal file
3
v0.3/templates/show_volume_footer.cs
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!-- end of plugin pane -->
|
||||
</div>
|
||||
|
26
v0.3/templates/show_volume_header.cs
Normal file
26
v0.3/templates/show_volume_header.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<table class="volume_name"><tr><td>
|
||||
<a class="disk_symbol "href="<?cs
|
||||
call:link("volume_mount","device",Data.CurrentDisk.device,"","")
|
||||
?>"><?cs call:show_volume_icon(Data.CurrentDisk) ?></a>
|
||||
</td><td>
|
||||
<h1 id="volume_name"><?cs var:html_escape(Lang.Title.Volume) ?> <i><?cs
|
||||
var:html_escape(Data.CurrentDisk.name) ?></i></h1>
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
<table id="volume_area">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<?cs include:Settings.TemplateDir + '/volume_plugins.cs' ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="volume_content">
|
||||
|
||||
<?cs # this is a little bit dirty: every volume plugin must use 'plugin_heading'
|
||||
instead of using 'h2' directly - this makes it possible to override this
|
||||
value for embedded plugins (see 'volume_properties') ?>
|
||||
<?cs set:plugin_heading = "h2" ?>
|
||||
|
8
v0.3/templates/volume_busy.cs
Normal file
8
v0.3/templates/volume_busy.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<?cs # display a warning because of a busy volume ?>
|
||||
|
||||
<?cs call:handle_messages() ?>
|
||||
|
||||
<?cs call:hint('VolumeIsBusy') ?>
|
||||
|
36
v0.3/templates/volume_plugins.cs
Normal file
36
v0.3/templates/volume_plugins.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<?cs # show all available volume plugins on top of the volume table ?>
|
||||
|
||||
<?cs # count volume plugins ?>
|
||||
<?cs set:volume_plugin_count=0 ?><?cs
|
||||
each: x = Settings.PluginList ?><?cs
|
||||
if:x.Types.volume ?><?cs set:volume_plugin_count=volume_plugin_count+1 ?><?cs /if ?><?cs
|
||||
/each ?>
|
||||
|
||||
<?cs # show one tab for each plugin ?>
|
||||
<?cs if:volume_plugin_count > 0 ?>
|
||||
<?cs # two possibilities to find the active ('to be marked') plugin:
|
||||
- the active plugin is part of the volume menu list -> mark it
|
||||
- the rest: mark 'volume_props' ?><?cs
|
||||
# first: set default value ?><?cs
|
||||
set:markPlugin = 'volume_props' ?><?cs
|
||||
# check if the active plugin is visible in the menu ?><?cs
|
||||
each:plugin = Settings.PluginList ?><?cs
|
||||
if:plugin.Visible.volume && (name(plugin) == Data.ActivePlugin) ?><?cs
|
||||
set:markPlugin = name(plugin) ?><?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
# sort the Plugins - using the most stupid way :) ?><?cs
|
||||
loop: order = #0, #100, #1
|
||||
?><?cs # plugins ?><?cs each:x = Settings.PluginList
|
||||
?><?cs if:x.Types.volume && x.Visible.volume && x.Rank == order ?>
|
||||
<td <?cs if:markPlugin == name(x)
|
||||
?>class="volume_plugin_active"<?cs
|
||||
else ?>class="volume_plugin_passive"<?cs
|
||||
/if ?>><a href="<?cs call:link(name(x),'device',Data.CurrentDisk.device,'','') ?>" title="<?cs var:html_escape(x.Link) ?>"><img src="<?cs call:link("icons/" + name(x),'','','','') ?>" alt="icon: <?cs var:html_escape(name(x)) ?>" /> <?cs var:html_escape(x.Link) ?></a></td><!-- add some space --><td> </td><?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
/loop ?>
|
||||
<?cs /if ?>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue