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

« back to all changes in this revision

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

ivle.webapp.browser: Move to ivle.webapp.filesystem.browser.

Show diffs side-by-side

added added

removed removed

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