4
4
# These should not need to be modified by admins unless new applications are
7
enable_debuginfo = False
10
# Note: icon is a string of a file basename. The icon files are found in
11
# app_icon_dir, defined below.
9
def __init__(self, dir, name, requireauth = True, hashelp = False):
13
def __init__(self, dir, name, icon = None, requireauth = True,
12
18
self.requireauth = requireauth
13
19
self.hashelp = hashelp
14
20
def __repr__(self):
15
21
return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
22
", icon=" + repr(self.icon) +
16
23
", requireauth=" + repr(self.requireauth) + ", hashelp="
17
24
+ repr(self.hashelp) + ")")
26
# Directory where app icons are stored, relative to the IVLE root.
27
app_icon_dir = "media/images/apps"
28
# Small version of icons (16x16, for favicon)
29
app_icon_dir_small = "media/images/apps/small"
31
# Which application to load by default (if the user navigates to the top level
32
# of the site). This is the app's URL name.
33
# Note that if this app requires authentication, the user will first be
34
# presented with the login screen.
36
# Which application to use for "public host" URLs.
19
40
# Application definitions
21
app_dummy = App(dir = "dummy",
22
name = "My Dummy App",
42
app_browser = App(dir = "browser",
43
name = "File Browser",
48
app_editor = App(dir = "editor",
54
app_fileservice = App(dir = "fileservice",
55
name = "File Service (AJAX server)",
59
app_console = App(dir = "console",
65
app_consoleservice = App(dir = "consoleservice",
66
name = "Console Service",
70
app_tutorial = App(dir = "tutorial",
72
icon = "tutorial.png",
76
app_tutorialservice = App(dir = "tutorialservice",
77
name = "Tutorial Service",
26
81
app_server = App(dir = "server",
31
86
app_download = App(dir = "download",
36
91
app_help = App(dir = "help",
38
94
requireauth = True,
41
97
app_debuginfo = App(dir = "debuginfo",
42
98
name = "Debug Information",
46
102
# Mapping URL names to apps
105
"files" : app_browser,
107
"fileservice" : app_fileservice,
108
"console" : app_console,
109
"consoleservice" : app_consoleservice,
110
"tutorial" : app_tutorial,
111
"tutorialservice" : app_tutorialservice,
50
112
"serve" : app_server,
51
113
"download" : app_download,
52
114
"help" : app_help,
53
"debuginfo" : app_debuginfo,
117
app_url["debuginfo"] = app_debuginfo
56
119
# List of apps that go in the tabs at the top
57
120
# (The others are hidden unless they are linked to)
58
121
# Note: The values in this list are the URL names as seen in app_url.
60
apps_in_tabs = ["dummy", "help"]
123
apps_in_tabs = ["files", "edit", "console", "tutorial", "help"]