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

« back to all changes in this revision

Viewing changes to lib/conf/apps.py

  • Committer: mattgiuca
  • Date: 2008-03-05 22:44:35 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:656
Added icons for "home" and "subjects" apps.
conf/apps: "home" and "subjects" apps are now tabs.
    Added a "desc" field for each app with a long description, to be used for
    tool tips and home page descriptions.
    Added "apps_on_home_page" list, similar to apps_in_tabs.
home: The apps list is now generated from apps_on_home_page and includes
    descriptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
enable_debuginfo = False
8
8
 
9
9
# Allow App objects
10
 
# Note: icon is a string of a file basename. The icon files are found in
 
10
# Notes:
 
11
# desc is a full description for the front page. It isn't required
 
12
# unless this app is in apps_on_home_page.
 
13
# icon is a string of a file basename. The icon files are found in
11
14
# app_icon_dir, defined below.
12
15
class App:
13
 
    def __init__(self, dir, name, icon = None, requireauth = True,
14
 
        hashelp = False):
 
16
    def __init__(self, dir, name, desc=None, icon = None,
 
17
        requireauth = True, hashelp = False):
15
18
        self.dir = dir
16
19
        self.name = name
 
20
        self.desc = desc
17
21
        self.icon = icon
18
22
        self.requireauth = requireauth
19
23
        self.hashelp = hashelp
20
24
    def __repr__(self):
21
 
        return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
22
 
            ", icon=" + repr(self.icon) +
23
 
            ", requireauth=" + repr(self.requireauth) + ", hashelp="
24
 
            + repr(self.hashelp) + ")")
 
25
        return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
 
26
                "hashelp=%s)" % (repr(self.dir), repr(self.name),
 
27
                repr(self.desc), repr(self.icon), repr(self.requireauth),
 
28
                repr(self.hashelp)))
25
29
 
26
30
# Directory where app icons are stored, relative to the IVLE root.
27
31
app_icon_dir = "media/images/apps"
41
45
 
42
46
app_browser =   App(dir = "browser",
43
47
                    name = "Files",
 
48
                    desc = "Gives you access to all of your files and lets "
 
49
                           "you download, upload, edit and run them.",
44
50
                    icon = "browser.png",
45
51
                    requireauth = True,
46
52
                    hashelp = True)
52
58
 
53
59
app_console =     App(dir = "console",
54
60
                    name = "Console",
 
61
                    desc = "A Python console where you can try out code "
 
62
                           "without having to save and run it.",
55
63
                    icon = "console.png",
56
64
                    requireauth = True,
57
65
                    hashelp = True)
63
71
 
64
72
app_tutorial =     App(dir = "tutorial",
65
73
                    name = "Worksheets",
 
74
                    desc = "Online tutorials and exercises for lab work.",
66
75
                    icon = "tutorial.png",
67
76
                    requireauth = True,
68
77
                    hashelp = True)
84
93
 
85
94
app_help =      App(dir = "help",
86
95
                    name = "Help",
 
96
                    desc = "IVLE help pages",
87
97
                    icon = "help.png",
88
98
                    requireauth = True,
89
99
                    hashelp = False)
95
105
 
96
106
app_forum = App(dir = "forum",
97
107
                    name = "Forum",
 
108
                    desc = "Discussion boards for material relating to "
 
109
                           "Informatics, IVLE and Python.",
98
110
                    icon = "forum.png",
99
111
                    requireauth = True,
100
112
                    hashelp = False)
122
134
                    hashelp = False)
123
135
 
124
136
app_subjects = App(dir = "subjects",
125
 
                    name = "Subject Homepages",
 
137
                    name = "Subjects",
 
138
                    desc = "Announcements and information about the subjects "
 
139
                           "you are enrolled in.",
 
140
                    icon = "subjects.png",
126
141
                    requireauth = False,
127
142
                    hashelp = False)
128
143
 
129
144
app_home = App(dir = "home",
130
145
                    name = "Home",
 
146
                    desc = "IVLE home page",
 
147
                    icon = "home.png",
131
148
                    requireauth = True,
132
149
                    hashelp = False)
133
150
 
158
175
# (The others are hidden unless they are linked to)
159
176
# Note: The values in this list are the URL names as seen in app_url.
160
177
 
161
 
apps_in_tabs = ["files", "tutorial", "console", "forum", "help"]
 
178
apps_in_tabs = ["home", "subjects", "files", "tutorial", "console",
 
179
                "forum", "help"]
 
180
 
 
181
# List of apps that go in the list on the home page
 
182
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]