Browse Source

connect stacks and edit stacks and add covers

ansible-setup-and-deploy
Alice 6 years ago
parent
commit
ca91e2e37a
  1. 16
      app/templates/add_to_stacks.html
  2. 2
      app/templates/show_stack_detail.html
  3. 6
      app/templates/show_stack_detail_tab.html
  4. 14
      app/templates/show_stacks.html

16
app/templates/add_to_stacks.html

@ -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 %}

2
app/templates/show_stack_detail.html

@ -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>

6
app/templates/show_stack_detail_tab.html

@ -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>

14
app/templates/show_stacks.html

@ -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 %}

Loading…
Cancel
Save