gdritter repos frony-ritter-designs / master old_templates / edit_design.html
master

Tree @master (Download .tar.gz)

edit_design.html @master

8c17190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
$def with(title, images, description, category, id, tags='')
$code
    def selected(cat):
        if cat == category:
            return "selected=\"selected\""
        else:
            return ""
<div id="design">
  <p>
    <a href="/edit/design/">Return to Editing List</a>
  </p>
  <h1>See This Design</h1>
  <a href="/design/$five(id)/">Click Here</a>
  <h1>Design Data</h1>
  <form name="design-data" method="post" action="/design/$five(id)/">
    <p>
      design id: $id
    </p>
    <p><input type="text" name="title" value="$title" size="80"/></p>
    <p>
      <select name="category">
	$for (nm, cid, nnm) in all_categories():
	    <option value="$cid" $:selected(nm)>$nnm</option>
      </select>
    </p>
    <p>
      <textarea rows="8" cols="90" name="description">$description</textarea>
    </p>
    <p>
      <input type="text" name="tags" value="$tags" size="80"/>
    </p>
    <p>
      <input type="submit" value="Submit Design Data"/>
    </p>
  </form>
  <h1>Photos</h1>
  $for image in images:
      <form name="img_$loop.index" method="get" action="/edit/photo/$image/">
	<img src="/static/photos/$image" />
	<input type="hidden" name="design_id" value="$id" />
	<input type="submit" value="Delete This Photo" />
      </form>
  <p>
    <form name="img_upload" method="get" action="/edit/photo/">
      <input type="hidden" name="id" value="$five(id)" />
      <input type="submit" value="Upload New Photo" />
    </form>
  </p>
  <h1>Delete</h1>
  <p>
    <a href="/edit/delete/$five(id)/">Delete This Design</a>
  </p>
</div>