mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Refactored charts into includes
This commit is contained in:
parent
a6088ec7b7
commit
785e6cfa17
@ -12,3 +12,4 @@ countas Dai Meng SNH48
|
|||||||
countas Mo Han SNH48
|
countas Mo Han SNH48
|
||||||
countas Su Shanshan SNH48
|
countas Su Shanshan SNH48
|
||||||
countas Lin Hui S.I.N.G.
|
countas Lin Hui S.I.N.G.
|
||||||
|
replaceartist 鞠婧禕 Ju Jungyi
|
||||||
|
Can't render this file because it has a wrong number of fields in line 4.
|
@ -74,9 +74,10 @@
|
|||||||
|
|
||||||
<h2><a href='{{ mlj_uri.create_uri("/charts_tracks",filterkeys) }}'>Top Tracks</a></h2>
|
<h2><a href='{{ mlj_uri.create_uri("/charts_tracks",filterkeys) }}'>Top Tracks</a></h2>
|
||||||
|
|
||||||
{% import 'partials/charts_tracks.jinja' as charts_tracks %}
|
|
||||||
|
|
||||||
{{ charts_tracks.charts_tracks(filterkeys,limitkeys,{"perpage":15,"page":0},compare=false) }}
|
{% with amountkeys={"perpage":15,"page":0} %}
|
||||||
|
{% include 'partials/charts_tracks.jinja' %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% import 'partials/charts_artists.jinja' as charts_artists %}
|
{% with compare=true %}
|
||||||
{{ charts_artists.charts_artists(limitkeys,amountkeys,compare=true) }}
|
{% include 'partials/charts_artists.jinja' %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
{% import 'snippets/pagination.jinja' as pagination %}
|
{% import 'snippets/pagination.jinja' as pagination %}
|
||||||
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
|
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
|
||||||
|
@ -41,8 +41,9 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% import 'partials/charts_tracks.jinja' as charts_tracks %}
|
{% with compare=true %}
|
||||||
{{ charts_tracks.charts_tracks(filterkeys,limitkeys,amountkeys,charts=charts,compare=true) }}
|
{% include 'partials/charts_tracks.jinja' %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
{% import 'snippets/pagination.jinja' as pagination %}
|
{% import 'snippets/pagination.jinja' as pagination %}
|
||||||
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
|
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{% import 'snippets/links.jinja' as links %}
|
{% import 'snippets/links.jinja' as links %}
|
||||||
{% import 'snippets/entityrow.jinja' as entityrow %}
|
{% import 'snippets/entityrow.jinja' as entityrow %}
|
||||||
|
|
||||||
{% macro charts_artists(limitkeys,amountkeys,charts=None,compare=False) %}
|
{% if charts is undefined %}
|
||||||
|
|
||||||
{% if charts is none %}
|
|
||||||
{% set charts = dbp.get_charts_artists(limitkeys) %}
|
{% set charts = dbp.get_charts_artists(limitkeys) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -59,7 +57,3 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{%- endmacro %}
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{% import 'snippets/links.jinja' as links %}
|
{% import 'snippets/links.jinja' as links %}
|
||||||
{% import 'snippets/entityrow.jinja' as entityrow %}
|
{% import 'snippets/entityrow.jinja' as entityrow %}
|
||||||
|
|
||||||
{% macro charts_tracks(filterkeys,limitkeys,amountkeys,charts=None,compare=False) %}
|
{% if charts is undefined %}
|
||||||
|
|
||||||
{% if charts is none %}
|
|
||||||
{% set charts = dbp.get_charts_tracks(filterkeys,limitkeys) %}
|
{% set charts = dbp.get_charts_tracks(filterkeys,limitkeys) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if compare %}
|
{% if compare %}
|
||||||
@ -56,7 +54,3 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{%- endmacro %}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user