explicit context passing
This commit is contained in:
parent
c5cea4f8fa
commit
f8ed83a696
8 changed files with 15 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
{% extends "settings2.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
|
||||
{% block pagetitle %}Changelog{% endblock %}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
</div>
|
||||
|
||||
<div class="text-small font-weight-bold ml-3 mr-2"></div>
|
||||
{{sorting_time.sort_dropdown(false)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_POSTS)}}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{%- macro sort_dropdown(is_comment, extra_query) -%}
|
||||
{%- macro sort_dropdown(sort, t, all_sorts, extra_query='') -%}
|
||||
{% set all_sorts = SORTS_COMMENTS if is_comment else SORTS_POSTS %}
|
||||
<div class="dropdown dropdown-actions">
|
||||
<button class="btn btn-secondary dropdown-toggle" role="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "default.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
{% block desktopBanner %}
|
||||
|
||||
{% if v and environ.get("FP") %}
|
||||
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{% set ccmode_text = 'ccmode=' . ccmode %}
|
||||
{{sorting_time.sort_dropdown(false, ccmode_text)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_POSTS, ccmode_text)}}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "default.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
|
||||
{% block sortnav %}{% endblock %}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
|
||||
<div class="text-small font-weight-bold ml-3 mr-2"></div>
|
||||
{{sorting_time.sort_dropdown(true)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_COMMENTS)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "home.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
|
||||
{% block pagetype %}search{% endblock %}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
|
||||
{% set query_text = 'q=' ~ query | urlencode %}
|
||||
{{sorting_time.sort_dropdown(false, query_text)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_POSTS, query_text)}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "default.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
|
||||
{% if p.should_hide_score %}
|
||||
{% set ups="" %}
|
||||
|
@ -447,7 +447,7 @@
|
|||
<div class="row border-md-0 comment-section pb-3">
|
||||
<div class="col border-top">
|
||||
<div class="comments-count py-3">
|
||||
{{sorting_time.sort_dropdown(true)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_COMMENTS)}}
|
||||
{% if comment_info and p.comment_count >= 2%}
|
||||
<pre></pre>
|
||||
<div class="total"><a href="{{p.permalink}}">View entire discussion</a></div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "default.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
|
||||
{% block pagetype %}userpage{% endblock %}
|
||||
|
||||
|
@ -593,7 +593,7 @@
|
|||
</div>
|
||||
|
||||
<div class="text-small font-weight-bold ml-3 mr-2"></div>
|
||||
{{sorting_time.sort_dropdown(false)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_POSTS)}}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "userpage.html" %}
|
||||
{%- import 'component/sorting_time.html' as sorting_time with context -%}
|
||||
{%- import 'component/sorting_time.html' as sorting_time -%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
|||
</div>
|
||||
|
||||
<div class="text-small font-weight-bold ml-3 mr-2"></div>
|
||||
{{sorting_time.sort_dropdown(true)}}
|
||||
{{sorting_time.sort_dropdown(sort, t, SORTS_COMMENTS)}}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue