From e89a6058031da1a29ba38625bf3d81aa5992facd Mon Sep 17 00:00:00 2001 From: Rayvented Date: Thu, 14 Dec 2023 14:53:35 +0100 Subject: [PATCH 1/2] Style dsfa edit --- src/Controller/VvtController.php | 2 + templates/vvt/__dsfaHistory.html.twig | 14 ++-- templates/vvt/edit.html.twig | 1 - templates/vvt/editDsfa.html.twig | 101 +++++--------------------- 4 files changed, 30 insertions(+), 88 deletions(-) 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..c700eb8b 100644 --- a/templates/vvt/editDsfa.html.twig +++ b/templates/vvt/editDsfa.html.twig @@ -1,92 +1,31 @@ {% 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 From c09830f0371673e226e0018bc35d2a03347bef26 Mon Sep 17 00:00:00 2001 From: Rayvented Date: Thu, 14 Dec 2023 14:55:00 +0100 Subject: [PATCH 2/2] Style dsfa edit --- templates/vvt/editDsfa.html.twig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/vvt/editDsfa.html.twig b/templates/vvt/editDsfa.html.twig index c700eb8b..368b2461 100644 --- a/templates/vvt/editDsfa.html.twig +++ b/templates/vvt/editDsfa.html.twig @@ -11,13 +11,15 @@ {% block body %} {{ form_start(form) }} - {{ 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.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 }}