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

« back to all changes in this revision

Viewing changes to ivle/webapp/groups/template.html

ivle.webapp.tutorial: Port www/apps/tutorial to new framework.

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