parent
ea5372cae5
commit
a3e13429eb
@ -41,6 +41,20 @@
|
|||||||
|
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
|
<div class="slide-buttons">
|
||||||
|
{% with event.get_local_version as local %}
|
||||||
|
{% if local %}
|
||||||
|
{% if event != local %}
|
||||||
|
<input type="submit" value="Enregistrer et éditer la version locale" name="save_and_edit_local">
|
||||||
|
{% else %}
|
||||||
|
<input type="submit" value="Enregistrer et éditer" name="save_and_edit">
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<input type="submit" value="Enregistrer et créer une version locale" name="save_and_create_local">
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2>Modification des méta-informations</h2>
|
<h2>Modification des méta-informations</h2>
|
||||||
{% if event.moderated_date %}
|
{% if event.moderated_date %}
|
||||||
<p class="message info">Cet événement a déjà été modéré par le {{ event.moderated_date }}.
|
<p class="message info">Cet événement a déjà été modéré par le {{ event.moderated_date }}.
|
||||||
@ -60,6 +74,17 @@
|
|||||||
<a href="{% if request.META.HTTP_REFERER %}{{ request.META.HTTP_REFERER }}{% else %}{{ object.get_absolute_url }}{% endif %}" role="button" class="secondary">Annuler</a>
|
<a href="{% if request.META.HTTP_REFERER %}{{ request.META.HTTP_REFERER }}{% else %}{{ object.get_absolute_url }}{% endif %}" role="button" class="secondary">Annuler</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input type="submit" value="Enregistrer" name="save">
|
<input type="submit" value="Enregistrer" name="save">
|
||||||
|
{% with event.get_local_version as local %}
|
||||||
|
{% if local %}
|
||||||
|
{% if local == event %}
|
||||||
|
<input type="submit" value="Enregistrer et éditer la version locale" name="save_and_edit_local">
|
||||||
|
{% else %}
|
||||||
|
<input type="submit" value="Enregistrer et éditer" name="save_and_edit">
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<input type="submit" value="Enregistrer et créer une version locale" name="save_and_create_local">
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
<input type="submit" value="Enregistrer et passer au suivant 🠆" name="save_and_next">
|
<input type="submit" value="Enregistrer et passer au suivant 🠆" name="save_and_next">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -412,6 +412,12 @@ class EventModerateView(
|
|||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
if 'save_and_next' in self.request.POST:
|
if 'save_and_next' in self.request.POST:
|
||||||
return reverse_lazy("moderate_event_next", args=[self.object.pk])
|
return reverse_lazy("moderate_event_next", args=[self.object.pk])
|
||||||
|
elif 'save_and_create_local' in self.request.POST:
|
||||||
|
return reverse_lazy("clone_edit", args=[self.object.pk])
|
||||||
|
elif 'save_and_edit' in self.request.POST:
|
||||||
|
return reverse_lazy("edit_event", args=[self.object.pk])
|
||||||
|
elif 'save_and_edit_local' in self.request.POST:
|
||||||
|
return reverse_lazy("edit_event", args=[self.object.get_local_version().pk])
|
||||||
else:
|
else:
|
||||||
return self.object.get_absolute_url()
|
return self.object.get_absolute_url()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user