From 5644d0ea37c416e72227145102dfc152e681d612 Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 11 Apr 2015 08:25:41 -0400 Subject: [PATCH] add "view_as parameter" --- frontend/templates/book_plain.html | 3 +++ frontend/templates/faceted_list.html | 10 +++++++--- frontend/views.py | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 frontend/templates/book_plain.html diff --git a/frontend/templates/book_plain.html b/frontend/templates/book_plain.html new file mode 100644 index 00000000..98361279 --- /dev/null +++ b/frontend/templates/book_plain.html @@ -0,0 +1,3 @@ +

+{{ work.title }}, by {{ work.authors_short }}, https://unglue.it{% url work work.id %} +

diff --git a/frontend/templates/faceted_list.html b/frontend/templates/faceted_list.html index c45e6d6b..727ae2d7 100644 --- a/frontend/templates/faceted_list.html +++ b/frontend/templates/faceted_list.html @@ -70,11 +70,15 @@ {% else %} {% lazy_paginate 20 work_list using "work_list" %} {% for work in work_list %} + {% if view_as == 'plain' %} + {% include "book_plain.html" %} + {% else %} + {% with work.googlebooks_id as googlebooks_id %}
- {% with work.googlebooks_id as googlebooks_id %} - {% include "book_panel.html" %} - {% endwith %} + {% include "book_panel.html" %}
+ {% endwith %} + {% endif %} {% endfor %}