1165.3.2
by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to |
1 |
<html xmlns="http://www.w3.org/1999/xhtml" |
2 |
xmlns:py="http://genshi.edgewall.org/"> |
|
3 |
<head>
|
|
4 |
<title>Subjects</title> |
|
5 |
</head> |
|
6 |
<body>
|
|
7 |
<py:def function="offering_url(offering)">/subjects/${offering.subject.short_name}/${offering.semester.year}/${offering.semester.semester}</py:def> |
|
8 |
<h1>Subjects</h1> |
|
9 |
<div id="ivle_padding"> |
|
10 |
<p py:if="len(semesters) == 0">You are not currently enrolled in any subjects.</p> |
|
1371
by Matt Giuca
admin/subject: Now sends a list of offerings the user is enrolled in to the Genshi template, rather than a list of enrolment objects (of which only the offering is observed). This allows us to send non-enrolment offerings to the template. |
11 |
<py:for each="(semester, offerings) in semesters"> |
1370
by Matt Giuca
Subjects list: Rather than use h2 for current, h3 for inactive, use h2 for both with class subject_current for current subjects (more semantic). |
12 |
<h2 py:attrs="{'class': 'subject_current' if semester.state == u'current' else None}"> |
13 |
${semester.year}, semester ${semester.semester} |
|
14 |
</h2> |
|
1165.3.2
by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to |
15 |
<ul>
|
1442.1.3
by William Grant
Link to the offering index from the subject listing, and remove the action links. |
16 |
<li py:for="offering in offerings"> |
17 |
<a href="${offering_url(offering)}">${offering.subject.name}</a> |
|
18 |
</li> |
|
1165.3.2
by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to |
19 |
</ul> |
20 |
</py:for> |
|
21 |
</div> |
|
22 |
</body> |
|
23 |
</html> |