1678.1.1
by Matt Giuca
Added new view SubjectView, which shows all offerings for a subject. This is accessible from the SubjectsManage view, or by the subject name in the breadcrumbs. |
1 |
<html xmlns="http://www.w3.org/1999/xhtml" |
2 |
xmlns:py="http://genshi.edgewall.org/"> |
|
3 |
<head>
|
|
4 |
<title>${context.name}</title> |
|
5 |
</head> |
|
6 |
<body>
|
|
7 |
<h1>${context.name}</h1> |
|
8 |
<div id="ivle_padding"> |
|
1678.1.3
by Matt Giuca
SubjectView: Added edit button to the top of the subject page, for admins. |
9 |
<div class="contextactions"> |
10 |
<a py:if="'edit' in permissions" |
|
11 |
class="editaction" |
|
12 |
href="${req.publisher.generate(context, SubjectEdit)}"> |
|
13 |
Change details |
|
14 |
</a> |
|
15 |
</div> |
|
1678.1.2
by Matt Giuca
SubjectView: Fixed text at the top to either present the list of semesters, or explain that there are no offerings. |
16 |
<py:choose test="len(offerings) > 0"> |
17 |
<p py:when="True">This subject is offered in the following semesters:</p> |
|
18 |
<p py:when="False">There are no offerings associated with this subject.</p> |
|
19 |
</py:choose> |
|
20 |
<ul py:if="len(offerings) > 0"> |
|
1678.1.1
by Matt Giuca
Added new view SubjectView, which shows all offerings for a subject. This is accessible from the SubjectsManage view, or by the subject name in the breadcrumbs. |
21 |
<li py:for="offering in offerings" |
22 |
py:attrs="{'class': 'subject_current' if offering.semester.state == u'current' else None}"> |
|
23 |
<py:choose test="user.admin or offering.get_enrolment(user) is not None"> |
|
1822.1.1
by William Grant
Replace semester.semester with semester.{code,url_name,display_name}. |
24 |
<a py:when="True" href="${req.publisher.generate(offering)}">${offering.semester.year}, ${offering.semester.display_name}</a> |
25 |
<span py:otherwise="">${offering.semester.year}, ${offering.semester.display_name}</span> |
|
1678.1.1
by Matt Giuca
Added new view SubjectView, which shows all offerings for a subject. This is accessible from the SubjectsManage view, or by the subject name in the breadcrumbs. |
26 |
</py:choose> |
27 |
</li> |
|
28 |
</ul> |
|
29 |
<div class="horizontalactions" py:if="req.user.admin"> |
|
1678.1.5
by Matt Giuca
Added new offering SubjectOfferingNew (+new-offering under a subject name). This is identical to +new-offering, but it is locked to a particular subject. The 'Create new offering' button on the subject page now links to this. |
30 |
<a class="addaction" href="${req.publisher.generate(context, SubjectOfferingNew)}">Create new offering</a> |
1678.1.1
by Matt Giuca
Added new view SubjectView, which shows all offerings for a subject. This is accessible from the SubjectsManage view, or by the subject name in the breadcrumbs. |
31 |
<a class="manageaction" href="/subjects/+manage">Manage subjects and semesters</a> |
32 |
</div> |
|
33 |
</div> |
|
34 |
</body> |
|
35 |
</html> |