Commit 0c0de21f authored by Samuel GAIST's avatar Samuel GAIST

[statistics] Add support for templateprotocoles

parent 088fe0ce
......@@ -33,6 +33,7 @@
<a class="list-group-item" href="{% if user.is_anonymous %}{% url 'plotters:list' %}{% else %}{% url 'plotters:list' %}{% endif %}" title="Show plotters" data-toggle="tooltip" data-placement="left">Plotters <span class="badge">{{ totals.plotters}}</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>
<a class="list-group-item" href="{% url 'databases:list' %}" title="Show databases" data-toggle="tooltip" data-placement="left">Databases <span class="badge">{{ totals.databases }}</span></a>
<a class="list-group-item" href="{% url 'protocoltemplates:list' %}" title="Show protocol templates" data-toggle="tooltip" data-placement="left">Protocole Templates <span class="badge">{{ totals.protocoltemplates }}</span></a>
<div class="list-group-item">Users <span class="badge">{{ totals.users }}</span></div>
</div>
</div>
......@@ -40,6 +40,7 @@ from ...experiments.models import Experiment
from ...libraries.models import Library
from ...plotters.models import Plotter
from ...plotters.models import PlotterParameter
from ...protocoltemplates.models import ProtocolTemplate
from ...reports.models import Report
from ...search.models import Search
from ...team.models import Team
......@@ -54,6 +55,7 @@ def calculate_totals(user):
return dict(
users=User.objects.count(),
databases=Database.objects.for_user(user, True).count(),
protocoltemplates=ProtocolTemplate.objects.for_user(user, True).count(),
environments=Environment.objects.for_user(user, True).count(),
queues=Queue.objects.count(),
workers=Worker.objects.count(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment