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

« back to all changes in this revision

Viewing changes to www/apps/groups/template.html

  • Committer: matt.giuca
  • Date: 2009-02-02 22:27:12 UTC
  • Revision ID: svn-v4:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1191
tutorial: Fixed use of wrong variable names (broke during refactor).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<html xmlns="http://www.w3.org/1999/xhtml"
2
 
      xmlns:py="http://genshi.edgewall.org/">
3
 
  <head>
4
 
    <title>Groups</title>
5
 
  </head>
6
 
  <body>
 
2
      xmlns:xi="http://www.w3.org/2001/XInclude"
 
3
      xmlns:py="http://genshi.edgewall.org/" py:strip="">
 
4
 
 
5
  <body py:strip="">
7
6
    <div id="ivle_padding">
8
 
      <p py:if="not enrolments">Error: You are not currently enrolled in any subjects.</p>
 
7
      <p py:if="no_enrolments">Error: You are not currently enrolled in any subjects.</p>
9
8
      <py:for each="enrolment in enrolments">
10
 
        <div id="subject${enrolment.offering.id}" class="subject">
11
 
          <h1>${enrolment.offering.subject.name}</h1>
12
 
          <py:for each="group in get_user_groups(enrolment.offering)">
13
 
            <h2>${group.nick} (${group.name})</h2>
14
 
            <!-- Need proper test (for invite/membership). -->
15
 
            <!-- <py:choose test="group">
16
 
              <py:when test="True"> -->
 
9
        <div id="subject${enrolment.offering_id}" class="subject">
 
10
          <h1>${enrolment.offering_name}</h1>
 
11
          <py:for each="group in enrolment['groups']">
 
12
            <h2>${group['nick']} (${group['name']})</h2>
 
13
            <py:choose test="group['is_member']">
 
14
              <py:when test="True">
17
15
                <p>You are a member of this group.</p>
18
 
              <!--</py:when>
 
16
              </py:when>
19
17
              <py:otherwise>
20
18
                <p>You have been invited to this group.</p>
21
19
                <p>
22
20
                  <input type="button" 
23
 
                      onclick="accept(&quot;${group.name}&quot;)" 
 
21
                      onclick="accept(&quot;${group['name']}&quot;)" 
24
22
                      value="Accept" />
25
23
                  <input type="button"
26
 
                      onclick="decline(&quot;${group.name}&quot;)"
 
24
                      onclick="decline(&quot;${group['name']}&quot;)"
27
25
                      value="Decline" />
28
26
                </p>
29
27
              </py:otherwise>
30
 
            </py:choose>-->
 
28
            </py:choose>
31
29
            <h3>Members</h3>
32
30
            <ul>
33
 
              <py:for each="member in group.members">
34
 
                <li>${member.fullname} (${member.login})</li>
 
31
              <py:for each="member in group['members']">
 
32
                <li>${member['fullname']} (${member['login']})</li>
35
33
              </py:for>
36
34
            </ul>
37
35
          </py:for>
38
36
        </div>
39
37
      </py:for>
40
 
      <py:if test="manage_subjects">
 
38
      <py:if test="manage_groups">
41
39
        <hr />
42
40
        <h1>Group Administration</h1>
43
41
        <label for="subject_select">Subject:</label>
44
42
        <select id="subject_select">
45
43
          <py:for each="subject in manage_subjects">
46
 
            <option value="${subject.id}">${subject.name} (${subject.code})</option>
 
44
            <option value="${subject['id']}">${subject['name']} (${subject['code']})</option>
47
45
          </py:for>
48
46
        </select>
49
47
        <input type="button" value="Manage" onclick="manage_subject()" />