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

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
    <h1>Subjects</h1>
8
    <div id="ivle_padding">
9
      <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.
10
      <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).
11
        <h2 py:attrs="{'class': 'subject_current' if semester.state == u'current' else None}">
12
          ${semester.year}, semester ${semester.semester}
13
        </h2>
1165.3.2 by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to
14
        <ul>
1442.1.3 by William Grant
Link to the offering index from the subject listing, and remove the action links.
15
          <li py:for="offering in offerings">
1525 by Matt Giuca
ivle/webapp/admin/templates/subjects.html: Use req.publisher.generate rather than rolling its own offering_url function.
16
            <a href="${req.publisher.generate(offering)}">${offering.subject.name}</a>
1442.1.3 by William Grant
Link to the offering index from the subject listing, and remove the action links.
17
          </li>
1165.3.2 by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to
18
        </ul>
19
      </py:for>
1533 by William Grant
Add a subject listing with new/edit icons.
20
      <py:if test="defined('subjects')">
21
        <h1>All subjects</h1>
22
        <table class="pretty_table">
23
          <thead><tr><th>Subject</th><th>Code</th><th>Actions</th></tr></thead>
24
          <tbody>
25
            <tr py:for="subject in subjects">
1549 by William Grant
Don't link to subjects. There is no subject index.
26
              <td>${subject.name}</td>
1533 by William Grant
Add a subject listing with new/edit icons.
27
              <td>${subject.code}</td>
28
              <td>
29
                <a href="${req.publisher.generate(subject, SubjectEdit)}" title="Edit"><img src="${mediapath + 'interface/pencil.png'}" alt="Edit" /></a>
30
              </td>
31
            </tr>
32
          </tbody>
33
        </table>
1590 by William Grant
Add a horizontalactions class, which spaces horizontal actions nicely. Use it.
34
        <div class="horizontalactions">
1533 by William Grant
Add a subject listing with new/edit icons.
35
          <a class="addaction" href="/subjects/+new">Create new subject</a>
1537 by William Grant
Add offering creation UI, and allow admins to change the subject or semester of existing offerings.
36
          <a class="addaction" href="/subjects/+new-offering">Create new offering</a>
1590 by William Grant
Add a horizontalactions class, which spaces horizontal actions nicely. Use it.
37
        </div>
1533 by William Grant
Add a subject listing with new/edit icons.
38
      </py:if>
1165.3.2 by Nick Chadwick
Created a new view for IVLE, allowing lecturers and tutors to
39
    </div>
40
  </body>
41
</html>