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

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