mirror of
https://github.com/GFDRR/sms-lapli.git
synced 2026-10-26 17:35:19 +00:00
Delete style added
This commit is contained in:
1 parent
9e67cf12bd
commit
04009cdf79
8 files changed
+52
-43
No files matched your search
@@ -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
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
|
||||
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
|
||||
{% if errors %}
|
||||
<p class="errornote">
|
||||
<p class="errornote alert alert-danger">
|
||||
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||
</p>
|
||||
{{ adminform.form.non_field_errors }}
|
||||
|
||||
@@ -3,20 +3,21 @@
|
||||
|
||||
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %}
|
||||
{% block content1 %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<a href="#" class="alert-link">...</a>
|
||||
</div>
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
{% comment %}
|
||||
<!-- <div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
||||
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst|escape }}</a>
|
||||
› <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
|
||||
› {% trans 'Delete' %}
|
||||
</div>
|
||||
</div> -->
|
||||
{% endcomment %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-danger" style="margin-top: 100px;">
|
||||
{% if perms_lacking %}
|
||||
<p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
|
||||
<ul>
|
||||
@@ -32,19 +33,21 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>{% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
|
||||
<p> <span class="glyphicon glyphicon-exclamation-sign"></span> {% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
|
||||
{% include "admin/includes/object_delete_summary.html" %}
|
||||
<h2>{% trans "Objects" %}</h2>
|
||||
<ul>{{ deleted_objects|unordered_list }}</ul>
|
||||
<br>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<div>
|
||||
<input type="hidden" name="post" value="yes" />
|
||||
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
|
||||
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
|
||||
<input type="submit" value="{% trans "Yes, I'm sure" %}" />
|
||||
<a href="#" onclick="window.history.back(); return false;" class="button cancel-link">{% trans "No, take me back" %}</a>
|
||||
<input type="hidden" name="post" value="yes" />
|
||||
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1" />{% endif %}
|
||||
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" />{% endif %}
|
||||
<input type="submit" value="{% trans "Yes, I'm sure" %}" class="btn btn-danger" />
|
||||
<a href="#" onclick="window.history.back(); return false;" class="cancel-link btn-sm btn-primary">{% trans "No, take me back" %}</a><!-- celle ci avait la class button jai retire -->
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -4,15 +4,18 @@
|
||||
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation{% endblock %}
|
||||
{% block content1 %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
{% comment %}
|
||||
<!-- <div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
||||
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
|
||||
› {% trans 'Delete multiple objects' %}
|
||||
</div>
|
||||
</div> -->
|
||||
{% endcomment %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-danger" style="margin-top: 100px;">
|
||||
{% if perms_lacking %}
|
||||
<p>{% blocktrans %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
|
||||
<ul>
|
||||
@@ -28,12 +31,13 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>{% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}</p>
|
||||
<p><span class="glyphicon glyphicon-exclamation-sign"></span> {% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}</p>
|
||||
{% include "admin/includes/object_delete_summary.html" %}
|
||||
<h2>{% trans "Objects" %}</h2>
|
||||
{% for deletable_object in deletable_objects %}
|
||||
<ul>{{ deletable_object|unordered_list }}</ul>
|
||||
{% endfor %}
|
||||
<br>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<div>
|
||||
{% for obj in queryset %}
|
||||
@@ -41,10 +45,11 @@
|
||||
{% endfor %}
|
||||
<input type="hidden" name="action" value="delete_selected" />
|
||||
<input type="hidden" name="post" value="yes" />
|
||||
<input type="submit" value="{% trans "Yes, I'm sure" %}" />
|
||||
<a href="#" onclick="window.history.back(); return false;" class="button cancel-link">{% trans "No, take me back" %}</a>
|
||||
<input type="submit" value="{% trans "Yes, I'm sure" %}" class="btn btn-danger" />
|
||||
<a href="#" onclick="window.history.back(); return false;" class="btn-sm btn-primary cancel-link">{% trans "No, take me back" %}</a><!-- celle ci avait une class button -->
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -5,7 +5,7 @@
|
||||
{% endif %}
|
||||
{% for line in fieldset %}
|
||||
<div class="form-row{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
|
||||
{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
|
||||
<div {% if line.errors %} class="alert alert-danger" {% endif %}>{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}</div>
|
||||
{% for field in line %}
|
||||
<div class ="fieldset-group" {% if not line.fields|length_is:'1' %} class="field-box{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}>
|
||||
{% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
<script>
|
||||
NProgress.start();
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.tile-stats h3{
|
||||
font-size: 1.2em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../assets/js/ie8-responsive-file-warning.js"></script>
|
||||
@@ -287,17 +292,16 @@
|
||||
|
||||
</div> -->
|
||||
<!-- /top tiles -->
|
||||
|
||||
<div class="row top_tiles">
|
||||
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="tile-stats">
|
||||
<div class="icon" >
|
||||
<i class="fa fa-user"></i>
|
||||
<i class="fa fa-users"></i>
|
||||
<!-- <img src="images/pluie.jpeg"/> -->
|
||||
</div>
|
||||
<div class="count">{{ "nbAgent"|notification }}</div>
|
||||
|
||||
<h3> Agent inactif</h3>
|
||||
<h3>{% if "nbAgent"|notification < '2' %} Agent inactif {% else %} Agents inactifs {% endif %}</h3>
|
||||
<p>Observateur</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -310,17 +314,17 @@
|
||||
<h3>Message non valide</h3>
|
||||
<p>Observation pluviometrique</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
</div><!-- personNotSentMsg -->
|
||||
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="tile-stats">
|
||||
<div class="icon"><i class="fa fa-sort-amount-desc"></i>
|
||||
</div>
|
||||
<div class="count">179</div>
|
||||
<div class="count">{{ "personNotSentMsg"|notification }}</div>
|
||||
|
||||
<h3>New Sign ups</h3>
|
||||
<p>Lorem ipsum psdea itgum rixt.</p>
|
||||
<h3>{% if "personNotSentMsg"|notification < '2' %}Agent n'a pas envoye{% else %} Agents n'ont pas envoyes{% endif %}</h3>
|
||||
<p>Observation pluviometrique</p>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}Logged out{% endblock %}
|
||||
|
||||
{% block content_header %}Logged out{% endblock %}
|
||||
|
||||
{% block main_content %}
|
||||
<p>You've been logged out</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Thanks Thanks Thanks Thanks for stopping by; when you come back, don't forget to <a href="/accounts/login/">log in</a> again.</p>
|
||||
{% endblock %}
|
||||
@@ -3955,7 +3955,7 @@ html > body > .ui-pnotify {
|
||||
border-color: rgba(243, 156, 18, 0.88);
|
||||
}
|
||||
|
||||
.alert-danger,
|
||||
/* J'ai envele alert-danger ici..*/
|
||||
.alert-error {
|
||||
color: #E9EDEF;
|
||||
background-color: rgba(231, 76, 60, 0.88);
|
||||
|
||||
Reference in new issue
Block a user