Update weeklypull.html

BUG: (#2003) Changing weeks does not reset the table's page number; added "hidden" config option reset_pullist_pagination to disable functionality.
This commit is contained in:
barbequesauce 2018-07-17 13:45:11 -04:00 committed by evilhero
parent 796bfed2e5
commit ae4def3a87
1 changed files with 21 additions and 5 deletions

View File

@ -28,16 +28,32 @@
</br></br> </br></br>
<table width="100%" align="center"> <table width="100%" align="center">
<tr> <tr>
<td style="vertical-align: middle; text-align: right"><a href="pullist?week=${weekinfo['prev_weeknumber']}&year=${weekinfo['prev_year']}" title="Previous Week (${weekinfo['prev_weeknumber']})"><img src="interfaces/default/images/prev.gif" width="16" height="18" Alt="Previous"/></td> <td style="vertical-align: middle; text-align: right">
%if mylar.CONFIG.RESET_PULLIST_PAGINATION is True:
<a href="pullist?week=${weekinfo['prev_weeknumber']}&year=${weekinfo['prev_year']}" title="Previous Week (${weekinfo['prev_weeknumber']})" onclick="$('#pull_table').page('first').draw('page');">
%else:
<a href="pullist?week=${weekinfo['prev_weeknumber']}&year=${weekinfo['prev_year']}" title="PPrevious Week (${weekinfo['prev_weeknumber']})">
%endif
<img src="interfaces/default/images/prev.gif" width="16" height="18" Alt="Previous"/>
</a>
</td>
<td style="vertical-align: middle; text-align: center"> <td style="vertical-align: middle; text-align: center">
%if wantedcount == 0: %if wantedcount == 0:
<h1><center>Weekly Pull list for week ${weekinfo['weeknumber']} :</br>${weekinfo['startweek']} - ${weekinfo['endweek']}</center></h1> <h1><center>Weekly Pull list for week ${weekinfo['weeknumber']} :</br>${weekinfo['startweek']} - ${weekinfo['endweek']}</center></h1>
%else: %else:
<h1><center>Weekly Pull list for week ${weekinfo['weeknumber']} :</br>${weekinfo['startweek']} - ${weekinfo['endweek']} (${wantedcount})</center></h1> <h1><center>Weekly Pull list for week ${weekinfo['weeknumber']} :</br>${weekinfo['startweek']} - ${weekinfo['endweek']} (${wantedcount})</center></h1>
%endif %endif
</td><td style="vertical-align: middle; text-align: left"> </td>
<a href="pullist?week=${weekinfo['next_weeknumber']}&year=${weekinfo['next_year']}" title="Next Week (${weekinfo['next_weeknumber']})"><img src="interfaces/default/images/next.gif" width="16" height="18" Alt="Next"/></a></td> <td style="vertical-align: middle; text-align: left">
<tr> %if mylar.CONFIG.RESET_PULLIST_PAGINATION is True:
<a href="pullist?week=${weekinfo['next_weeknumber']}&year=${weekinfo['next_year']}" title="Next Week (${weekinfo['next_weeknumber']})" onclick="$('#pull_table').page('first').draw('page');">
%else:
<a href="pullist?week=${weekinfo['next_weeknumber']}&year=${weekinfo['next_year']}" title="NNext Week (${weekinfo['next_weeknumber']})">
%endif
<img src="interfaces/default/images/next.gif" width="16" height="18" Alt="Next"/>
</a>
</td>
</tr>
</table> </table>
</div> </div>