Configurable index page
[phorkie.git] / data / templates / new.htm
diff --git a/data/templates/new.htm b/data/templates/new.htm
new file mode 100644 (file)
index 0000000..5b75bba
--- /dev/null
@@ -0,0 +1,40 @@
+{% extends "base.htm" %}
+{% block title %}New paste{% endblock %}
+
+{% block content %}
+<form method="post" action="/new" 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, 'newfile': true} %}
+
+ {% include 'edit-add.htm' %}
+
+ <div class="well" style="text-align: right">
+  <button class="btn btn-primary" type="submit">
+   <i class="icon-check icon-white"></i>
+   Create
+  </button>
+ </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