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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2009-12-08 07:50:30 UTC
  • Revision ID: matt.giuca@gmail.com-20091208075030-sdpa1sfn8j8usrfb
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    <h1>Subjects</h1>
9
9
    <div id="ivle_padding">
10
10
      <p py:if="len(semesters) == 0">You are not currently enrolled in any subjects.</p>
11
 
      <py:for each="(semester, enrolments) in semesters">
 
11
      <py:for each="(semester, offerings) in semesters">
12
12
        <h2 py:attrs="{'class': 'subject_current' if semester.state == u'current' else None}">
13
13
          ${semester.year}, semester ${semester.semester}
14
14
        </h2>
15
15
        <ul>
16
 
          <py:for each="enrolment in enrolments">
 
16
          <py:for each="offering in offerings">
17
17
            <li>
18
 
              <a href="${offering_url(enrolment.offering)}/+worksheets">${enrolment.offering.subject.name}</a>
19
 
              <py:if test="'edit' in enrolment.offering.get_permissions(user)">
 
18
              <a href="${offering_url(offering)}/+worksheets">${offering.subject.name}</a>
 
19
              <py:if test="'edit' in offering.get_permissions(user)">
20
20
                -
21
 
                <a href="${offering_url(enrolment.offering)}/+projects">(administer projects)</a>
22
 
                <a href="${offering_url(enrolment.offering)}/+enrolments/+new">(enrol users)</a>
 
21
                <a href="${offering_url(offering)}/+projects">(administer projects)</a>
 
22
                <a href="${offering_url(offering)}/+enrolments/+new">(enrol users)</a>
23
23
              </py:if>
24
24
            </li>
25
25
          </py:for>