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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/templates/subject.html

  • Committer: Matt Giuca
  • Date: 2010-02-24 01:44:51 UTC
  • mto: This revision was merged to the branch mainline in revision 1682.
  • Revision ID: matt.giuca@gmail.com-20100224014451-lip4gbl3b8www6sr
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
9
      <p py:if="len(offerings) == 0">You are not currently enrolled in this subject.</p>
 
10
      <p>This subject is offered in the following semesters:</p>
 
11
      <ul>
 
12
        <li py:for="offering in offerings"
 
13
            py:attrs="{'class': 'subject_current' if offering.semester.state == u'current' else None}">
 
14
          <py:choose test="user.admin or offering.get_enrolment(user) is not None">
 
15
            <a py:when="True" href="${req.publisher.generate(offering)}">${offering.semester.year}, semester ${offering.semester.semester}</a>
 
16
            <span py:otherwise="">${offering.semester.year}, semester ${offering.semester.semester}</span>
 
17
          </py:choose>
 
18
        </li>
 
19
      </ul>
 
20
      <div class="horizontalactions" py:if="req.user.admin">
 
21
        <a class="addaction" href="/subjects/+new-offering">Create new offering</a>
 
22
        <a class="manageaction" href="/subjects/+manage">Manage subjects and semesters</a>
 
23
      </div>
 
24
    </div>
 
25
  </body>
 
26
</html>