Ajout nb modérations
This commit is contained in:
parent
182208a6f8
commit
af2948827d
@ -1520,7 +1520,15 @@ class Event(models.Model):
|
|||||||
nb_manual_import = imported.filter(Q(import_sources__len=0)|Q(nb_rimport=0)).count()
|
nb_manual_import = imported.filter(Q(import_sources__len=0)|Q(nb_rimport=0)).count()
|
||||||
nb_first_import = imported.filter(nb_rimport__gt=0).count()
|
nb_first_import = imported.filter(nb_rimport__gt=0).count()
|
||||||
|
|
||||||
return {"when": (start, start + timedelta(days=when[1] - 1)), "nb_manual_creation": nb_manual_creation, "nb_manual_import": nb_manual_import, "nb_first_import": nb_first_import, "nb_local_copies": nb_local_copies}
|
nb_moderated = Event.objects.filter(moderated_date__gte=start, moderated_date__lt=end).count()
|
||||||
|
|
||||||
|
return {"when": (start, start + timedelta(days=when[1] - 1)),
|
||||||
|
"nb_manual_creation": nb_manual_creation,
|
||||||
|
"nb_manual_import": nb_manual_import,
|
||||||
|
"nb_first_import": nb_first_import,
|
||||||
|
"nb_local_copies": nb_local_copies,
|
||||||
|
"nb_moderated": nb_moderated,
|
||||||
|
}
|
||||||
|
|
||||||
def get_count_modifications(when_list):
|
def get_count_modifications(when_list):
|
||||||
return [Event.get_count_modification(w) for w in when_list]
|
return [Event.get_count_modification(w) for w in when_list]
|
||||||
|
@ -6,20 +6,22 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% if modifications.0.when.0 == modifications.0.when.1 %}Date{% else %}Semaine{% endif %}</th>
|
<th>{% if modifications.0.when.0 == modifications.0.when.1 %}Date{% else %}Semaine{% endif %}</th>
|
||||||
|
<th>Modérations</th>
|
||||||
|
<th>Copies locales</th>
|
||||||
<th>Créations manuelles</th>
|
<th>Créations manuelles</th>
|
||||||
<th>Imports manuels</th>
|
<th>Imports manuels</th>
|
||||||
<th>Imports automatiques</th>
|
<th>Imports automatiques</th>
|
||||||
<th>Créations de copies locales</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for m in modifications %}
|
{% for m in modifications %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ m.when.0|date:'D j b' }}{% if modifications.0.when.0 != modifications.0.when.1 %} - {{ m.when.1|date:'D j b' }}{% endif %}</td>
|
<td>{{ m.when.0|date:'D j b' }}{% if modifications.0.when.0 != modifications.0.when.1 %} - {{ m.when.1|date:'D j b' }}{% endif %}</td>
|
||||||
|
<td>{{ m.nb_moderated }}</td>
|
||||||
|
<td>{{ m.nb_local_copies }}</td>
|
||||||
<td>{{ m.nb_manual_creation }}</td>
|
<td>{{ m.nb_manual_creation }}</td>
|
||||||
<td>{{ m.nb_manual_import }}</td>
|
<td>{{ m.nb_manual_import }}</td>
|
||||||
<td>{{ m.nb_first_import }}</td>
|
<td>{{ m.nb_first_import }}</td>
|
||||||
<td>{{ m.nb_local_copies }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if next %}
|
{% if next %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user