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

« back to all changes in this revision

Viewing changes to ivle/webapp/submit/submit.html

  • Committer: William Grant
  • Date: 2009-03-31 05:30:52 UTC
  • mto: (1165.3.1 submissions)
  • mto: This revision was merged to the branch mainline in revision 1174.
  • Revision ID: grantw@unimelb.edu.au-20090331053052-767ukx7njc1lzqcb
Display a useful message when no offering could be determined.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
  <body>
7
7
    <h1>Submit project</h1>
8
8
    <div id="ivle_padding">
9
 
      <p>You are submitting <span style="font-family: monospace">${path}</span> from
10
 
        <py:choose test="">
11
 
          <span py:when="principal is req.user">your repository.</span>
12
 
          <span py:otherwise="">the repository for ${principal.display_name}.</span>
13
 
        </py:choose>
14
 
      </p>
15
 
      <p>You may submit to any open project in ${offering.subject.name}. Which project do you wish to submit this for?</p>
16
 
      <form action="" method="post">
17
 
        <ul style="list-style: none">
18
 
          <li py:for="project in principal.get_projects(offering=offering)"
19
 
              py:with="attrs = {'disabled': 'disabled'} if project.deadline &lt; now else {}">
20
 
            <input type="radio" name="project" id="project_${project.id}" value="${project.id}" py:attrs="attrs" />
21
 
            <label for="project_${project.id}">${project.name} - <em>${project.synopsis}</em> - (due ${format_datetime(project.deadline)})</label>
22
 
          </li>
23
 
        </ul>
24
 
        <p>You may resubmit a project again at any time until its deadline.</p>
25
 
        <p><input type="submit" value="Submit Project" /></p>
26
 
      </form>
 
9
 
 
10
      <py:choose test="offering">
 
11
        <div py:when="None">
 
12
          <p>You may not submit files from <span style="font-family: monospace">${path}</span> in
 
13
            <py:choose test="">
 
14
              <span py:when="principal is req.user">your repository.</span>
 
15
              <span py:otherwise="">the repository for ${principal.display_name}.</span>
 
16
            </py:choose>
 
17
            You can only submit files from a subject directory.
 
18
          </p>
 
19
        </div>
 
20
        <div py:otherwise="">
 
21
          <p>You are submitting <span style="font-family: monospace">${path}</span> from
 
22
            <py:choose test="">
 
23
              <span py:when="principal is req.user">your repository.</span>
 
24
              <span py:otherwise="">the repository for ${principal.display_name}.</span>
 
25
            </py:choose>
 
26
          </p>
 
27
          <p>You may submit to any open project in ${offering.subject.name}. Which project do you wish to submit this for?</p>
 
28
          <form action="" method="post">
 
29
            <ul style="list-style: none">
 
30
              <li py:for="project in principal.get_projects(offering=offering)"
 
31
                  py:with="attrs = {'disabled': 'disabled'} if project.deadline &lt; now else {}">
 
32
                <input type="radio" name="project" id="project_${project.id}" value="${project.id}" py:attrs="attrs" />
 
33
                <label for="project_${project.id}">${project.name} - <em>${project.synopsis}</em> - (due ${format_datetime(project.deadline)})</label>
 
34
              </li>
 
35
            </ul>
 
36
            <p>You may resubmit a project again at any time until its deadline.</p>
 
37
            <p><input type="submit" value="Submit Project" /></p>
 
38
          </form>
 
39
        </div>
 
40
      </py:choose>
27
41
    </div>
28
42
  </body>
29
43
</html>