update stats
This commit is contained in:
		@ -13,26 +13,40 @@
 | 
				
			|||||||
                <th>{% trans "Date" %}</th>
 | 
					                <th>{% trans "Date" %}</th>
 | 
				
			||||||
                {# Translators "Header for statistics view" #}
 | 
					                {# Translators "Header for statistics view" #}
 | 
				
			||||||
                <th>{% trans "Diffusion or sound played" %}
 | 
					                <th>{% trans "Diffusion or sound played" %}
 | 
				
			||||||
                <th colspan="100"></th>
 | 
					                <th></th>
 | 
				
			||||||
            </tr>
 | 
					            </tr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            {% for item in stats.items %}
 | 
					            {% for item in stats.items %}
 | 
				
			||||||
            <tr>
 | 
					                <tr class="log">
 | 
				
			||||||
                    <td>{{ item.date|date:"H:i" }}</td>
 | 
					                    <td>{{ item.date|date:"H:i" }}</td>
 | 
				
			||||||
                    {# TODO: logs #}
 | 
					                    {# TODO: logs #}
 | 
				
			||||||
 | 
					                    {% if 'program' in item %}
 | 
				
			||||||
                    <td>{{ item.program.name }}</td>
 | 
					                    <td>{{ item.program.name }}</td>
 | 
				
			||||||
                {% for tag,count in item.tags %}
 | 
					                    {% else %}
 | 
				
			||||||
                <td>{{ tag }}: {{ count }}</td>
 | 
					                    <td>{{ item.comment }}</td>
 | 
				
			||||||
                {% endfor %}
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					                    <td>{% for tag,count in item.tags %}
 | 
				
			||||||
 | 
					                        {{ tag }}: {{ count }};
 | 
				
			||||||
 | 
					                        {% endfor %}</td>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                {% for track in item.tracks %}
 | 
				
			||||||
 | 
					                <tr class="track">
 | 
				
			||||||
 | 
					                    <td></td>
 | 
				
			||||||
 | 
					                    <td>{{ track.artist }} -- <emph>{{ track.title }}</emph> {{ track.version }}</td>
 | 
				
			||||||
 | 
					                    <td>{{ track.tags.all|join:', ' }}</td>
 | 
				
			||||||
 | 
					                </tr>
 | 
				
			||||||
 | 
					                {% endfor %}
 | 
				
			||||||
            {% endfor %}
 | 
					            {% endfor %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <tr>
 | 
					            <tr>
 | 
				
			||||||
                <td>{{ stats.date|date:'d/m/Y' }}</td>
 | 
					                <td>{{ stats.date|date:'d/m/Y' }}</td>
 | 
				
			||||||
                <td>{% trans "Total and average" %} ({{ stats.tracks_count }})</td>
 | 
					                {# TODO: translation block #}
 | 
				
			||||||
                {% for tag, count, average in stats.tags %}
 | 
					                <td>{% trans "Total and average" %} ({{ stats.tracks_count }} tracks)</td>
 | 
				
			||||||
                <td>{{ tag }}: <b>{{ count }} / {{ average|floatformat }}%</b></td>
 | 
					                <td>{% for tag, count, average in stats.tags %}
 | 
				
			||||||
 | 
					                    {{ tag }}: <b>{{ count }} / {{ average|floatformat }}%</b>;
 | 
				
			||||||
                {% endfor %}
 | 
					                {% endfor %}
 | 
				
			||||||
 | 
					                </td>
 | 
				
			||||||
            </tr>
 | 
					            </tr>
 | 
				
			||||||
        </table>
 | 
					        </table>
 | 
				
			||||||
    </section>
 | 
					    </section>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user