27
27
<form action="" method="post">
29
29
<tr py:for="project in principal.get_projects(offering=offering)"
30
py:with="attrs = {'disabled': 'disabled'} if project.has_deadline_passed(req.user) else {}"
31
py:attrs="{'class': 'project closed'} if project.has_deadline_passed(req.user) else {'class': 'project'}">
30
py:with="attrs = {'disabled': 'disabled'} if project.deadline < now else {}">
32
31
<td style="vertical-align: top">
33
32
<input type="radio" name="project" id="project_${project.id}" value="${project.id}" py:attrs="attrs" />
36
<label for="project_${project.id}">
37
<py:choose test="project.url not in (None, '')">
38
<a py:when="True" href="${project.url}">${project.name}</a>
39
<span py:otherwise="">${project.name}</span>
42
<span py:content="format_submission_principal(req.user, principal)" /> –
43
<!-- XXX This deadline does not take the student's extensions into account. -->
44
<span title="${format_datetime(project.deadline)}">
45
${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)}
47
<py:if test="principal is not None"
48
py:with="submissions = project.get_submissions_for_principal(principal)">
50
<py:choose test="submissions.count()">
55
py:with="latest = submissions.last()"
56
title="${format_datetime(latest.date_submitted)}">
57
last submitted ${format_datetime_short(latest.date_submitted)}
35
<label for="project_${project.id}"><a href="${project.url}">${project.name}</a> (<span title="Due ${format_datetime(project.deadline)}">due ${format_datetime_short(project.deadline)}</span>)<br />${project.synopsis}</label>
67
39
<p>Ensure that you have committed all changes - only changes in the repository will be submitted.</p>
68
<p>You may resubmit a project again at any time until its deadline, but a new submission will overwrite any made earlier.</p>
69
<p><input type="submit" value="Submit Project" />
70
<a class="helpaction" href="/+help/Submitting%20a%20project">Help submitting a project</a>
40
<p>You may resubmit a project again at any time until its deadline.</p>
41
<p><input type="submit" value="Submit Project" /></p>