diff --git a/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig b/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig index f9924eb11..515685b9e 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig @@ -1,5 +1,5 @@ {{ form_start(form) }} -
+
{% if form.vars.has_search_box %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue index de24c6fbf..65656b749 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeThirdParty.vue @@ -19,13 +19,13 @@
- + {{ $t('thirdparty.child')}} - + {{ $t('thirdparty.company')}} - + {{ $t('thirdparty.contact')}} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/chill/chillthirdparty.scss b/src/Bundle/ChillThirdPartyBundle/Resources/public/chill/chillthirdparty.scss index 9762a898a..70c2bfccf 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/chill/chillthirdparty.scss +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/chill/chillthirdparty.scss @@ -10,7 +10,20 @@ background-color: $chill-blue; } &.bg-thirdparty-contact { - //@extedn .bg-secondary; + //@extend .bg-secondary; background-color: $secondary; } } + +/// +div.thirdparty-list { + div.flex-table { + div.item-bloc { + div.item-row { + div.item-col:first-child { + flex-basis: 25%; + } + } + } + } +} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 1504bdfb9..301007e75 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -12,13 +12,13 @@ {{ thirdparty.text }} - + {{ $t('thirdparty.child')}} - + {{ $t('thirdparty.company')}} - + {{ $t('thirdparty.contact')}} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index 5b605c748..0b4c1ca41 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -24,7 +24,7 @@
@@ -32,7 +32,7 @@
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 755d4f2eb..0e6f3da35 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -82,7 +82,9 @@
{{ _self.label(thirdparty, options) }} - {{ ('thirdparty.' ~ thirdparty.kind)|trans }} + {% if thirdparty.kind %} + {{ ('thirdparty.' ~ thirdparty.kind)|trans }} + {% endif %}
{% if options['isConfidential'] %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig index 72e20fa87..cb9c4bcf5 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig @@ -6,6 +6,26 @@ {% block content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} + + {% macro rowCustomButtons(tp) %} + {% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %} +
  • + +
  • + {% endif %} + {% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %} +
  • + +
  • + {% endif %} + {% endmacro %} + {% block index_header %}

    {{ 'List of third parties'|trans }}

    {% endblock %} @@ -13,37 +33,25 @@ {% block table_entities %}
    -
    - + -
    - {% for tp in third_parties %} -
    - {{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true, 'isConfidential': (tp.contactDataAnonymous ? true : false) }) }} -
    -
      - {% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %} -
    • - -
    • - {% endif %} - {% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %} -
    • - -
    • - {% endif %} -
    - -
    -
    - {% endfor %} -
    +
    + {% for tp in third_parties %} +
    + {{ tp|chill_entity_render_box({ + 'render': 'bloc', + 'showContacts': true, + 'addLink': true, + 'customButtons': { 'replace': _self.rowCustomButtons(tp) }, + 'isConfidential': (tp.contactDataAnonymous ? true : false) + }) }} +
    + {% endfor %}
    +
    {% endblock %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index 6b6395b19..06c5e1391 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -12,10 +12,10 @@ {% block crud_content_header %}

    {{ title_ }} - - {{ (thirdParty.active ? 'Active' : 'Inactive')|trans }} - + {{ (thirdParty.active ? 'Active' : 'Inactive')|trans }} +

    {% endblock %}