8
# Note: icon is a string of a file basename. The icon files are found in
9
# app_icon_dir, defined below.
9
def __init__(self, dir, name, requireauth = True, hashelp = False):
11
def __init__(self, dir, name, icon = None, requireauth = True,
12
16
self.requireauth = requireauth
13
17
self.hashelp = hashelp
14
18
def __repr__(self):
15
19
return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
20
", icon=" + repr(self.icon) +
16
21
", requireauth=" + repr(self.requireauth) + ", hashelp="
17
22
+ repr(self.hashelp) + ")")
24
# Directory where app icons are stored, relative to the IVLE root.
25
app_icon_dir = "media/images/apps"
26
# Small version of icons (16x16, for favicon)
27
app_icon_dir_small = "media/images/apps/small"
29
# Which application to load by default (if the user navigates to the top level
30
# of the site). This is the app's URL name.
31
# Note that if this app requires authentication, the user will first be
32
# presented with the login screen.
19
35
# Application definitions
21
app_dummy = App(dir = "dummy",
22
name = "My Dummy App",
37
app_browser = App(dir = "browser",
38
name = "File Browser",
43
app_editor = App(dir = "editor",
49
app_fileservice = App(dir = "fileservice",
50
name = "File Service (AJAX server)",
54
app_console = App(dir = "console",
60
app_tutorial = App(dir = "tutorial",
62
icon = "tutorial.png",
23
63
requireauth = True,
36
76
app_help = App(dir = "help",
38
79
requireauth = True,
41
82
app_debuginfo = App(dir = "debuginfo",
42
83
name = "Debug Information",
46
87
# Mapping URL names to apps
90
"files" : app_browser,
92
"fileservice" : app_fileservice,
93
"console" : app_console,
94
"tutorial" : app_tutorial,
50
95
"serve" : app_server,
51
96
"download" : app_download,
53
"debuginfo" : app_debuginfo,
98
#"debuginfo" : app_debuginfo,
56
101
# List of apps that go in the tabs at the top
57
102
# (The others are hidden unless they are linked to)
58
103
# Note: The values in this list are the URL names as seen in app_url.
60
apps_in_tabs = ["dummy", "help"]
105
apps_in_tabs = ["files", "edit", "console", "tutorial", "help"]