1365
by Matt Giuca
Added a new view under Offering/+enrolments to display all staff and students in an offering. |
1 |
<html xmlns="http://www.w3.org/1999/xhtml" |
2 |
xmlns:py="http://genshi.edgewall.org/"> |
|
3 |
<head>
|
|
1368
by Matt Giuca
Enrolments view: Use a pretty table instead of a bulleted list for user lists. |
4 |
<title>Enrolments - ${offering.subject.name}</title> |
1365
by Matt Giuca
Added a new view under Offering/+enrolments to display all staff and students in an offering. |
5 |
</head> |
6 |
<body>
|
|
7 |
<h1>Staff and students in ${offering.subject.name}</h1> |
|
8 |
<div id="ivle_padding"> |
|
1610
by William Grant
Replace OfferingView's link to EnrolView with one to EnrolmentsView, and link from there to EnrolView. |
9 |
<div class="majorsection" py:def="userlist(title, role)" |
1614
by William Grant
Only show edit/delete links for enrolments that you can actually touch. |
10 |
py:if="offering.get_members_by_role(unicode(role)).count()" |
11 |
py:with="can_edit = ('enrol_' + role) in offering_perms"> |
|
1365
by Matt Giuca
Added a new view under Offering/+enrolments to display all staff and students in an offering. |
12 |
<h2>${title}</h2> |
1368
by Matt Giuca
Enrolments view: Use a pretty table instead of a bulleted list for user lists. |
13 |
<table class="pretty_table"> |
1614
by William Grant
Only show edit/delete links for enrolments that you can actually touch. |
14 |
<thead><tr><th>Login</th><th>Name</th><th py:if="can_edit">Actions</th></tr></thead> |
1368
by Matt Giuca
Enrolments view: Use a pretty table instead of a bulleted list for user lists. |
15 |
<tbody>
|
16 |
<tr py:for="user in offering.get_members_by_role(unicode(role))"> |
|
17 |
<td>${user.login}</td> |
|
18 |
<td>${user.display_name}</td> |
|
1614
by William Grant
Only show edit/delete links for enrolments that you can actually touch. |
19 |
<td py:if="can_edit"> |
1613
by William Grant
Add UI to edit/delete enrolments. |
20 |
<a href="${req.publisher.generate(offering.get_enrolment(user), EnrolmentEdit)}" title="Edit"><img src="${mediapath + 'interface/pencil.png'}" alt="Edit" /></a> |
21 |
<a href="${req.publisher.generate(offering.get_enrolment(user), EnrolmentDelete)}" title="Remove"><img src="${mediapath + 'interface/delete.png'}" alt="Remove" /></a> |
|
22 |
</td> |
|
1368
by Matt Giuca
Enrolments view: Use a pretty table instead of a bulleted list for user lists. |
23 |
</tr> |
24 |
</tbody> |
|
25 |
</table> |
|
1365
by Matt Giuca
Added a new view under Offering/+enrolments to display all staff and students in an offering. |
26 |
</div> |
27 |
${userlist("Lecturers", "lecturer")} |
|
28 |
${userlist("Tutors", "tutor")} |
|
29 |
${userlist("Students", "student")} |
|
1610
by William Grant
Replace OfferingView's link to EnrolView with one to EnrolmentsView, and link from there to EnrolView. |
30 |
<a class="groupaction" href="${req.publisher.generate(offering, EnrolView)}">Enrol user</a> |
1365
by Matt Giuca
Added a new view under Offering/+enrolments to display all staff and students in an offering. |
31 |
</div> |
32 |
</body> |
|
33 |
</html> |