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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject.py

Add tabs to the new framework. Move the app icons into the apps themselves.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import cgi
28
28
 
29
29
from ivle.webapp.base.xhtml import XHTMLView
30
 
from ivle.webapp.base.plugins import ViewPlugin
 
30
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
31
31
from ivle.webapp.errors import NotFound
32
32
from ivle.database import Subject
33
33
from ivle import util
67
67
                ctx['other_subjects'].append(new_subj)
68
68
 
69
69
 
70
 
class Plugin(ViewPlugin):
 
70
class Plugin(ViewPlugin, MediaPlugin):
71
71
    urls = [
72
72
        ('subjects/', SubjectsView),
73
73
    ]
 
74
 
 
75
    tabs = [
 
76
        ('subjects', 'Subjects', 'Announcements and information about the '
 
77
         'subjects you are enrolled in.', 'subjects.png', 'subjects', 5)
 
78
    ]
 
79
 
 
80
    media = 'subject-media'