Commit 8c5dfed9 authored by Robin's avatar Robin

Working homepage.

parent 573d0221
.active-block
Display :
- if active_only
current legislature only /
%a{'href': '?={queries.urlencode}&active_only=0'}
all data
- else
%a{'href': '?={queries.urlencode}&active_only=1'}
current legislature only
="/ all data"
\ No newline at end of file
{% block active %}
Display :
{% if active_only %}
current legislature only /
<a href="{queries.urlencode}&active_only=0">
all data
</a>
{% else %}
<a href="{queries.urlencode}&active_only=1">
current legislature only
</a>
/ all data
{% endif %}
{% endblock %}
.pagination-block
%nav
%ul.pagination.pagination-sm
- if page_obj.has_previous
%li
%a{'href': '?={queries.urlencode}&page=1',
'aria-label': 'First'}
<i aria-hidden="true" class="fa fa-chevron-circle-left"></i>
%li
%a{'href': '?={queries.urlencode}&page=={page_obj.previous_page_number}',
'aria-label': 'Previous'}
<i aria-hidden="true" class="fa fa-chevron-left"></i>
- for p in page_range
- if p
- if p == page_obj.number
%li.active
%a{'href': ''}
{{ p }}
- else
%li
%a{'href': '?={queries.urlencode}&page=={p}'}
{{ p }}
- if page_obj.has_next
%li
%a{'href': '?={queries.urlencode}&page=={page_obj.next_page_number}',
'aria-label': 'Next'}
<i aria-hidden="true" class="fa fa-chevron-right"></i>
%li
%a{'href': '?={queries.urlencode}&page=={paginator.num_pages}',
'aria-label': 'Last'}
<i aria-hidden="true" class="fa fa-chevron-circle-right"></i>
%div.count
.count-block
Number of results : {{ paginator.count }}
- if active_only != None
- include 'core/blocks/active-filter.html'
- if sort != None
- include 'core/blocks/sorting.html'
.page-size-block
Number of displayed results :
{{ paginator.per_page }}
(
- for limit in pagination_limits
%a{'href': '?={queries.urlencode}&paginate_by={{ limit }}'}<
{{ limit }}
- if not forloop.last
\/
)
- if grid_list
- include 'core/blocks/grid-list.html'
{% block pagination %}
<nav>
<ul class="pagination pagination-sm">
{% if page_obj.has_previous %}
<li>
<a href="{{queries.urlencode}}&page=1" aria-label="First">
<i aria-hidden="true" class="fa fa-chevron-circle-left"></i>
</a>
</li>
<li>
<a href="{queries.urlencode}&page=={page_obj.previous_page_number}" aria-label="Previous">
<i aria-hidden="true" class="fa fa-chevron-left"></i>
</a>
</li>
{% endif %}
{% for p in page_range %}
{% if p %}
{% if p == page_obj.number %}
<li class="active">
<a href=''>
{{ p }}
</a>
</li>
{% else %}
<li>
<a href="{queries.urlencode}&page=={p}">
{{ p }}
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href=""{queries.urlencode}&page=={page_obj.next_page_number}" aria-label="Next">
<i aria-hidden="true" class="fa fa-chevron-right"></i>
</a>
</li>
<li>
<a href="{queries.urlencode}&page=={paginator.num_pages}" aria-label="Last">
<i aria-hidden="true" class="fa fa-chevron-circle-right"></i>
</a>
</li>
{% endif %}
</ul>
</nav>
<div class=".count">
{% block count %}
Number of results : {{ paginator.count }}
{% if active_only != None %}
{% include 'core/blocks/active-filter.html' %}
{% endif %}
{% if sort != None %}
{% include 'core/blocks/sorting.html' %}
{% endif %}
{% endblock %}
{% block page-size %}
Number of displayed results :
{{ paginator.per_page }}
(
{% for limit in pagination_limits %}
<a href="{queries.urlencode}&paginate_by={{ limit }}">
{{ limit }}
</a>
{% if not forloop.last %}
/
{% endif %}
{% endfor %}
)
{% if grid_list %}
{% include 'core/blocks/grid-list.html' %}
{% endif %}
{% endblock %}
</div>
{% endblock %}
......@@ -19,6 +19,12 @@ import api
admin.autodiscover()
urlpatterns = [
url(
r'^legislature/representative/(?P<group_kind>\w+)/(?P<chamber>.+)/' +
r'(?P<group>.+)/$',
RedirectGroupRepresentativeList.as_view(),
name='representative-list'
),
url(
r'^legislature/representative/(?P<group_kind>\w+)/(?P<group>.+)/$',
RepresentativeList.as_view(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment