PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/www/dsp/edit-page.dsp

http://github.com/cgay/wiki
Unknown | 82 lines | 77 code | 5 blank | 0 comment | 0 complexity | 04be7c47313eb9d0f3dd2b8b6056f774 MD5 | raw file
 1<%dsp:include url="xhtml-start.dsp"/>
 2<%dsp:taglib name="wiki"/>
 3<head>
 4  <title>Dylan Wiki: <wiki:show-page-title/></title>
 5  <%dsp:include url="meta.dsp"/>
 6</head>
 7<body>
 8  <%dsp:include url="header.dsp"/>
 9  <div id="midsection">
10    <div id="navigation">
11      <wiki:include-page title="Wiki Left Nav"/>
12    </div>
13    <%dsp:include url="options-menu.dsp"/>
14    <div id="content">
15      <h2><wiki:show-page-title/></h2>
16
17      <dsp:when test="page?">
18        (Owned by <wiki:show-page-owner/>)
19      </dsp:when>
20
21      <dsp:show-page-errors/>
22      <dsp:show-page-notes/>
23
24      <dsp:when test="true?" name="previewing?">
25        <p><font color="red">THIS IS A PREVIEW.  DON'T FORGET TO SAVE THE PAGE.</font></p>
26        <hr/>
27        <div class="preview">
28          <dsp:if test="can-view-content?">
29            <dsp:then>
30              <dsp:get name="preview" context="page" raw="true"/>
31              <%dsp:include url="view-page-tags.dsp"/>
32            </dsp:then>
33            <dsp:else>
34              You do not have permission to view this page.
35            </dsp:else>
36          </dsp:if>
37        </div>
38        <hr/>
39      </dsp:when>
40
41      <dsp:unless test="page?">
42        <p class="hint">
43          This page doesn't exist. You can create it by writing the page's content below.
44        </p>
45      </dsp:unless>
46      <dsp:when test="can-modify-content?">
47        <form action="<wiki:base/>/page/edit/<dsp:get name='title' context='page'/>" method="post">
48          <fieldset>
49            <ol>
50              <li id="content-item">
51                <label id="content-label" for="content-text">Content:</label>
52                <textarea id="content-text" name="content" rows="20" cols="80"><dsp:get name="content" context="request,page"/></textarea>
53              </li>
54              <li id="tags-item">
55                <label id="tags-label" for="tags-input">Tags:</label>
56                <input id="tags-input" type="text" name="tags"
57                       value="<dsp:get name='tags' context='request,page'/>"/>
58                <dsp:show-field-errors field-name="tags"/>
59              </li>
60              <li id="comment-item">
61                <label id="comment-label" for="comment-input">Comment:</label>
62                <input id="comment-input" type="text" name="comment"
63                       value="<dsp:get name='comment' context='request'/>"/>
64                <dsp:show-field-errors field-name="comment"/>
65              </li>
66            </ol>
67          </fieldset>
68          <input type="submit" name="button" value="Preview"/>
69          <dsp:when test="page?">
70            <input type="submit" name="button" value="Save"/>
71          </dsp:when>
72          <dsp:unless test="page?">
73            <input type="submit" name="button" value="Create"/>
74          </dsp:unless>
75        </form>
76
77      </dsp:when>
78    </div>
79  </div>
80  <%dsp:include url="footer.dsp"/>
81</body>
82</html>