connect stacks and edit stacks and add covers

master
Alice 7 years ago
parent e151495683
commit ca91e2e37a

@ -16,22 +16,6 @@
<button type="submit" class="button" value="Stack" name="add_book">Add to stack</button> <button type="submit" class="button" value="Stack" name="add_book">Add to stack</button>
</form> </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> </div>
{% endblock %} {% endblock %}

@ -5,11 +5,11 @@
<h1 class="header">{{ stack.stack_name }}</h1> <h1 class="header">{{ stack.stack_name }}</h1>
<p>{{ stack.stack_description }} </p> <p>{{ stack.stack_description }} </p>
<p>Books in this stack: {% for book in stack.books %} <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> <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> {% endfor %}</p>

@ -13,8 +13,12 @@
<p>Books in this stack: {% for book in stack.books %} <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> {% endfor %}</p>

@ -4,6 +4,8 @@
<div class="container"> <div class="container">
<h1 class="page-header">Stacks</h1> <h1 class="page-header">Stacks</h1>
<p>These are all the stacks that have been built so far.</p> <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%"> <table style="width:100%">
@ -26,19 +28,7 @@
<br> <br>
<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> </div>
{% endblock %} {% endblock %}

Loading…
Cancel
Save