Make phorkie search engine friendlier
[phorkie.git] / data / templates / edit.htm
index db1f3f57ffc2fbb9dc7a5b2dcab0aa9d24439e21..912a073419941e7a50f6c95e5bcc0b464525a1b1 100644 (file)
@@ -6,7 +6,8 @@
 {% endblock %}
 
 {% block content %}
-<form method="post" action="{{repo.getLink('edit')}}" enctype="multipart/form-data" class="form-horizontal">
+<div class="content-padding-fix"></div>
+<form method="post" action="{{formaction}}" enctype="multipart/form-data" class="form-horizontal">
  <div class="control-group">
   <label class="control-label" for="description">Description</label>
   <div class="controls">
  </div>
 
  {% for fileid, file in repo.getFiles %}
-  {% include 'edit-file.htm' with {'file': file, 'fileid': fileid, 'newfile': false} %}
+  {% if not singlefile or file == singlefile %}
+    {% include 'edit-file.htm' with {'file': file, 'fileid': fileid, 'newfile': false} %}
+  {% endif %}
  {% endfor %}
 
+ {% if singlefile == "newfile" %}
+   {% include 'edit-file.htm' with {'file': null, 'fileid': 'newfile', 'newfile': true} %}
+ {% endif %}
+
  {% include 'edit-add.htm' %}
 
   <div class="row-fluid formbuttons">