add "view_as parameter"

pull/1/head
eric 2015-04-11 08:25:41 -04:00
parent f5ebcb7a62
commit 5644d0ea37
3 changed files with 11 additions and 3 deletions

View File

@ -0,0 +1,3 @@
<p style="line-height: 15px; ">
<i>{{ work.title }}</i>, by {{ work.authors_short }}, <a href="https://unglue.it{% url work work.id %}">https://unglue.it{% url work work.id %}</a>
</p>

View File

@ -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 %}
<div class="{% cycle 'row1' 'row2' %}">
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}
{% include "book_panel.html" %}
</div>
{% endwith %}
{% endif %}
{% endfor %}
<div class="pagination content-block-heading tabs-{{ activetab }}">
{% get_pages %}

View File

@ -916,6 +916,7 @@ class FacetedView(FilterableListView):
context['path'] = self.vertex.get_facet_path().replace('//','/').strip('/')
context['vertex'] = self.vertex
context['order_by'] = self.request.GET.get('order_by', 'newest')
context['view_as'] = self.request.GET.get('view_as', None)
return context