templates/platform/component/molecule/contact_infos.html.twig line 1

Open in your IDE?
  1. {# configuration example
  2. ###########
  3. col: 12
  4. enabled: false
  5. title:
  6. enabled: true
  7. type: h3
  8. class: text-light
  9. content: Hotline
  10. wrapper:
  11. class: ''
  12. class: 'col-md-4 align-self-center mt-3'
  13. name:
  14. enabled: true
  15. class: text-uppercase
  16. override_content: 'Vous avez une question ?'
  17. email:
  18. enabled: true
  19. class: text-light
  20. form_only: true
  21. override_content: ''
  22. phone:
  23. enabled: true
  24. class: text-light
  25. override_content: ''
  26. #}
  27. {% if componentKey is not defined %}
  28. {% set componentKey = "contact_infos" %}
  29. {% endif %}
  30. {% set item_config = generateComponentOptions(value, componentKey) %}
  31. {% if canDisplayComponentByAcl(item_config) %}
  32. <div data-component-acl="{{ componentKey }}" class="{% if item_config.wrapper.class is defined %}{{ item_config.wrapper.class }}{% endif %}">
  33. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.title, atom_key: componentKey ~ '.title'} %}
  34. {% block atom %}
  35. {% include'@component/atom/title.html.twig' with {'title': value} %}
  36. {% endblock atom %}
  37. {% endembed %}
  38. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.name, atom_key: componentKey ~ '.name'} %}
  39. {% block atom %}
  40. <p {% if value.class is defined %}class="{{ value.class }}"{% endif %}>
  41. {% if value.override_content is defined and value.override_content not in [null, ''] %}
  42. {{ value.override_content|trans|raw }}
  43. {% else %}
  44. {{ platform_global('hotline.name') }}
  45. {% endif %}
  46. </p>
  47. {% endblock atom %}
  48. {% endembed %}
  49. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.email, atom_key: componentKey ~ '.email'} %}
  50. {% block atom %}
  51. <div class="{% if value.class is defined %}{{ value.class }}{% endif %}">
  52. {% if value.override_content is defined and value.override_content not in [null, ''] %}
  53. {{ value.override_content|raw }}
  54. {% elseif (platform_global('hotline.contact_form_only') is not same as(false) ) %}
  55. {% if app.user is not same as(null) and app.request.get('_route') is not same as('front_contact_show') %}
  56. <a href="{{ path('front_contact_show') }}" class="{{ value.class }} capitalize-first-word">
  57. {{ 'formulaire de contact'|trans|capitalize }}
  58. </a>
  59. {% elseif app.request.get('_route') in getAclConstantByKey('ACL_SECURITY_ROUTES') %}
  60. {% set email = platform_global('hotline.email.contact') %}
  61. {% if value.enabled and value.override_content not in ['', null] %}
  62. {% set email = value.override_content %}
  63. {% endif %}
  64. <a class="{{ value.class }}" href="mailto:{{ email }}">
  65. {{ email }}
  66. </a>
  67. {% else %}
  68. <p class="{{ value.class }} capitalize-first-word">{{ 'formulaire de contact'|trans }}</p>
  69. {% endif %}
  70. {% if value.phone.enabled is defined and value.phone.enabled is same as(true) %}
  71. <p>
  72. {{ platform_global('hotline.phone.calendar.days')|trans }} <br>
  73. {{ platform_global('hotline.phone.calendar.hours')|trans }}
  74. </p>
  75. {% endif %}
  76. {% else %}
  77. <a class="{{ value.class }}" href="mailto:{{ platform_global('hotline.email.contact') }}">
  78. {{ platform_global('hotline.email.contact') }}
  79. </a>
  80. {% endif %}
  81. </div>
  82. {% endblock atom %}
  83. {% endembed %}
  84. {% if value.end_item is defined %}
  85. {% include '@component/molecule/footer_signature.html.twig' with {'value': value.end_item, componentKey: componentKey ~ '.end_item'} %}
  86. {% endif %}
  87. </div>
  88. {% endif %}