Fix bug #11: do not index edit, delete and tool pages
[phorkie.git] / data / templates / index.htm
index 3893d2ab47d78185b9fd8bec0e19ecb0d9f9cb20..5752c1e5a9fe3767a589ca379d58ca0493989fda 100644 (file)
@@ -2,13 +2,13 @@
 {% block title %}New paste{% endblock %}
 
 {% block content %}
-<form method="post" action="/">
+<form method="post" action="/" enctype="multipart/form-data">
  <div class="control-group well pastedata">
    <label for="description">Description</label>
    <input type="text" name="description" id="description" value="{{description}}"/>
  </div>
 
- {% include 'edit-file.htm' with {'file': file[1], 'fileid': 0} %}
+ {% include 'edit-file.htm' with {'file': file[1], 'fileid': 0, 'newfile': true} %}
 
  {% include 'edit-add.htm' %}
 
  </div>
 
 </form>
+<script type="application/javascript">
+$(document).ready(function() {
+    initEdit();
+});
+</script>
 {% endblock %}
+
+
+{% block sidebar %}
+ {% if recents.results %}
+ <h3>Recently created</h3>
+ <ul>
+ {% for repo in recents.repos %}
+   {% include 'repo-sidebar-list.htm' %}
+ {% endfor %}
+ </ul>
+ {% endif %}
+{% endblock %}
\ No newline at end of file