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"
27
# Which application to load by default (if the user navigates to the top level
28
# of the site). This is the app's URL name.
29
# Note that if this app requires authentication, the user will first be
30
# presented with the login screen.
19
33
# Application definitions
21
app_dummy = App(dir = "dummy",
22
name = "My Dummy App",
26
35
app_browser = App(dir = "browser",
27
36
name = "File Browser",
41
app_editor = App(dir = "editor",
28
44
requireauth = True,
33
49
requireauth = True,
52
app_console = App(dir = "console",
58
app_tutorial = App(dir = "tutorial",
60
icon = "tutorial.png",
36
64
app_server = App(dir = "server",
38
66
requireauth = False,
56
85
# Mapping URL names to apps
60
88
"files" : app_browser,
61
90
"fileservice" : app_fileservice,
91
"console" : app_console,
92
"tutorial" : app_tutorial,
62
93
"serve" : app_server,
63
94
"download" : app_download,
69
100
# (The others are hidden unless they are linked to)
70
101
# Note: The values in this list are the URL names as seen in app_url.
72
apps_in_tabs = ["dummy", "files", "help"]
103
apps_in_tabs = ["files", "edit", "console", "tutorial", "help"]