Amélioration rendu
This commit is contained in:
parent
743b393366
commit
936f6c1b6b
@ -20,12 +20,14 @@
|
|||||||
|
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<div class="slide-buttons">
|
|
||||||
<a href="{% url 'activite' %}" role="button">Voir l'historique {% picto_from_name "chevron-right" %}</a>
|
|
||||||
</div>
|
|
||||||
<h2>Activité des derniers jours</h2>
|
<h2>Activité des derniers jours</h2>
|
||||||
</header>
|
</header>
|
||||||
{% include "agenda_culturel/recent-activity-inc.html" with modifications=daily_modifications %}
|
<h3>Résumé des activités</h3>
|
||||||
|
{% include "agenda_culturel/recent-activity-inc.html" with modifications=daily_modifications next=1 %}
|
||||||
|
|
||||||
|
<h3>Derniers imports</h3>
|
||||||
|
{% include "agenda_culturel/batch-imports-inc.html" with objects=batch_imports next=1 %}
|
||||||
|
|
||||||
<p>Détail des imports récurrents :
|
<p>Détail des imports récurrents :
|
||||||
{% include "agenda_culturel/rimports-info-inc.html" with all=1 %}</p>
|
{% include "agenda_culturel/rimports-info-inc.html" with all=1 %}</p>
|
||||||
|
|
||||||
|
@ -16,13 +16,19 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for obj in paginator_filter %}
|
{% for obj in objects %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ obj.id }}</td>
|
<td>{{ obj.id }}</td>
|
||||||
<td>{{ obj.created_date }}</td>
|
<td>{{ obj.created_date }}</td>
|
||||||
<td>{% if obj.recurrentImport %}<a href="{{ obj.recurrentImport.get_absolute_url }}">{{ obj.recurrentImport.name }}</a>{% else %}
|
<td>{% if obj.recurrentImport %}<a href="{{ obj.recurrentImport.get_absolute_url }}">{{ obj.recurrentImport.name }}</a>{% else %}
|
||||||
{% if obj.url_source %}
|
{% if obj.url_source %}
|
||||||
<a href="{{ obj.url_source }}"><em>url</em></a>
|
<a href="{{ obj.url_source }}">
|
||||||
|
{% if "facebook" in obj.url_source %}
|
||||||
|
<em>lien facebook</em>
|
||||||
|
{% else %}
|
||||||
|
<em>url</em>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %} </td>
|
{% endif %} </td>
|
||||||
<td><span{% if obj.status == "failed" %} data-tooltip="{{ obj.error_message }}"{% endif %}>{{ obj.status }}</span></td>
|
<td><span{% if obj.status == "failed" %} data-tooltip="{{ obj.error_message }}"{% endif %}>{{ obj.status }}</span></td>
|
||||||
@ -33,10 +39,18 @@
|
|||||||
<td>{% if obj.status == "success" %}{{ obj.nb_removed }}{% endif %}</td>
|
<td>{% if obj.status == "success" %}{{ obj.nb_removed }}{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if next %}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}"></a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'imports' %}">...</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<footer>
|
|
||||||
<span>
|
|
||||||
{% include 'agenda_culturel/paginator.html' %}
|
|
||||||
</span>
|
|
||||||
</footer>
|
|
@ -23,7 +23,13 @@
|
|||||||
<h1>Importations par lot</h1>
|
<h1>Importations par lot</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{% include "agenda_culturel/batch-imports-inc.html" with paginator_filter=paginator_filter %}
|
{% include "agenda_culturel/batch-imports-inc.html" with objects=paginator_filter %}
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<span>
|
||||||
|
{% include 'agenda_culturel/paginator.html' %}
|
||||||
|
</span>
|
||||||
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{% include "agenda_culturel/side-nav.html" with current="imports" %}
|
{% include "agenda_culturel/side-nav.html" with current="imports" %}
|
||||||
|
@ -52,8 +52,13 @@
|
|||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{% include "agenda_culturel/batch-imports-inc.html" with paginator_filter=paginator_filter %}
|
{% include "agenda_culturel/batch-imports-inc.html" with objects=paginator_filter %}
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<span>
|
||||||
|
{% include 'agenda_culturel/paginator.html' %}
|
||||||
|
</span>
|
||||||
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +21,15 @@
|
|||||||
<td>{{ m.nb_local_copies }}</td>
|
<td>{{ m.nb_local_copies }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if next %}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{% url 'activite' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'activite' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'activite' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'activite' %}">...</a></td>
|
||||||
|
<td><a href="{% url 'activite' %}">...</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1044,7 +1044,10 @@ def administration(request):
|
|||||||
daily_modifications = Event.get_count_modifications([(d, 1) for d in days])
|
daily_modifications = Event.get_count_modifications([(d, 1) for d in days])
|
||||||
|
|
||||||
# get last created events
|
# get last created events
|
||||||
events = queryset=Event.objects.all().order_by("-created_date")[:10]
|
events = Event.objects.all().order_by("-created_date")[:5]
|
||||||
|
|
||||||
|
# get last batch imports
|
||||||
|
batch_imports = BatchImportation.objects.all().order_by("-created_date")[:5]
|
||||||
|
|
||||||
# get info about batch information
|
# get info about batch information
|
||||||
newest = BatchImportation.objects.filter(recurrentImport=OuterRef("pk")).order_by(
|
newest = BatchImportation.objects.filter(recurrentImport=OuterRef("pk")).order_by(
|
||||||
@ -1068,8 +1071,10 @@ def administration(request):
|
|||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
"agenda_culturel/administration.html",
|
"agenda_culturel/administration.html",
|
||||||
{"daily_modifications": daily_modifications, "events": events, "nb_failed": nb_failed, "nb_canceled": nb_canceled,
|
{"daily_modifications": daily_modifications,
|
||||||
"nb_running": nb_running, "nb_all": nb_all},
|
"events": events, "batch_imports": batch_imports,
|
||||||
|
"nb_failed": nb_failed, "nb_canceled": nb_canceled,
|
||||||
|
"nb_running": nb_running, "nb_all": nb_all},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -1309,7 +1314,7 @@ def event_search_full(request):
|
|||||||
@login_required(login_url="/accounts/login/")
|
@login_required(login_url="/accounts/login/")
|
||||||
@permission_required("agenda_culturel.view_batchimportation")
|
@permission_required("agenda_culturel.view_batchimportation")
|
||||||
def imports(request):
|
def imports(request):
|
||||||
paginator = Paginator(BatchImportation.objects.all().order_by("-created_date"), 10)
|
paginator = Paginator(BatchImportation.objects.all().order_by("-created_date"), 30)
|
||||||
page = request.GET.get("page")
|
page = request.GET.get("page")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user