2018-06-03 23:33:16 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block main %}
|
|
|
|
<div class="container">
|
|
|
|
|
2018-06-05 12:22:09 +02:00
|
|
|
{% from "_formhelpers.html" import render_field %}
|
2018-06-03 23:33:16 +02:00
|
|
|
|
|
|
|
<h1 class="page-header">Add Stack</h1>
|
|
|
|
{% with messages = get_flashed_messages() %}
|
|
|
|
{% if messages %}
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<ul>
|
|
|
|
{% for message in messages %}
|
|
|
|
<li>{{ message }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-06-10 19:33:50 +02:00
|
|
|
{% endwith %}
|
2018-06-03 23:33:16 +02:00
|
|
|
|
|
|
|
<form method="POST" action="{{ url_for('add_stack') }}" enctype=multipart/form-data>
|
|
|
|
{{form.hidden_tag()}}
|
|
|
|
<br>
|
|
|
|
{{ render_field(form.stack_name)}}
|
2018-06-11 17:57:22 +02:00
|
|
|
<div style="width: 40%;">
|
|
|
|
Add a nice description: {{ form.stack_description(size=90, class="form-control") }}
|
|
|
|
</div>
|
2018-06-10 19:33:50 +02:00
|
|
|
{{ render_field(form.stack_author)}}
|
2018-06-11 17:57:22 +02:00
|
|
|
<br>
|
2018-06-03 23:33:16 +02:00
|
|
|
<button type="submit" class='button'>Create</button>
|
2018-06-11 17:57:22 +02:00
|
|
|
</form>
|
|
|
|
<br>
|
|
|
|
<hr>
|
|
|
|
<br>
|
|
|
|
<h1> Stacks currently in the library </h1>
|
|
|
|
<ul>
|
|
|
|
{% for stack in stacks %}
|
2018-06-03 23:33:16 +02:00
|
|
|
|
2018-06-11 17:57:22 +02:00
|
|
|
<li> <a href="stacks/tab/{{ stack.id }}">
|
2018-06-03 23:33:16 +02:00
|
|
|
|
2018-06-11 17:57:22 +02:00
|
|
|
{{ stack.stack_name }}
|
|
|
|
</a></td>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2018-06-03 23:33:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|