Fix front page stats
Compare changes
- Samuel GAIST authored
No reason to access the request that many time when the user can be put directly in the context used to render the template
@@ -21,17 +21,17 @@
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'experiments:public-list' %}{% else %}{% url 'experiments:list' request.user.username %}{% endif %}" title="Show experiments" data-toggle="tooltip" data-placement="left">Experiments <span class="badge">{{ totals.experiments }}</span></a>
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'toolchains:public-list' %}{% else %}{% url 'toolchains:list' request.user.username %}{% endif %}" title="Show toolchains" data-toggle="tooltip" data-placement="left">Toolchains <span class="badge">{{ totals.toolchains }}</span></a>
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'algorithms:public-list' %}{% else %}{% url 'algorithms:list' request.user.username %}{% endif %}" title="Show algorithms" data-toggle="tooltip" data-placement="left">Algorithms <span class="badge">{{ totals.algorithms }}</span></a>
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'libraries:public-list' %}{% else %}{% url 'libraries:list' request.user.username %}{% endif %}" title="Show libraries" data-toggle="tooltip" data-placement="left">Libraries <span class="badge">{{ totals.libraries }}</span></a>
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'dataformats:public-list' %}{% else %}{% url 'dataformats:list' request.user.username %}{% endif %}" title="Show dataformats" data-toggle="tooltip" data-placement="left">Dataformats <span class="badge">{{ totals.dataformats }}</span></a>
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'attestations:public-list' %}{% else %}{% url 'attestations:list' request.user.username %}{% endif %}" title="Show attestations" data-toggle="tooltip" data-placement="left">Attestations <span class="badge">{{ totals.attestations }}</span></a>
<a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'plotters:plotterparameter-public-list' %}{% else %}{% url 'plotters:plotterparameter-list' request.user.username %}{% endif %}" title="Show plotters" data-toggle="tooltip" data-placement="left">Plotterparameters <span class="badge">{{ totals.plotterparameters}}</span></a>
<a class="list-group-item" href="{% if user.is_anonymous %}{% url 'attestations:public-list' %}{% else %}{% url 'attestations:list' user.username %}{% endif %}" title="Show attestations" data-toggle="tooltip" data-placement="left">Attestations <span class="badge">{{ totals.attestations }}</span></a>
<a class="list-group-item" href="{% if user.is_anonymous %}{% url 'plotters:plotterparameter-public-list' %}{% else %}{% url 'plotters:plotterparameter-list' user.username %}{% endif %}" title="Show plotters" data-toggle="tooltip" data-placement="left">Plotterparameters <span class="badge">{{ totals.plotterparameters}}</span></a>