From 04009cdf792a74417948d74694f2f9b5e259731c Mon Sep 17 00:00:00 2001 From: Esdras1995 Date: Mon, 12 Oct 2015 13:17:48 -0400 Subject: [PATCH] Delete style added --- base/templatetags/base_extras.py | 14 +++++++++-- smslapli/templates/admin/change_form.html | 2 +- .../templates/admin/delete_confirmation.html | 25 +++++++++++-------- .../admin/delete_selected_confirmation.html | 15 +++++++---- .../templates/admin/includes/fieldset.html | 2 +- smslapli/templates/admin/index.html | 22 +++++++++------- smslapli/templates/admin/logout.html | 13 ---------- static/css/custom.css | 2 +- 8 files changed, 52 insertions(+), 43 deletions(-) delete mode 100644 smslapli/templates/admin/logout.html diff --git a/base/templatetags/base_extras.py b/base/templatetags/base_extras.py index 329d0aa..2a033d4 100644 --- a/base/templatetags/base_extras.py +++ b/base/templatetags/base_extras.py @@ -1,7 +1,8 @@ from base.models import PersonneContact from hydromet.models import Observation +from datetime import * -__author__ = 'alexing' +__author__ = 'esdras' from django import template @@ -11,7 +12,16 @@ register = template.Library() def notification(texte): nmbAgent = PersonneContact.objects.filter(isactif=False).count(); msgNotValidate = Observation.objects.filter(valider = False).count() - listQueryDash = {"nbAgent":str(nmbAgent), "msgNotValidate":str(msgNotValidate)} + + dt = datetime.now() + dateFin = str(dt.year)+'-'+str(dt.month)+'-'+str(dt.day) + dtD=date.today() - timedelta(days=1) + dateDebut = str(dtD.year)+'-'+str(dtD.month)+'-'+str(dtD.day) + + personNotSentMsg = PersonneContact.objects.filter(isactif=True).count()-Observation.objects.filter(dateDebut=dateDebut, dateFin=dateFin).values('observer').distinct().count() + + listQueryDash = {"nbAgent":str(nmbAgent), "msgNotValidate":str(msgNotValidate), "personNotSentMsg":str(personNotSentMsg)} result = listQueryDash[texte] + return result diff --git a/smslapli/templates/admin/change_form.html b/smslapli/templates/admin/change_form.html index d69691e..8f46c5c 100644 --- a/smslapli/templates/admin/change_form.html +++ b/smslapli/templates/admin/change_form.html @@ -67,7 +67,7 @@ {% if to_field %}{% endif %} {% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} {% if errors %} -

+

{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}

{{ adminform.form.non_field_errors }} diff --git a/smslapli/templates/admin/delete_confirmation.html b/smslapli/templates/admin/delete_confirmation.html index 12c1c70..c316f3f 100644 --- a/smslapli/templates/admin/delete_confirmation.html +++ b/smslapli/templates/admin/delete_confirmation.html @@ -3,20 +3,21 @@ {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %} {% block content1 %} - + {% block breadcrumbs %} -