1099.1.99
by William Grant
Require that plugins providing media subclass MediaPlugin. |
1 |
from ivle.webapp.base.plugins import ViewPlugin, OverlayPlugin, MediaPlugin |
1099.1.29
by William Grant
ivle.webapp.console.service: Port www/apps/consoleservice to new framework. |
2 |
from ivle.webapp.console.service import ConsoleServiceRESTView |
1099.1.74
by Nick Chadwick
Added overlay system and console overlay. Note that the console overlay |
3 |
from ivle.webapp.console.overlay import ConsoleOverlay |
1099.1.75
by Nick Chadwick
Added a console plugin, which now uses our new architecture. |
4 |
from ivle.webapp.base.xhtml import XHTMLView |
1294.2.53
by William Grant
Port the console and service to object traversal. |
5 |
from ivle.webapp import ApplicationRoot |
1099.1.75
by Nick Chadwick
Added a console plugin, which now uses our new architecture. |
6 |
|
7 |
||
8 |
class ConsoleView(XHTMLView): |
|
1116
by William Grant
Move the old tutorial views into the 'subjects' tab, so they get the right |
9 |
tab = 'console' |
1099.1.100
by Nick Chadwick
Created a new help system. |
10 |
help = 'Console' |
1294.2.132
by William Grant
Add couple of view breadcrumbs. |
11 |
breadcrumb_text = 'Console' |
1099.1.77
by William Grant
Set appname on ivle.webapp.console.ConsoleView so we get an icon and selected |
12 |
|
1294.4.3
by David Coles
Fix Console breakage due to ConsoleView's class varibiles being overwritten by the parent class' init function. |
13 |
# Overide the the standard constructor view
|
14 |
def __init__(self, *args, **kwargs): |
|
15 |
super(ConsoleView, self).__init__(*args, **kwargs) |
|
16 |
||
17 |
self.plugin_scripts = {'ivle.webapp.console': ['console.js']} |
|
18 |
self.plugin_styles = {'ivle.webapp.console': ['console.css']} |
|
19 |
self.plugin_scripts_init = ['console_init'] |
|
20 |
||
21 |
# Don't load the console overlay when we already have a console.
|
|
22 |
self.overlay_blacklist = [ConsoleOverlay] |
|
1099.1.77
by William Grant
Set appname on ivle.webapp.console.ConsoleView so we get an icon and selected |
23 |
|
1099.1.110
by William Grant
Implement an authorization system in the new framework. This breaks the REST |
24 |
def authorize(self, req): |
25 |
return req.user is not None |
|
26 |
||
1099.1.75
by Nick Chadwick
Added a console plugin, which now uses our new architecture. |
27 |
def populate(self, req, ctx): |
28 |
ctx['windowpane'] = False |
|
1099.1.101
by William Grant
Fix some issues with undefined variables in view template contexts. Genshi 0.5 |
29 |
ctx['start_body_attrs'] = {} |
1099.1.75
by Nick Chadwick
Added a console plugin, which now uses our new architecture. |
30 |
|
1099.1.99
by William Grant
Require that plugins providing media subclass MediaPlugin. |
31 |
class Plugin(ViewPlugin, OverlayPlugin, MediaPlugin): |
1294.2.53
by William Grant
Port the console and service to object traversal. |
32 |
views = [(ApplicationRoot, ('console', '+index'), ConsoleView), |
33 |
(ApplicationRoot, ('console', 'service'), ConsoleServiceRESTView), |
|
34 |
]
|
|
35 |
||
1099.1.115
by William Grant
Add tabs to the new framework. Move the app icons into the apps themselves. |
36 |
tabs = [ |
1118
by matt.giuca
Rewrote tooltips for the four tabs visible by default. |
37 |
('console', 'Console', 'Try out your code in a Python console', |
38 |
'console.png', 'console', 3) |
|
1099.1.115
by William Grant
Add tabs to the new framework. Move the app icons into the apps themselves. |
39 |
]
|
1294.2.53
by William Grant
Port the console and service to object traversal. |
40 |
|
1099.1.74
by Nick Chadwick
Added overlay system and console overlay. Note that the console overlay |
41 |
overlays = [ |
42 |
ConsoleOverlay, |
|
43 |
]
|
|
1294.2.53
by William Grant
Port the console and service to object traversal. |
44 |
|
1099.1.74
by Nick Chadwick
Added overlay system and console overlay. Note that the console overlay |
45 |
media = 'media' |
1099.1.100
by Nick Chadwick
Created a new help system. |
46 |
help = {'Console': 'help.html'} |