diff --git a/openslides/application/templates/application/view.html b/openslides/application/templates/application/view.html index d3ab52fa6..879636c65 100644 --- a/openslides/application/templates/application/view.html +++ b/openslides/application/templates/application/view.html @@ -229,9 +229,10 @@ {% if application.versions|length > 1 %}

{% trans "Version History" %}:

- +
- + + @@ -240,7 +241,7 @@ {% for revision in application.versions %} - +
#{% trans "Version" %} {% trans "Time" %} {% trans "Title" %} {% trans "Text" %}
{{ revision.aid }} + {% if application.status != "pub" %} {% if revision == application.permitted %} @@ -257,6 +258,7 @@ {% endif %} {% endif %} {{ revision.aid }} {{ revision.time }} {% ifchanged %} diff --git a/openslides/application/views.py b/openslides/application/views.py index b0f9f1961..24f689a56 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -362,7 +362,6 @@ def view_poll(request, poll_id): def permit_version(request, aversion_id): aversion = AVersion.objects.get(pk=aversion_id) application = aversion.application - if request.method == 'POST': application.accept_version(aversion) messages.success(request, _("Version %s accepted.") % (aversion.aid)) @@ -374,10 +373,13 @@ def permit_version(request, aversion_id): @permission_required('application.can_manage_application') def reject_version(request, aversion_id): aversion = AVersion.objects.get(pk=aversion_id) - application = aversion.application - if application.reject_version(aversion): - messages.success(request, _("Version rejected") ) + application = aversion.application + if request.method == 'POST': + if application.reject_version(aversion): + messages.success(request, _("Version %s rejected.") % (aversion.aid)) + else: + messages.error(request, _("ERROR by rejecting the version.") ) else: - messages.error(request, _("ERROR by rejecting the Version") ) + gen_confirm_form(request, _('Do you really want to reject version %s?') % aversion.aid, reverse('application_version_reject', args=[aversion.id])) return redirect(reverse('application_view', args=[application.id]))