mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Changed timeselection snippet to include
This commit is contained in:
parent
60a06efad8
commit
6316e45265
@ -5,7 +5,7 @@ author = {
|
||||
"email":"maloja@krateng.dev",
|
||||
"github": "krateng"
|
||||
}
|
||||
version = 2,9,7
|
||||
version = 2,9,8
|
||||
versionstr = ".".join(str(n) for n in version)
|
||||
links = {
|
||||
"pypi":"malojaserver",
|
||||
|
@ -27,8 +27,9 @@
|
||||
<h1>Artist Charts</h1><a href="/top_artists"><span>View #1 Artists</span></a><br/>
|
||||
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
|
||||
<br/><br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys) }}
|
||||
{% with delimitkeys = {} %}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
{% endwith %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -29,8 +29,9 @@
|
||||
{% if filterkeys.get('artist') is not none %}by {{ links.link(filterkeys.get('artist')) }}{% endif %}
|
||||
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
|
||||
<br/><br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys) }}
|
||||
{% with delimitkeys = {} %}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
{% endwith %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -25,8 +25,7 @@
|
||||
<br/>
|
||||
{{ filterdesc.desc(filterkeys,limitkeys,prefix='of') }}
|
||||
<br/><br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys,delimit=True) }}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -25,8 +25,7 @@
|
||||
<br/>
|
||||
{{ filterdesc.desc(filterkeys,limitkeys,prefix='of') }}
|
||||
<br/><br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys,delimit=True) }}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -31,8 +31,9 @@
|
||||
<br/>
|
||||
<p class="stats">{{ scrobbles.__len__() }} Scrobbles</p>
|
||||
<br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys) }}
|
||||
{% with delimitkeys = {} %}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
{% endwith %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1,13 +1,10 @@
|
||||
{% macro selector(filterkeys,limitkeys,delimitkeys,amountkeys,limit=True,delimit=False) %}
|
||||
|
||||
<!-- drop keys that are not relevant so they don't clutter the URI -->
|
||||
{% if not limit %}{% set limitkeys = {} %}{% endif %}
|
||||
{% if not delimit %}{% set delimitkeys = {} %}{% endif %}
|
||||
|
||||
|
||||
{% set allkeys = [filterkeys,limitkeys,delimitkeys,amountkeys] | combine_dicts %}
|
||||
|
||||
|
||||
{% if limit %}
|
||||
{% if limitkeys != {} %}
|
||||
|
||||
<div>
|
||||
{% set thisrange = limitkeys.timerange %}
|
||||
@ -42,7 +39,7 @@
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if delimit %}
|
||||
{% if delimitkeys != {} %}
|
||||
<div>
|
||||
{% for cat in [xdelimiters,xtrails] %}
|
||||
{% for r in cat %}
|
||||
@ -59,6 +56,3 @@
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endmacro %}
|
||||
|
@ -20,8 +20,7 @@
|
||||
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
|
||||
|
||||
<br/><br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys,delimit=True) }}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -20,8 +20,7 @@
|
||||
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
|
||||
|
||||
<br/><br/>
|
||||
{% import 'snippets/timeselection.jinja' as timeselection %}
|
||||
{{ timeselection.selector(filterkeys,limitkeys,delimitkeys,delimit=True) }}
|
||||
{% include 'snippets/timeselection.jinja' %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user