1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed pagination on pulse and performance views

This commit is contained in:
Krateng 2019-06-17 15:07:23 +02:00
parent 5fedde5e9f
commit 6958196adb
3 changed files with 7 additions and 7 deletions

View File

@ -9,10 +9,10 @@ def instructions(keys):
from htmlmodules import module_performance, module_filterselection
from malojatime import range_desc, delimit_desc
filterkeys, timekeys, delimitkeys, _ = uri_to_internal(keys)
filterkeys, timekeys, delimitkeys, paginatekeys = uri_to_internal(keys)
#equivalent pulse chart
pulselink_keys = internal_to_uri({**filterkeys,**timekeys,**delimitkeys})
pulselink_keys = internal_to_uri({**filterkeys,**timekeys,**delimitkeys,**paginatekeys})
pulselink = "/pulse?" + compose_querystring(pulselink_keys)
pulselink = "<a href=\"" + pulselink + "\"><span>View Pulse</span></a>"
@ -54,7 +54,7 @@ def instructions(keys):
html_performance = module_performance(**filterkeys,**timekeys,**delimitkeys)
html_performance = module_performance(**filterkeys,**timekeys,**delimitkeys,**paginatekeys)
replace = {
"KEY_PULSE_LINK":pulselink,

View File

@ -9,11 +9,11 @@ def instructions(keys):
from htmlmodules import module_pulse, module_filterselection
from malojatime import range_desc, delimit_desc
filterkeys, timekeys, delimitkeys, _ = uri_to_internal(keys)
filterkeys, timekeys, delimitkeys, paginatekeys = uri_to_internal(keys)
#equivalent performance chart if we're not looking at the overall pulse
if len(filterkeys) != 0:
performancelink_keys = internal_to_uri({**filterkeys,**timekeys,**delimitkeys})
performancelink_keys = internal_to_uri({**filterkeys,**timekeys,**delimitkeys,**paginatekeys})
performancelink = "/performance?" + compose_querystring(performancelink_keys)
performancelink = "<a href=\"" + performancelink + "\"><span>View Rankings</span></a>"
@ -57,7 +57,7 @@ def instructions(keys):
html_pulse = module_pulse(**filterkeys,**timekeys,**delimitkeys)
html_pulse = module_pulse(**filterkeys,**timekeys,**delimitkeys,**paginatekeys)
replace = {
"KEY_RANKINGS_LINK":performancelink,

View File

@ -61,7 +61,7 @@
<div class="sidelist">
<h1><a href="/scrobbles?max=100">Last Scrobbles</a></h1>
<h1><a href="/scrobbles">Last Scrobbles</a></h1>
<span class="stats">Today</span> KEY_SCROBBLE_NUM_TODAY
<span class="stats">This Week</span> KEY_SCROBBLE_NUM_WEEK
<span class="stats">This Month</span> KEY_SCROBBLE_NUM_MONTH