]> WPIA git - motion.git/blobdiff - templates/index.html
Merge branch 'motion_close' into 'master'
[motion.git] / templates / index.html
index 57a73f8698104a66202a5e1c8fe60f80301d81bb..04bbabe8780b5540e2e6bee80009e92153eb40c5 100644 (file)
@@ -1,20 +1,53 @@
 {% extends "base.html" %}
 {% block body %}
 <div class="container">
-<form action="/motion" method="POST">
-<div class="motion panel panel-default">
-  <div class="motion-title panel-heading"><input class="form-control" placeholder="Motion title" type="text" name="title" id="title"></div>
-  <div class="panel-body">
-    <textarea class="form-control" placeholder="Motion content" name="content" rows="8" cols="70"></textarea>
+{%- if categories|length != 0 %}
+<div class="card">
+<div class="card-body">
+User: {{g.user}}
+</div>
+</div>
+<form action="/motion" method="POST" class="form-inline">
+<div class="motion card">
+  <div class="motion-title card-heading alert-light from-group">
+    <input class="form-control motion-title-input" placeholder="Motion title" type="text" name="title" id="title">
+    {%- if categories|length == 1 %}
+    <input type="text" class="float form-control" maxwidth="10" disabled value="{{categories[0]}}">
+    <input type="hidden" name="category" value="{{categories[0]}}">
+    {%- else %}
+    <select class="float form-control" name="category">
+      {%- for cat in categories %}
+      <option>{{cat}}</option>
+      {%- endfor %}
+    </select>
+    {%- endif %}
+    <select class="float form-control" name="days">
+      {%- for time in times %}
+      <option>{{time}}</option>
+      {%- endfor %}
+    </select>
+  </div>
+  <div class="card-body">
+    <textarea class="form-control" placeholder="Motion content" name="content" rows="8"></textarea><br>
+    Editing note: Markdown is used formatting.<br>
+    To add a line break add two lines, to enter a link use [text](https//domain.tld/link)<br>
     <button class="btn btn-primary" type="submit">Submit Motion</button>
   </div>
 </div>
 </form>
-{% for motion in motions %}
+{%- endif %}
+{%- if prev %}
+{%- if prev == -1 %}
+<a href="/" class="btn btn-primary">Prev</a>
+{%- else %}
+<a href="/?start={{ prev }}" class="btn btn-primary">Prev</a>
+{%- endif %}
+{%- endif %}
+{%- for motion in motions %}
 {% include 'motion.html' %}
-{% endfor %}
+{%- endfor %}
 {%- if more %}
-<a href="/?start={{ more }}">Next</a>
+<a href="/?start={{ more }}" class="btn btn-primary">Next</a>
 {%- endif %}
 </div>
 {%- endblock %}