diff --git a/app/templates/show_stack_detail.html b/app/templates/show_stack_detail.html
index 8cee949..1fc8779 100644
--- a/app/templates/show_stack_detail.html
+++ b/app/templates/show_stack_detail.html
@@ -1,3 +1,4 @@
+{% extends 'base.html' %}
{% block main %}
@@ -5,13 +6,7 @@
-
Stack description:
-{% for stack in stacks %}
-
- {{ stack.stack_description }}
-
-{% endfor %}
-
+
Stack description: {{ stack.stack_description }}
Books in this stack: {% for book in stack.books %}
{{book.title}}
diff --git a/app/templates/show_stacks.html b/app/templates/show_stacks.html
index 613f971..898fa10 100644
--- a/app/templates/show_stacks.html
+++ b/app/templates/show_stacks.html
@@ -11,8 +11,7 @@
{% for stack in stacks %}
-
- - {{ stack.stack_name }}
+
- {{ stack.stack_name }}
diff --git a/app/views.py b/app/views.py
index 2d04837..37598db 100755
--- a/app/views.py
+++ b/app/views.py
@@ -294,15 +294,22 @@ def add_stack():
flash("%s stack created" % (stack_name))
return render_template('add_stack.html', stacks=stacks, form=form)
+@app.route('/stacks/tab/', methods=['POST', 'GET'])
+def show_stack_in_tab(id):
+ return show_stack_by_id(id, is_tab=True)
@app.route('/stacks/', methods=['POST', 'GET'])
-def show_stack_by_id(id):
+def show_stack_by_id(id, is_tab=False):
+
stack = Stack.query.get(id)
if not stack:
abort (404)
else:
- return render_template('show_stack_detail.html', stack=stack)
+ if is_tab == False:
+ return render_template('show_stack_detail.html', stack=stack)
+ else:
+ return render_template('show_stack_detail_tab.html', stack=stack)
## search