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

« back to all changes in this revision

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

  • Committer: David Coles
  • Date: 2010-08-30 03:26:13 UTC
  • Revision ID: coles.david@gmail.com-20100830032613-d14vng0jkelniu3l
python-console: Fix globals broken with new JSON library.

simplejson always returns unicode strings. cJSON would return ordinary strings 
if possible. cPickle.loads() only accepts strings. At present we use pickle 
version 0 so they should all works as ASCII strings. Higher versions of pickle 
are not plain ASCII and are likely to break this and so this should be fixed 
at some point.

Also replaced unconditional exception with one that catches Pickle errors. Not 
sure the best way to report failures of these functions.

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 - ${offering.subject.name}</title>
 
4
    <title>Project set for ${projectset.offering.subject.name}</title>
5
5
  </head>
6
6
  <body>
7
 
    <h1>Groups for ${offering.subject.name}</h1>
 
7
    <h1>Project set for ${projectset.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>
 
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>
29
60
      </div>
30
61
    </div>
31
62
  </body>