Update year history (remove year in plot lines)

This commit is contained in:
Edgar P. Burkhart 2024-01-03 15:20:45 +01:00
parent b478286f47
commit b3c9642adc
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -25,7 +25,13 @@
{% if date.sum_m or date.sum_p %} {% if date.sum_m or date.sum_p %}
<tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}> <tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}>
<td class="icon">{% up_down_icon date.sum %}</td> <td class="icon">{% up_down_icon date.sum %}</td>
<th class="date" scope="row">{% month_url date.month %}</th> <th class="date" scope="row">
{% if year %}
{% month_url date.month fmt="F" %}
{% else %}
{% month_url date.month %}
{% endif %}
</th>
<td class="value">{{ date.sum_m|pmrvalue }}</td> <td class="value">{{ date.sum_m|pmrvalue }}</td>
<td class="bar m">{% plot_bar date.sum date.sum_m history.max.pm %}</td> <td class="bar m">{% plot_bar date.sum date.sum_m history.max.pm %}</td>
<td class="bar p">{% plot_bar date.sum date.sum_p history.max.pm %}</td> <td class="bar p">{% plot_bar date.sum date.sum_p history.max.pm %}</td>
@ -45,7 +51,9 @@
<table class="full-width"> <table class="full-width">
<thead> <thead>
<tr> <tr>
{% if not year %}
<th scope="col">{% translate "Year" %}</th> <th scope="col">{% translate "Year" %}</th>
{% endif %}
{% calendar_head %} {% calendar_head %}
</tr> </tr>
</thead> </thead>
@ -53,7 +61,9 @@
{% regroup history.data by month.year as years_list %} {% regroup history.data by month.year as years_list %}
{% for y, year in years_list reversed %} {% for y, year in years_list reversed %}
<tr> <tr>
{% if not year %}
<th class="date" scope="row">{% year_url y %}</th> <th class="date" scope="row">{% year_url y %}</th>
{% endif %}
{% for m in year %} {% for m in year %}
{% if forloop.parentloop.last and forloop.first %} {% if forloop.parentloop.last and forloop.first %}
{% empty_calendar_cells_start m.month.month %} {% empty_calendar_cells_start m.month.month %}