Commit 903751d3 authored by Georges Gressot's avatar Georges Gressot 💬
Browse files

Facilité pour l'administrateur de la base

parent 38fdba22
...@@ -122,7 +122,10 @@ ...@@ -122,7 +122,10 @@
</table> </table>
{% if higher_status == 6 %}
<center><button><b><a href="/reinit/{{ sid }}/{{ lid }}">{% trans "Réinitialiser la fiche" %}</a></b></button></center>
<center>({% trans "Réservé" %})</center>
{% endif %}
<!-- ######################### --> <!-- ######################### -->
......
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
</head>
<div id="sticky-section">
<nav id="sticky-menu">
<a href="/">{% trans "Accueil" %}</a>
<a href="/dashboard">{% trans "Supervision" %}</a>
<a href="/search">{% trans "Recherche (bêta)" %}</a>
<a target="_blank" href="{% static 'doc/User_Documentation.pdf' %}">{% trans "Manuel de l'utilisateur" %}</a>
<a target="_blank" href="/about">{% trans "A propos" %}</a>
</nav>
{% if k != 0 %}
<p style="text-align:right;"><b><font color= #017a04 >@ </font></b>{{ k }} (<a href="/./disconnect">{% trans "Déconnexion" %}</a>)</p>
{% else %}
<!-- <b><font color= #ff0004 >(User : Anonymous)</font></b> -->
<!-- (User : Anonymous) -->
{% endif %}
</div>
<body>
<h2>{% trans "Réinitialisation d'une fiche erronée" %}</h2>
<div id="content">
<p><b>{% trans "Ressource concernée" %} :</b> {{ ressource.title }} (<b>identifiant :</b> {{ sid }})</p>
<form method="post">{% csrf_token %}
<p>{% trans "Je souhaite réinitialer la fiche" %} : {{ form.flag }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><font color= #017a04 >{{ info }}</font></b></p>
<p>{% trans "En confirmant, vous allez réinitialiser la fiche au début de la phase sur laquelle l'erreur a été constatée" %}.</p>
<p><input type="submit" value="{% trans "Confirmer" %}"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <button><a href="/current_status/{{ sid }}/{{ lid }}">{% trans "Annuler" %}</a></button></p>
</form>
<p>{% trans "Après validation ou annulation, vous serez redirigé vers la fiche de statut courant qui vous permettra de vérifier la prise en compte de votre choix" %}.</p>
</div>
<div id="credits">
<p>Conservation et valorisation des collections · Service des bibliothèques de l'Université de Strasbourg · <a target="_blank" href="/about">{% trans "A propos" %}</a> . <a target="_blank" href="https://groupes.renater.fr/sympa/info/eplouribousse-newsletter">{% trans "Me tenir au courant" %}</a> · <a target="_blank" href="https://groupes.renater.fr/sympa/info/eplouribousse">{% trans "Forum des utilisateurs" %}</a> · <a target="_blank" href="https://bugs.launchpad.net/eplouribousse">{% trans "Suivi des bugs" %}</a>{% if webmaster != "" %} · <a target="_blank" href="/webmaster">{% trans "Administrateur du site" %}</a>{% endif %}</p>
<p>eplouribousse utilise des données sous <a target="_blank" href="http://www.abes.fr/Media/Fichiers/Footer/Presentation-de-l-ABES/licence-Etalab-francais">licence etalab</a> fournies par l'<a target="_blank" href="https://abes.fr/l-abes/presentation/">Abes</a>.</p><p>Version : {{ version }}</p>
</div>
</body>
</html>
...@@ -152,6 +152,15 @@ ...@@ -152,6 +152,15 @@
<!-- ######################### --> <!-- ######################### -->
{% if n > 1 %} {% if n > 1 %}
{% if higher_status == 6 %}
<center><button><b><a href="/reinit/{{ sid }}/{{ lid }}">{% trans "Réinitialiser la fiche" %}</a></b></button></center>
<center>({% trans "Réservé" %})</center>
{% endif %}
<table border="1"> <table border="1">
<thead> <thead>
......
...@@ -14,6 +14,7 @@ urlpatterns = [ ...@@ -14,6 +14,7 @@ urlpatterns = [
path('timeout/<str:sid>/<str:lid>', views.notintime, name='not in time'), path('timeout/<str:sid>/<str:lid>', views.notintime, name='not in time'),
path('dashboard', views.indicators, name='indicators'), path('dashboard', views.indicators, name='indicators'),
path('search', views.search, name='searching a serial'), path('search', views.search, name='searching a serial'),
path('reinit/<str:sid>/<str:lid>', views.reinit, name='reinitialisation'),
path('rk/<str:sid>/<str:lid>', views.takerank, name='ranking'), path('rk/<str:sid>/<str:lid>', views.takerank, name='ranking'),
......
epl_version ="v1.18.0 (Gomatrude)" epl_version ="v1.18.0 (Gomatrude)"
date_version ="February 01, 2021" date_version ="February 01, 2021"
# Mise au niveau de : # Mise au niveau de :
epl_version ="v1.19-beta.0 (~Nantechilde )" # epl_version ="v1.19-beta.0 (~Nantechilde )"
date_version ="February 01, 2021" # date_version ="February 01, 2021"
from django.shortcuts import render from django.shortcuts import render
...@@ -665,6 +665,60 @@ def search(request): ...@@ -665,6 +665,60 @@ def search(request):
return render(request, 'epl/search.html', locals()) return render(request, 'epl/search.html', locals())
@login_required
def reinit(request, sid, lid):
k = logstatus(request)
version =epl_version
webmaster =wbmstr
info =""
ressource =ItemRecord.objects.get(sid =sid, rank =1)
umail, uname = request.user.email, request.user.username
flag =0
for u in BddAdmin.objects.all():
if (u.contact, u.name) ==(umail, uname):
flag =1
if flag ==1:
y = Flag()
form = CheckForm(request.POST or None, instance =y)
if form.is_valid():
if y.flag:
if Instruction.objects.filter(sid =sid, bound =" "):
for instr in Instruction.objects.filter(sid =sid).exclude(bound ="x"):
instr.delete()
for item in ItemRecord.objects.filter(sid =sid):
if item.rank ==1:
item.status =3
item.save()
else:
item.status =2
item.save()
return current_status(request, sid, lid)
else:
for instr in Instruction.objects.filter(sid =sid):
instr.delete()
for item in ItemRecord.objects.filter(sid =sid):
if item.rank ==1:
item.status =1
item.save()
else:
item.status =0
item.save()
return current_status(request, sid, lid)
else:
info =_("Vous n'avez pas coché !")
else:
return notintime(request, sid, lid)
return render(request, 'epl/reinit.html', locals())
@login_required @login_required
def takerank(request, sid, lid): def takerank(request, sid, lid):
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment