~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/conf/apps.py

  • Committer: mattgiuca
  • Date: 2008-01-13 23:38:58 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:213
Fileservice / Files (Python and JS files):
    Added code to handle "nice filetypes" and "nice svn status".
    New JSON value for dir listings, "type_nice" which contains the nice
    filetype calculated by the server.
    The client calculates the nice svn status.
    Added new icons for svn status for added, deleted, missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# plugged in.
6
6
 
7
7
# Allow App objects
 
8
# Note: icon is a string of a file basename. The icon files are found in
 
9
# app_icon_dir, defined below.
8
10
class App:
9
 
    def __init__(self, dir, name, requireauth = True, hashelp = False):
 
11
    def __init__(self, dir, name, icon = None, requireauth = True,
 
12
        hashelp = False):
10
13
        self.dir = dir
11
14
        self.name = name
 
15
        self.icon = icon
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) + ")")
18
23
 
 
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"
 
28
 
 
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.
 
33
default_app = "files"
 
34
 
19
35
# Application definitions
20
36
 
21
 
app_dummy =     App(dir = "dummy",
22
 
                    name = "My Dummy App",
 
37
app_browser =   App(dir = "browser",
 
38
                    name = "File Browser",
 
39
                    icon = "browser.png",
 
40
                    requireauth = True,
 
41
                    hashelp = True)
 
42
 
 
43
app_editor =   App(dir = "editor",
 
44
                    name = "Text Editor",
 
45
                    icon = "editor.png",
 
46
                    requireauth = True,
 
47
                    hashelp = True)
 
48
 
 
49
app_fileservice = App(dir = "fileservice",
 
50
                    name = "File Service (AJAX server)",
 
51
                    requireauth = True,
 
52
                    hashelp = False)
 
53
 
 
54
app_console =     App(dir = "console",
 
55
                    name = "Console",
 
56
                    icon = "console.png",
 
57
                    requireauth = True,
 
58
                    hashelp = True)
 
59
 
 
60
app_tutorial =     App(dir = "tutorial",
 
61
                    name = "Tutorial",
 
62
                    icon = "tutorial.png",
23
63
                    requireauth = True,
24
64
                    hashelp = True)
25
65
 
35
75
 
36
76
app_help =      App(dir = "help",
37
77
                    name = "Help",
 
78
                    icon = "help.png",
38
79
                    requireauth = True,
39
80
                    hashelp = False)
40
81
 
41
82
app_debuginfo = App(dir = "debuginfo",
42
83
                    name = "Debug Information",
43
 
                    requireauth = True,
 
84
                    requireauth = False,
44
85
                    hashelp = False)
45
86
 
46
87
# Mapping URL names to apps
47
88
 
48
89
app_url = {
49
 
    "dummy" : app_dummy,
 
90
    "files" : app_browser,
 
91
    "edit" : app_editor,
 
92
    "fileservice" : app_fileservice,
 
93
    "console" : app_console,
 
94
    "tutorial" : app_tutorial,
50
95
    "serve" : app_server,
51
96
    "download" : app_download,
52
97
    "help" : app_help,
53
 
    "debuginfo" : app_debuginfo,
 
98
    #"debuginfo" : app_debuginfo,
54
99
}
55
100
 
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.
59
104
 
60
 
apps_in_tabs = ["dummy", "help"]
 
105
apps_in_tabs = ["files", "edit", "console", "tutorial", "help"]