2012-09-17 00:25:00 +00:00
|
|
|
{%- macro change_lang(lang) -%}
|
|
|
|
{%- if request.endpoint == 'site_show' -%}{{ url_for('site_show', lang=lang, page=page) }}
|
2013-01-09 00:32:32 +00:00
|
|
|
{%- elif request.endpoint == 'blog_post' -%}{{ url_for('blog_post', lang=lang, slug=slug) }}
|
2012-09-17 00:25:00 +00:00
|
|
|
{%- elif request.endpoint == 'meetings_show' -%}{{ url_for('meetings_show', lang=lang, id=id) }}
|
2012-11-10 05:53:24 +00:00
|
|
|
{%- elif request.endpoint == 'downloads_select' -%}{{ url_for('downloads_select', lang=lang, file=file) }}
|
2012-09-17 00:25:00 +00:00
|
|
|
{%- elif request.endpoint -%}{{ url_for(request.endpoint, lang=lang) }}
|
|
|
|
{%- else -%}{{ url_for('site_show', lang=lang) }}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endmacro -%}
|
2012-12-14 06:26:21 +00:00
|
|
|
|
|
|
|
{%- macro render_pagination(pagination) %}
|
|
|
|
<div class="pagination">
|
|
|
|
{%- if pagination.has_prev %}
|
|
|
|
<a href="{{ url_for_other_page(pagination.page - 1)
|
|
|
|
}}">« Previous</a>
|
|
|
|
{%- endif %}
|
|
|
|
{%- for page in pagination.iter_pages() %}
|
|
|
|
{%- if page %}
|
|
|
|
{%- if page != pagination.page %}
|
|
|
|
<a href="{{ url_for_other_page(page) }}">{{ page }}</a>
|
|
|
|
{%- else %}
|
|
|
|
<strong>{{ page }}</strong>
|
|
|
|
{%- endif %}
|
|
|
|
{%- else %}
|
|
|
|
<span class="ellipsis">…</span>
|
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- if pagination.has_next %}
|
|
|
|
<a href="{{ url_for_other_page(pagination.page + 1)
|
|
|
|
}}">Next »</a>
|
|
|
|
{%- endif %}
|
|
|
|
</div>
|
|
|
|
{%- endmacro -%}
|