connect stacks and edit stacks and add covers

This commit is contained in:
Alice 2018-06-06 14:32:18 +02:00
parent e151495683
commit ca91e2e37a
4 changed files with 8 additions and 30 deletions

View File

@ -16,22 +16,6 @@
<button type="submit" class="button" value="Stack" name="add_book">Add to stack</button>
</form>
<br>
<br>
<h1 class="page-header">Build a stack</h1>
<p><a href= {{ url_for('add_stack') }}>Add Stack</a></p>
<div id="draggable" class="ui-widget-content">
<p>List of books</p>
</div>
<div id="droppable" class="ui-widget-header">
<p>Stack</p>
</div>
</div>
{% endblock %}

View File

@ -5,11 +5,11 @@
<h1 class="header">{{ stack.stack_name }}</h1>
<p>{{ stack.stack_description }} </p>
<p>Books in this stack: {% for book in stack.books %}
<li> <a href="{{url_for('show_book_by_id', id=book.id)}}">{{book.title}}</a> </li>
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" width="150" onerror="if (this.src != '../static/img/{{ book.cover }}') this.src = '../static/img/default_cover.png';">
{% endfor %}</p>

View File

@ -13,8 +13,12 @@
<p>Books in this stack: {% for book in stack.books %}
<li> <a href="{{url_for('show_book_by_id', id=book.id)}}">{{book.title}}</a> </li>
<li style="font-size: 18px;"> <a href="{{url_for('show_book_by_id', id=book.id)}}">{{book.title}}</a> </li>
<p style="font-size: 10px;"><a href='{{url_for('add_to_stack', id=book.id)}}'>
Add to another stack
</a></p>
{% endfor %}</p>

View File

@ -4,6 +4,8 @@
<div class="container">
<h1 class="page-header">Stacks</h1>
<p>These are all the stacks that have been built so far.</p>
<p><a href= {{ url_for('add_stack') }}>Add a new stack</a></p>
<table style="width:100%">
@ -26,19 +28,7 @@
<br>
<br>
<h1 class='page-header'><a href= {{ url_for('add_stack') }}>Add Stack</a></h1>
<!--
<div id="draggable" class="ui-widget-content">
<p>List of books</p>
</div>
<div id="droppable" class="ui-widget-header">
<p>Stack</p>
</div>
-->
</div>
{% endblock %}