summaryrefslogtreecommitdiff
path: root/templates/edit_page.html
blob: cb02d7801a940fb31082599bf2951cbcc7cb94fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{.section head}
  <link rel="stylesheet" type="text/css"
        href="{root|html-attr-value}style/journal.css" />
  <link rel="stylesheet" type="text/css"
        href="/journal/prettify/prettify.css"/>
  <script type="text/javascript" src="/journal/prettify/prettify.js"></script>
  <script type="text/javascript" src="/journal/prettify/lang-lisp.js"></script>
{.end}

{.section body}
  <h1 id="main-title">{site-name|html}</h1>
  <div id="main-subtitle">{site-subtitle|html}</div>

  <form id="editing-form" method="POST" accept-charset="UTF-8"
        action="{link|html-attr-value}">
    <input name="edit" type="hidden" />
    <input name="revision" type="hidden" value="{article.revision|html-attr-value}" />
    <table id="editing-form-table">
      <tr>
        <td><label for="title-field">{title-label|html}</label></td>
        <td><input type="text" id="title-field" name="title" value="{article.title|html}"></td>
      </tr>
      <tr>
        <td><label for="content-field">{content-label|html}</label></td>
        <td><textarea id="content-field" name="content" rows="20" cols="80">{article.body|html}</textarea></td>
      </tr>
      <tr>
        <td></td>
        <td><input type="checkbox" id="publish-p" name="publish-p" value="t" /><label for="publish-p">{publish-flag-label|html-attr-value}</label></td>
      </tr>

      <tr>
        <td>{characteristics-label|html}</td>
        <td>
          <table>
            <tbody>
              {.repeated section characteristics}
              <tr>
                <td><input type="submit" name="delete-char:{characteristic|html-attr-value}:{value|html-attr-value}" value="-"></input></td>
                <td>{characteristic|html}</td>
                <td>{value|html}</td>
              </tr>
              {.end}
              <tr>
                <td><input type="submit" name="add-char" value="+"></input></td>
                <td><input type="text" name="new-char-name"></input></td>
                <td><input type="text" name="new-char-value"></input></td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>

      <tr>
        <td></td>
        <td><input type="submit" value="{save-button-label|html-attr-value}" name="save" /></td>
      </tr>
    </table>
  </form>

  <div id="article-preview">
    {article|article-html}
  </div>
{.end}