summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2014-11-19 02:56:10 +0100
committerAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2014-11-19 02:57:43 +0100
commit411c19c7f952a834399232d17c4fe546cf0eaa41 (patch)
tree04e14a3c2c46ee00143247cde3a85fd03d5d8e8e /templates
parent900985df8179810bfa4efbf79bef6075e04b4d21 (diff)
downloadpadlite-teams-411c19c7f952a834399232d17c4fe546cf0eaa41.tar.gz
padlite-teams-411c19c7f952a834399232d17c4fe546cf0eaa41.tar.bz2
padlite-teams-411c19c7f952a834399232d17c4fe546cf0eaa41.zip
forms: add CreatePad
Diffstat (limited to 'templates')
-rw-r--r--templates/group.html13
-rw-r--r--templates/pad_change.html33
2 files changed, 46 insertions, 0 deletions
diff --git a/templates/group.html b/templates/group.html
index bc08e4d..7f90c57 100644
--- a/templates/group.html
+++ b/templates/group.html
@@ -19,6 +19,19 @@
</div>
{% if not public_view %}
+<div class="panel panel-default">
+ <div class="panel-heading" style="border-bottom: 0">
+ <h3 class="panel-title">Pads</h3>
+ </div>
+
+ {% if admin %}
+ <div class="panel-footer">
+ <a href="{{ url_for('pad_create', group_name=group.name) }}">
+ Create pad
+ </a>
+ </div>
+ {% endif %}
+</div>
<div class="panel panel-default">
<div class="panel-heading">
diff --git a/templates/pad_change.html b/templates/pad_change.html
new file mode 100644
index 0000000..dd8e7d2
--- /dev/null
+++ b/templates/pad_change.html
@@ -0,0 +1,33 @@
+{% extends "layout.html" %}
+{% from "_formhelpers.html" import render_field %}
+
+{% block head %}Group: {{group}}{% endblock %}
+
+{% block content %}
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {% if pad %}
+ <h3 class="panel-title">Edit pad: {{pad.name}}</h3>
+ {% else %}
+ <h3 class="panel-title">Create a pad</h3>
+ {% endif %}
+ </div>
+
+ <div class="panel-body">
+ <form class="form-horizontal" role="form" method="POST">
+ {% for field in change_form %}
+ {{ render_field(field) }}
+ {% endfor %}
+ <div class="form-group">
+ <div class="col-lg-10 col-lg-offset-2">
+ {% if pad %}
+ <button type="submit" class="btn btn-primary">Save pad</button>
+ {% else %}
+ <button type="submit" class="btn btn-primary">Create pad</button>
+ {% endif %}
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+{% endblock %}