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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subjects.html

Added overlay system and console overlay. Note that the console overlay
is no longer special cased, allowing multiple overlays per page.

This commit breaks the original console tab.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    <title>Subjects</title>
5
5
  </head>
6
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
7
    <div id="ivle_padding">
10
 
      <p py:if="len(semesters) == 0">You are not currently enrolled in any subjects.</p>
11
 
      <py:for each="(semester, enrolments) in semesters">
12
 
        <py:choose test="semester.state">
13
 
          <h2 py:when="u'current'">${semester.year}, semester ${semester.semester}</h2>
14
 
          <h3 py:otherwise="">${semester.year}, semester ${semester.semester}</h3>
15
 
        </py:choose>
16
 
        <ul>
17
 
          <py:for each="enrolment in enrolments">
18
 
            <li>
19
 
              <a href="${offering_url(enrolment.offering)}/+worksheets">${enrolment.offering.subject.name}</a>
20
 
              <py:if test="'edit' in enrolment.offering.get_permissions(user)">
21
 
                -
22
 
                <a href="${offering_url(enrolment.offering)}/+groups">(administer groups)</a>
23
 
                <a href="${offering_url(enrolment.offering)}/+enrolments/+new">(enrol users)</a>
24
 
              </py:if>
25
 
            </li>
26
 
          </py:for>
27
 
        </ul>
28
 
      </py:for>
 
8
      <h2>IVLE Subject Homepages</h2>
 
9
      <py:if test="(len(enrolled_subjects) > 0)">
 
10
        <h2>Subjects</h2>
 
11
        <ul>
 
12
          <py:for each="subject in enrolled_subjects">
 
13
            <py:choose test="subject['url']">
 
14
              <py:when test="None">
 
15
                <li>${subject['name']} (no home page)</li>
 
16
              </py:when>
 
17
              <py:otherwise>
 
18
                <li><a href="${subject['url']}">${subject['name']}</a></li>
 
19
              </py:otherwise>
 
20
            </py:choose>
 
21
          </py:for>
 
22
        </ul>
 
23
      </py:if>
 
24
      <py:if test="(len(other_subjects) > 0)">
 
25
        <h3>Other Subjects</h3>
 
26
        <p>You are not currently enrolled in these subjects</p>
 
27
        <ul>
 
28
          <py:for each="subject in other_subjects">
 
29
            <py:choose test="subject['url']">
 
30
             <py:when test="None">
 
31
               <li>${subject['name']} (no home page)</li>
 
32
             </py:when>
 
33
             <py:otherwise>
 
34
               <li><a href="${subject['url']}">${subject['name']}</a></li>
 
35
             </py:otherwise>
 
36
            </py:choose>
 
37
          </py:for>
 
38
        </ul>
 
39
      </py:if>
29
40
    </div>
30
41
  </body>
31
42
</html>