2018-06-03 16:30:16 +02:00
|
|
|
{% extends 'base.html' %}
|
2018-05-31 18:04:05 +02:00
|
|
|
|
|
|
|
{% block main %}
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<h1 class="header">{{ stack.stack_name }}</h1>
|
|
|
|
|
2018-06-05 12:22:09 +02:00
|
|
|
<p>{{ stack.stack_description }} </p>
|
2018-06-11 16:56:34 +02:00
|
|
|
<p id='creator'>Created by:
|
2018-06-10 19:33:50 +02:00
|
|
|
{% if stack.stack_author == None %} anon</p>
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
{{ stack.stack_author }}
|
|
|
|
{% endif %}
|
2018-06-09 14:27:43 +02:00
|
|
|
<h2>Books in this stack:</h2>
|
2018-06-11 16:56:34 +02:00
|
|
|
|
2018-06-09 14:27:43 +02:00
|
|
|
<p>
|
2018-06-11 16:56:34 +02:00
|
|
|
|
2018-06-09 14:27:43 +02:00
|
|
|
{% for book in stack.books %}
|
2018-06-11 16:56:34 +02:00
|
|
|
{% if loop.length >= 5 %}
|
|
|
|
{% if loop.index == 6 %}
|
|
|
|
<p style='color:red;'>Your stack is getting a little too big. Are these next books really relevant?</p>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2018-05-31 18:04:05 +02:00
|
|
|
|
|
|
|
<li> <a href="{{url_for('show_book_by_id', id=book.id)}}">{{book.title}}</a> </li>
|
2018-06-12 13:17:02 +02:00
|
|
|
<img class="no_cover" id="{{ book.title }}" src="../cover/{{ book.cover }}" width="150" onerror="if (this.src != '../cover/{{ book.cover }}') this.src = '../static/img/default_cover.gif';">
|
2018-06-06 16:07:39 +02:00
|
|
|
<div class='widget'>
|
|
|
|
<iframe src="../uploads/{{ book.file }}" width="50%" ></iframe>
|
|
|
|
</div>
|
2018-06-11 16:56:34 +02:00
|
|
|
|
|
|
|
|
2018-05-31 18:04:05 +02:00
|
|
|
{% endfor %}</p>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<br>
|
2018-06-12 13:17:02 +02:00
|
|
|
{%if light%}
|
|
|
|
{%else%}
|
2018-06-11 16:56:34 +02:00
|
|
|
<p><a href="{{url_for('show_books')}}">Add some more books</a></p>
|
2018-06-11 18:23:42 +02:00
|
|
|
<p><a href="{{ url_for('edit_stack_by_id', id=stack.id )}}">Edit title and/or description</a> </p>
|
|
|
|
<p><a href="{{ url_for('remove_stack_by_id', id=stack.id )}}">Remove stack</a> </p>
|
2018-06-12 13:17:02 +02:00
|
|
|
{%endif%}
|
2018-06-09 14:27:43 +02:00
|
|
|
<p><a href="{{url_for('show_stacks')}}">Go back to the other stacks</p>
|
2018-05-31 18:04:05 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|