new menu plugins: "help", "system_preferences" and "disks"
description of plugin interface extended with possible redirection to another pluginmaster
parent
7fd361d8ac
commit
87d99e8173
@ -0,0 +1,15 @@
|
||||
<?cs # $Id$ ?>
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.disks.Title.Disks) ?></h1>
|
||||
|
||||
<?cs # TODO: add no-disks-available warning ?>
|
||||
|
||||
<?cs if:subcount(Data.Disks) == 0 ?>
|
||||
NO DISKS
|
||||
<?cs else ?>
|
||||
<?cs # we use "loop" instead of "each" to keep the order of the disks ?>
|
||||
<?cs loop: index = #0, subcount(Data.Disks)-1, #1 ?>
|
||||
<?cs call:show_volume(index) ?>
|
||||
<?cs /loop ?>
|
||||
<?cs /if ?>
|
||||
|
@ -0,0 +1,17 @@
|
||||
import CryptoBoxPlugin
|
||||
|
||||
class disks(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
pluginCapabilities = [ "menu" ]
|
||||
requestAuth = False
|
||||
rank = 10
|
||||
|
||||
def doAction(self):
|
||||
self.cbox.reReadContainerList()
|
||||
return "disks"
|
||||
|
||||
|
||||
def getStatus(self):
|
||||
return "TODO"
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
Name = Disk overview
|
||||
Link = Disks
|
||||
|
||||
Title.Disks = Available disks
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,7 @@
|
||||
<?cs # $Id$ ?>
|
||||
|
||||
<div id="doc">
|
||||
|
||||
<?cs include:Settings.DocDir + '/' + Settings.Language + '/' + Data.Plugins.help.Page + '.html' ?>
|
||||
|
||||
</div>
|
@ -0,0 +1,25 @@
|
||||
import CryptoBoxPlugin
|
||||
|
||||
class help(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
pluginCapabilities = [ "menu" ]
|
||||
requestAuth = False
|
||||
rank = 50
|
||||
|
||||
def doAction(self, page=""):
|
||||
'''prints the offline wikipage
|
||||
'''
|
||||
import re
|
||||
## check for invalid characters
|
||||
if page and not re.search(u'\W', page):
|
||||
self.hdf[self.hdf_prefix + "Page"] = page
|
||||
else:
|
||||
## display this page as default help page
|
||||
self.hdf[self.hdf_prefix + "Page"] ="CryptoBoxUser"
|
||||
return "doc"
|
||||
|
||||
|
||||
def getStatus(self):
|
||||
return "TODO"
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
Name = User manual
|
||||
Link = Help
|
||||
|
||||
Title.Help = User manual
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
@ -0,0 +1,5 @@
|
||||
Name = System preferences
|
||||
Link = Preferences
|
||||
|
||||
Title.Preferences = Preferences
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,13 @@
|
||||
<?cs # $Id$ ?>
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.system_preferences.Title.Preferences) ?></h1>
|
||||
|
||||
<?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.Enabled && x.Types.system && x.Rank == order ?>
|
||||
<?cs call:show_plugin(name(x), 'system') ?><?cs /if ?><?cs
|
||||
/each ?><?cs
|
||||
/loop ?>
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
import CryptoBoxPlugin
|
||||
|
||||
class system_preferences(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
pluginCapabilities = [ "menu" ]
|
||||
requestAuth = False
|
||||
rank = 20
|
||||
|
||||
def doAction(self):
|
||||
return "show_plugins"
|
||||
|
||||
|
||||
def getStatus(self):
|
||||
return "TODO"
|
||||
|
||||
|
Loading…
Reference in New Issue