Adding a course-specific css class to body so that we can have course-targeted styles as a last resort

This commit is contained in:
Arjun Singh
2012-08-22 04:58:30 -07:00
parent 9bcd3cd495
commit 0b6bf77373
2 changed files with 5 additions and 1 deletions

View File

@@ -197,6 +197,10 @@ class CourseDescriptor(SequenceDescriptor):
def start_date_text(self):
return time.strftime("%b %d, %Y", self.start)
@property
def css_class(self):
return self.metadata.get('css_class', '')
@property
def title(self):
return self.display_name

View File

@@ -1,6 +1,6 @@
<%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/>
<%block name="bodyclass">courseware</%block>
<%block name="bodyclass">courseware ${course.css_class}</%block>
<%block name="title"><title>${course.number} Courseware</title></%block>
<%block name="headextra">