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

« back to all changes in this revision

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

ivle.webapp.console.service: Port www/apps/consoleservice to new framework.
    consoleservice now lives under /console/service, and actions are taken
    in the "ivle.op" query argument, not as the last segment of the path.
    Otherwise the interface is identical.
www/apps/console/console.js: Update to new consoleservice interface.

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>Project set for ${projectset.offering.subject.name}</title>
 
4
    <title>Groupz</title>
5
5
  </head>
6
6
  <body>
7
 
    <h1>Project set for ${projectset.offering.subject.name}</h1>
8
7
    <div id="ivle_padding">
9
 
      <div class="contextactions">
10
 
        <a py:if="'edit' in permissions"
11
 
           class="editaction"
12
 
           href="${req.publisher.generate(projectset, ProjectSetEdit)}">
13
 
           Change details
14
 
        </a>
15
 
      </div>
16
 
      <py:if test="not projectset.is_group">
17
 
      <p>Non-group projects.</p>
18
 
      </py:if>
19
 
      <py:if test="projectset.is_group">
20
 
      <p>Groups of maximum size ${projectset.max_students_per_group}.</p>
21
 
      </py:if>
22
 
      <div class="majorsection">
23
 
        <h2>Projects</h2>
24
 
        <table class="pretty_table">
25
 
          <thead><tr><th>Name</th><th>Actions</th></tr></thead>
26
 
          <tbody>
27
 
            <tr py:for="project in projectset.projects">
28
 
              <td><a href="${req.publisher.generate(project)}">${project.name}</a></td>
29
 
            <td><a href='${req.publisher.generate(project, ProjectEdit)}'><img
30
 
                  src='/+media/ivle.webapp.core/images/interface/pencil.png'
31
 
                  alt="Edit" title="Edit project" /></a>
32
 
                <a href='${req.publisher.generate(project, ProjectDelete)}'><img
33
 
                  src='/+media/ivle.webapp.core/images/interface/delete.png'
34
 
                  alt="Delete" title="Delete project" /></a>
35
 
            </td>
36
 
            </tr>
37
 
          </tbody>
38
 
        </table>
39
 
        <p><a class="addaction" href="${req.publisher.generate(projectset, ProjectNew)}">Add a new project</a></p>
40
 
      </div>
41
 
      <div py:if="projectset.is_group" class="majorsection">
42
 
        <h2>Groups</h2>
43
 
        <table class="pretty_table">
44
 
          <thead><tr><th>Name</th><th>Management</th></tr></thead>
45
 
          <tbody>
46
 
            <tr py:for="group in projectset.project_groups"
47
 
                id="project_group_${group.id}">
48
 
              <td>${group.name}</td>
49
 
              <td><a onclick="manage_group(${projectset.offering.id}, ${group.id} ,'project_group_${group.id}')"
50
 
                 class="choice"
51
 
                 id="project_group_${group.id}_button">
52
 
                <img src="/+media/ivle.webapp.core/images/interface/group.png" alt="Manage" title="Manage" />
53
 
              </a></td>
54
 
            </tr>
55
 
          </tbody>
56
 
        </table>
57
 
        <p><span class="addaction">
58
 
          <input value="Add a new group" type="button" onclick="create_new_group(${projectset.id})" />
59
 
        </span></p>
60
 
      </div>
 
8
      <p py:if="no_enrolments">Error: You are not currently enrolled in any subjects.</p>
 
9
      <py:for each="enrolment in enrolments">
 
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">
 
16
                <p>You are a member of this group.</p>
 
17
              </py:when>
 
18
              <py:otherwise>
 
19
                <p>You have been invited to this group.</p>
 
20
                <p>
 
21
                  <input type="button" 
 
22
                      onclick="accept(&quot;${group['name']}&quot;)" 
 
23
                      value="Accept" />
 
24
                  <input type="button"
 
25
                      onclick="decline(&quot;${group['name']}&quot;)"
 
26
                      value="Decline" />
 
27
                </p>
 
28
              </py:otherwise>
 
29
            </py:choose>
 
30
            <h3>Members</h3>
 
31
            <ul>
 
32
              <py:for each="member in group['members']">
 
33
                <li>${member['fullname']} (${member['login']})</li>
 
34
              </py:for>
 
35
            </ul>
 
36
          </py:for>
 
37
        </div>
 
38
      </py:for>
 
39
      <py:if test="manage_groups">
 
40
        <hr />
 
41
        <h1>Group Administration</h1>
 
42
        <label for="subject_select">Subject:</label>
 
43
        <select id="subject_select">
 
44
          <py:for each="subject in manage_subjects">
 
45
            <option value="${subject['id']}">${subject['name']} (${subject['code']})</option>
 
46
          </py:for>
 
47
        </select>
 
48
        <input type="button" value="Manage" onclick="manage_subject()" />
 
49
        <div id="subject_div"></div>
 
50
      </py:if>
61
51
    </div>
62
52
  </body>
63
53
</html>