diff --git a/src/Controller/VvtController.php b/src/Controller/VvtController.php index 40be42fd..69c9bc47 100644 --- a/src/Controller/VvtController.php +++ b/src/Controller/VvtController.php @@ -282,6 +282,8 @@ public function editVvt( } } + $this->setBackButton($this->generateUrl('vvt_edit', ['id' => $vvt->getId()])); + return $this->render('vvt/edit.html.twig', [ 'form' => $form->createView(), 'assignForm' => $assign->createView(), diff --git a/templates/vvt/__dsfaHistory.html.twig b/templates/vvt/__dsfaHistory.html.twig index a18096dc..8c6f463e 100644 --- a/templates/vvt/__dsfaHistory.html.twig +++ b/templates/vvt/__dsfaHistory.html.twig @@ -1,9 +1,11 @@ {% trans_default_domain 'vvt' %} - - {{ p.createdAt|date('d.m.Y h:m') }} -- id: {{ p.id }} -- {% trans from 'general' %}createdBy{% endtrans %}: {{ p.user.email }} - {% if not p.dsb %} --{% trans %}dsbReviewMissing{% endtrans %}{% endif %} - {% if not p.ergebnis %} -- {% trans %}resultMissing{% endtrans %}{% endif %} - +
  • + + {{ p.createdAt|date('d.m.Y h:m') }} -- id: {{ p.id }} -- {% trans from 'general' %}createdBy{% endtrans %}: {{ p.user.email }} + {% if not p.dsb %} --{% trans %}dsbReviewMissing{% endtrans %}{% endif %} + {% if not p.ergebnis %} -- {% trans %}resultMissing{% endtrans %}{% endif %} + +
  • {% if p.previous %} {{ include('vvt/__dsfaHistory.html.twig', {'p':p.previous}) }} -{% endif %} +{% endif %} \ No newline at end of file diff --git a/templates/vvt/edit.html.twig b/templates/vvt/edit.html.twig index e5e7487c..0e9b0dcd 100644 --- a/templates/vvt/edit.html.twig +++ b/templates/vvt/edit.html.twig @@ -44,7 +44,6 @@ {{ include('vvt/__form.html.twig') }}

    {% trans from 'general' %}createdBy{% endtrans %}: {{ vvt.user.email }}

    {% if vvt.previous %} -

    {% trans from 'general' %}history{% endtrans %}

      {{ include('vvt/__history.html.twig', {'p':vvt.previous}) }} diff --git a/templates/vvt/editDsfa.html.twig b/templates/vvt/editDsfa.html.twig index d479919a..368b2461 100644 --- a/templates/vvt/editDsfa.html.twig +++ b/templates/vvt/editDsfa.html.twig @@ -1,92 +1,33 @@ {% extends 'base.html.twig' %} {% trans_default_domain 'vvt' %} -{% block body %} -
      -
      -

      {{ title }} {% trans from 'general' %}to{% endtrans%} {{ dsfa.vvt.name }}

      - {% trans %}processing.back{% endtrans %} -
      -
      - {% if assignForm is defined %}{{ include('assign/__assign.html.twig',{'data':dsfa,'path':'assign_dsfa'}) }}{% endif %} -
      -
      +{% block title %} + {{ title }} {% trans from 'general' %}to{% endtrans %} {{ dsfa.vvt.name }} +{% endblock %} +{% block CTA %} + {% if assignForm is defined %}{{ include('assign/__assign.html.twig',{'data':dsfa,'path':'assign_dsfa'}) }}{% endif %} +{% endblock %} + +{% block body %} {{ form_start(form) }} -
      -
      -
      - {{ form_label(form.beschreibung) }} - {{ form_help(form.beschreibung) }} -
      -
      - {{ form_widget(form.beschreibung) }} -
      -
      -
      -
      - {{ form_label(form.notwendigkeit) }} - {{ form_help(form.notwendigkeit) }} -
      -
      - {{ form_widget(form.notwendigkeit) }} -
      -
      -
      -
      - {{ form_label(form.risiko) }} - {{ form_help(form.risiko) }} -
      -
      - {{ form_widget(form.risiko) }} -
      -
      -
      -
      - {{ form_label(form.abhilfe) }} - {{ form_help(form.abhilfe) }} -
      -
      - {{ form_widget(form.abhilfe) }} -
      -
      -
      -
      - {{ form_label(form.standpunkt) }} -
      -
      - {{ form_widget(form.standpunkt) }} -
      -
      -
      -
      - {{ form_label(form.dsb) }} -
      -
      - {{ form_widget(form.dsb) }} -
      -
      -
      -
      - {{ form_label(form.ergebnis) }} -
      -
      - {{ form_widget(form.ergebnis) }} -
      -
      - {{ form_widget(form.save) }} -
      +
      + {{ form_row(form.beschreibung) }} + {{ form_row(form.notwendigkeit) }} + {{ form_row(form.risiko) }} + {{ form_row(form.abhilfe) }} + {{ form_row(form.standpunkt) }} + {{ form_row(form.dsb) }} + {{ form_row(form.ergebnis) }} +
      + {{ form_row(form.save, {row_attr: {class: 'form-buttons'}}) }} {{ form_end(form) }}

      {% trans from 'general' %}createdBy{% endtrans %}: {{ dsfa.user.email }}

      {% if dsfa.previous %} -
      -

      {% trans from 'general' %}history{% endtrans %}

      +

      {% trans from 'general' %}history{% endtrans %}

      +
        {{ include('vvt/__dsfaHistory.html.twig', {'p':dsfa.previous}) }} -
      +
    {% endif %} - -{% endblock %} - -{% block javascript %} -{% endblock %} +{% endblock %} \ No newline at end of file