add more info to admin overview
This commit is contained in:
parent
a2904d3ade
commit
de7a2fa034
|
@ -20,5 +20,8 @@
|
|||
<li>
|
||||
<a href="#">{% trans 'Users' %}</a>
|
||||
</li>
|
||||
<li class="{% is_active_app 'admin' %}">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Django' %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
|
@ -15,6 +15,18 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2 col-md-2">
|
||||
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
||||
<h2 class="card-pf-title">
|
||||
<a href="#"><span class="fa fa-shield"></span><span class="card-pf-aggregate-status-count"></span> {% trans 'Providers' %}</a>
|
||||
</h2>
|
||||
<div class="card-pf-body">
|
||||
<p class="card-pf-aggregate-status-notifications">
|
||||
<span class="card-pf-aggregate-status-notification"><a href="#"><span class="pficon pficon-ok"></span>{{ provider_count }}</a></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-2 col-md-2">
|
||||
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
||||
<h2 class="card-pf-title">
|
||||
|
|
|
@ -2,7 +2,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
|||
from django.views.generic import TemplateView
|
||||
|
||||
from passbook.admin.mixins import AdminRequiredMixin
|
||||
from passbook.core.models import Application, Rule, User
|
||||
from passbook.core.models import Application, Rule, User, Provider
|
||||
|
||||
|
||||
class AdministrationOverviewView(AdminRequiredMixin, TemplateView):
|
||||
|
@ -13,4 +13,5 @@ class AdministrationOverviewView(AdminRequiredMixin, TemplateView):
|
|||
kwargs['application_count'] = len(Application.objects.all())
|
||||
kwargs['rule_count'] = len(Rule.objects.all())
|
||||
kwargs['user_count'] = len(User.objects.all())
|
||||
kwargs['provider_count'] = len(Provider.objects.all())
|
||||
return super().get_context_data(**kwargs)
|
||||
|
|
Reference in a new issue