werc-1.5.0-tweaks

Tweaks for the werc website builder created by the mad architect Uriel
Log | Files | Refs | README

edit.tpl (965B)


      1 <div>
      2     <h1>Editing: <a href="%($req_path%)">%($req_path%)</a></h1>
      3     <br>
      4     <form action="" method="POST">
      5         <textarea name="edit_text" id="edit_text" cols="80" rows="43">%{
      6 # FIXME Extra trailing new lines get added to the content somehow, should avoid it.
      7             if(~ $#post_arg_edit_text 0 && test -f $dirdir_file)
      8                 cat $dirdir_file | escape_html
      9             if not
     10                 echo -n $post_arg_edit_text | escape_html
     11 
     12         %}</textarea>
     13         <br>
     14         <input type="submit" name="dirdir_save" value="Save">
     15         <input type="submit" name="dirdir_preview" value="Preview">
     16         <small>DirDir documents are written using <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a>.</small>
     17     </form>
     18 </div>
     19 
     20 % if(! ~ $"post_arg_dirdir_preview '') {
     21             <h2>Preview:</h2>
     22             <div id="preview">
     23 %               echo $post_arg_edit_text | $formatter
     24             </div>
     25 % }