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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/templates/project.html

Cache worksheet and exercise rST-generated XHTML in the DB, accelerating rendering by up to 2000%.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html xmlns="http://www.w3.org/1999/xhtml"
 
2
      xmlns:py="http://genshi.edgewall.org/">
 
3
  <head>
 
4
    <title>${project.name} for ${project.project_set.offering.subject.name}</title>
 
5
  </head>
 
6
  <body>
 
7
    <h1>${project.name} for ${project.project_set.offering.subject.name}</h1>
 
8
    <div id="ivle_padding">
 
9
      <a py:if="project.url not in (None, '')" href="${project.url}">${project.url}</a>
 
10
      <p>Deadline: ${format_datetime(project.deadline)}</p>
 
11
      <p>${project.synopsis}</p>
 
12
      <p>Submissions: ${project.latest_submissions.count()}/${project.project_set.assigned.count()}</p>
 
13
 
 
14
      <h2>Latest submissions</h2>
 
15
      <div py:if="project.latest_submissions.count() == 0">
 
16
        There are no submissions.
 
17
      </div>
 
18
      <table id="project_submissions" class="pretty_table" summary="Latest Submissions"
 
19
             py:if="project.latest_submissions.count() > 0">
 
20
        <thead>
 
21
          <tr>
 
22
            <th>Group</th>
 
23
            <th>Submitter</th>
 
24
            <th>Date</th>
 
25
            <th>Download</th>
 
26
          </tr>
 
27
        </thead>
 
28
        <tbody>
 
29
        <py:for each="submission in project.latest_submissions">
 
30
          <tr>
 
31
          <py:choose test="submission.assessed.principal is submission.submitter">
 
32
            <td py:when="True">-</td>
 
33
            <td py:otherwise=""><span title="${submission.assessed.principal.display_name}">${submission.assessed.principal.short_name}</span></td>
 
34
          </py:choose>
 
35
            <td><span title="${submission.submitter.display_name}">${submission.submitter.short_name}</span></td>
 
36
            <td>${submission.date_submitted.strftime("%Y-%m-%d %H:%M:%S")}</td>
 
37
            <td>svn co --username ${user.login} -r${submission.revision} ${build_subversion_url(svn_addr, submission)}</td>
 
38
          </tr>
 
39
        </py:for>
 
40
        </tbody>
 
41
      </table>
 
42
 
 
43
      <h2>Assigned submitters</h2>
 
44
      <div py:if="project.project_set.assigned.count() == 0"
 
45
           py:choose="project.project_set.is_group">
 
46
        <py:when test="True">There are no groups assigned to submit this project. Do you want to <a href="${req.publisher.generate(project.project_set, GroupsView)}">create some</a>?</py:when>
 
47
        <py:otherwise>There are no students assigned to submit this project. Do you want to <a href="${req.publisher.generate(project.project_set.offering, EnrolView)}">enrol some</a>?</py:otherwise>
 
48
      </div>
 
49
      <table id="project_assigneds" class="pretty_table"
 
50
             py:if="project.project_set.assigned.count() > 0">
 
51
        <thead><tr><th>Assigned</th></tr></thead>
 
52
        <tbody>
 
53
        <py:for each="assignee in project.project_set.assigned">
 
54
          <tr>
 
55
            <td><span title="${assignee.display_name}">${assignee.short_name}</span></td>
 
56
            <!-- <td><a>Grant an extension</a></td> -->
 
57
          </tr>
 
58
        </py:for>
 
59
        </tbody>
 
60
      </table>
 
61
    </div>
 
62
  </body>
 
63
</html>