diff --git a/src/c3nav/editor/templates/editor/changeset.html b/src/c3nav/editor/templates/editor/changeset.html index ce1c2e4e..2e650afb 100644 --- a/src/c3nav/editor/templates/editor/changeset.html +++ b/src/c3nav/editor/templates/editor/changeset.html @@ -27,24 +27,57 @@ {% blocktrans %}last update at {{ datetime }}{% endblocktrans %} {% endwith %}

+

+ {% if not active and not changeset.closed %} + + {% endif %} + {% if can_edit %} + {% trans 'Edit' %} + {% endif %} +

{% bootstrap_messages %} +{% if changeset.last_state_update and changeset.state != 'unproposed' %} +
+
+

{{ changeset.get_state_display }}

+
+
+ {% if changeset.state == 'proposed' or changeset.state == 'reproposed' %} +

{% blocktrans %}These changes are currently pending review.{% endblocktrans %}

+ {% if changeset.author == request.user %} +

{% blocktrans %}As long as the review is pending you can unpropose them to edit them again.{% endblocktrans %}

+ {% endif %} + {% elif changeset.state == 'review' %} + {% with user=changeset.assigned_to %} + {% url 'editor.users.detail' pk=changeset.assigned_to.pk as user_url %} +

{% blocktrans %}These changes are currently being reviewed by {{ user }}{% endblocktrans %}

+ {% endwith %} + {% elif changeset.state == 'rejected' or changeset.state == 'finallyrejected' %} + {% with user=changeset.last_state_update.user comment=changeset.last_state_update.comment %} + {% url 'editor.users.detail' pk=changeset.last_state_update.user.pk as user_url %} +

{% blocktrans %}Your changes were rejected by {{ user }}:{% endblocktrans %}

+

{% blocktrans %}“{{ comment }}”{% endblocktrans %}

+ {% if changeset.author == request.user %} + {% if changeset.state == 'rejected' %} +

{% blocktrans %}You can now edit your changes and propose them again.{% endblocktrans %}

+ {% else %} +

{% blocktrans %}This rejection is final.{% endblocktrans %}

+ {% endif %} + {% endif %} + {% endwith %} + {% elif changeset.state == 'applied' %} + {% with user=changeset.last_state_update.user %} + {% url 'editor.users.detail' pk=changeset.last_state_update.user.pk as user_url %} +

{% blocktrans %}Your changes were applied by {{ user }}.{% endblocktrans %}

+ {% endwith %} + {% endif %} + {{ changeset.last_state_update.datetime|date:"DATETIME_FORMAT" }} +
+
+{% endif %} {% if changeset.description %}

{{ changeset.description }}

{% endif %} -{% if changeset.author == request.user %} - {% if changeset.proposed and not changeset.applied %} - {% if not changeset.assigned_to %} -

- {% blocktrans %}Your changes are currently waiting for review. As long as no reviewer has been assigned to your changes, you can still unpropose and edit them.{% endblocktrans %} -

- {% else %} -

- {% blocktrans %}Your changes are currently being reviewed.{% endblocktrans %} -

- {% endif %} - {% endif %} -{% endif %} - {% for obj in changed_objects %} @@ -82,23 +115,16 @@ {% endfor %} {% buttons %} - {% if active %} - {% if can_delete %} - - {% endif %} -
- {% if can_edit %} - {% trans 'Edit' %} - {% endif %} - {% if can_edit and not changeset.proposed %} - - {% endif %} - {% if can_unpropose %} - - {% endif %} -
- {% elif not changeset.closed %} - + {% if can_delete %} + {% endif %} +
+ {% if can_edit and not changeset.proposed %} + + {% endif %} + {% if can_unpropose %} + + {% endif %} +
{% endbuttons %}