add "view_as parameter"
parent
f5ebcb7a62
commit
5644d0ea37
|
@ -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>
|
|
@ -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 %}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue