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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/templates/exercise_delete.html

Improve the worksheet/exercise authoring experience a little.

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>Delete Exercise - ${exercise.id}</title>
5
 
    <!-- These let the javascript know which worksheet is open -->
6
 
    <script type="text/javascript">
7
 
        exercise = '${exercise.id}';
8
 
    </script>
 
4
    <title>Delete exercise - ${exercise.id}</title>
9
5
  </head>
10
6
  <body>
11
 
    <h1>Delete Exercise - ${exercise.id}</h1>
 
7
    <h1>Delete exercise</h1>
12
8
    <div id="ivle_padding">
13
 
    <py:choose test="method">
14
 
      <py:when test="'POST'">
15
 
        <py:choose test="deleted">
16
 
          <py:when test="True">
17
 
            <h3>Exercise Deleted</h3>
18
 
            <a href="/+exercises">Return to Exercise List</a>
19
 
          </py:when>
20
 
          <py:otherwise>
21
 
            <h3>Error Deleting Exercise</h3>
22
 
            <p>The specified exercise could not be deleted. This could be because it is linked to one or more worksheets.</p>
23
 
          </py:otherwise>
24
 
        </py:choose>
25
 
      </py:when>
26
 
      <py:otherwise>
27
 
        <py:choose test="has_worksheets">
28
 
          <py:when test="True">
29
 
            <h3>Denied</h3>
30
 
            <p>You cannot delete this exercise, as it has been associated with a worksheet.</p>
31
 
          </py:when>
32
 
          <py:otherwise>
33
 
            <h3>Identifier:</h3>
34
 
            <p>${exercise.id}</p>
35
 
            <h3>Name:</h3>
36
 
            <p>${exercise.name}</p>
37
 
            <p>Are you sure you wish to delete this exercise?</p>
38
 
            <form action="${path}" method="POST">
39
 
              <input type="submit" value="Delete"/>
40
 
            </form>
41
 
          </py:otherwise>
42
 
        </py:choose>
43
 
      </py:otherwise>
44
 
    </py:choose>
 
9
      <div><strong>Identifier:</strong> ${exercise.id}</div>
 
10
      <div><strong>Name:</strong> ${exercise.name}</div>
 
11
      <p>Are you sure you want to delete this exercise? It has not been used by any worksheets.</p>
 
12
      <form action="" method="POST">
 
13
        <input type="submit" value="Delete"/>
 
14
      </form>
45
15
    </div>
46
16
  </body>
47
17
</html>