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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/">
  <head>
    <title>Subjects</title>
  </head>
  <body>
    <py:def function="offering_url(offering)">/subjects/${offering.subject.short_name}/${offering.semester.year}/${offering.semester.semester}</py:def>
    <h1>Subjects</h1>
    <div id="ivle_padding">
      <p py:if="len(semesters) == 0">You are not currently enrolled in any subjects.</p>
      <py:for each="(semester, offerings) in semesters">
        <h2 py:attrs="{'class': 'subject_current' if semester.state == u'current' else None}">
          ${semester.year}, semester ${semester.semester}
        </h2>
        <ul>
          <py:for each="offering in offerings">
            <li>
              <a href="${offering_url(offering)}/+worksheets">${offering.subject.name}</a>
              <py:if test="'edit' in offering.get_permissions(user)">
                -
                <a href="${offering_url(offering)}/+projects">(administer projects)</a>
                <a href="${offering_url(offering)}/+enrolments/+new">(enrol users)</a>
              </py:if>
            </li>
          </py:for>
        </ul>
      </py:for>
    </div>
  </body>
</html>