From a13766e7d744074ba236a9c3af8f55cbe9392a76 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 25 Mar 2021 09:46:20 +0100 Subject: [PATCH] wip.. --- .../views/Event/listByPerson.html.twig | 108 +++++++++++------- .../public/modules/bootstrap/_custom.scss | 4 + 2 files changed, 71 insertions(+), 41 deletions(-) diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig index 2cd19d08a..cdd06b3be 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/listByPerson.html.twig @@ -24,7 +24,7 @@ {% block personcontent %}

{{ 'Events participation' |trans }}

- +
@@ -44,53 +44,58 @@ @@ -103,12 +108,33 @@ {{ chill_pagination(paginator) }} {% endif %} -
- {{ form_start(form_add_event_participation_by_person) }} - {{ form_widget(form_add_event_participation_by_person.event_id, { 'attr' : { 'style' : 'width: 25em; display:inline-block; ' } } ) }} - {{ form_widget(form_add_event_participation_by_person.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }} - {{ form_rest(form_add_event_participation_by_person) }} - {{ form_end(form_add_event_participation_by_person) }} +{% form_theme form_add_event_participation_by_person 'bootstrap_4_layout.html.twig' %} + +
+{{ form_start(form_add_event_participation_by_person) }} + {# + + #} + {{ form_widget(form_add_event_participation_by_person.event_id, { 'attr' : { 'class' : 'form-control' } } ) }} +
+ {# + + #} + {{ form_widget(form_add_event_participation_by_person.submit, { 'attr' : { 'class' : 'btn btn-success' } } ) }} +
+{{ form_rest(form_add_event_participation_by_person) }} +{{ form_end(form_add_event_participation_by_person) }} +
+ +{# +{{ form(form_add_event_participation_by_person) }} +#} + +
+ +
+ +
{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/_custom.scss b/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/_custom.scss index 24a73e933..c0f2cb840 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/_custom.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/modules/bootstrap/_custom.scss @@ -53,6 +53,10 @@ form { } } } + label.required:after { + content: " *"; + color: $red; + } } .sticky-form-buttons {
{{ 'Date'|trans }}{{ participation.role.name|localize_translatable_string }} {{ participation.status.name|localize_translatable_string }} -
    -
  • +
      - {% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %} - {% set returnLabel = 'Back to %person% events'|trans({ '%person%' : currentPerson } ) %} + {% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %} + {% set returnLabel = 'Back to %person% events'|trans({ '%person%' : currentPerson } ) %} - {% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %} - - {% endif %} + {% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %} +
    • + +
    • + {% endif %} - {% if is_granted('CHILL_EVENT_UPDATE', participation.event) - and is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} + {% if is_granted('CHILL_EVENT_UPDATE', participation.event) + and is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} -
      - -
      +
    • + - {% else %} - - {% if is_granted('CHILL_EVENT_UPDATE', participation.event) %} + class="btn btn-warning btn-sm"> {{ 'Edit the event'|trans }} - {% endif %} - {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} + class="btn btn-warning btn-sm"> {{ 'Edit the participation'|trans }} - {% endif %} - - {% endif %} +
    • +
      + {% else %} + +
    • + {% if is_granted('CHILL_EVENT_UPDATE', participation.event) %} + + {{ 'Edit the event'|trans }} + + {% endif %} + {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} + + {{ 'Edit the participation'|trans }} + + {% endif %} +
    • + + {% endif %} + +