Skip to content

Commit

Permalink
refactor(jobOffer): refacto templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Gutbub committed Oct 7, 2024
1 parent 70ae885 commit 3793c27
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 31 deletions.
36 changes: 18 additions & 18 deletions src/Resources/views/Admin/UiElement/job_offer_ui_element.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ element fields:
#}
<div class="ui segment">
{% if element.display == constant('MonsieurBiz\\SyliusUiElementsPlugin\\Form\\Type\\UiElement\\JobOfferUiElementType::DISPLAY_SYNTHESIS') %}
<div>
<a href="{{ element.url|default('#') }}" target="_blank" rel="noopener noreferrer">
{% if element.title|default('') is not empty %}
<h2>{{ element.title }}</h2>
{% endif %}
{% if element.contract|default('') is not empty %}
<div><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}
{% if element.url|default('') is not empty %}
<a href="{{ element.url }}">{{ element.url }}</a>
{% endif %}
</div>
<div class="ui stackable grid">
{% if element.contract|default('') is not empty %}
<div class="column"><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div class="column"><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}
</div>
</a>
{% elseif element.display == constant('MonsieurBiz\\SyliusUiElementsPlugin\\Form\\Type\\UiElement\\JobOfferUiElementType::DISPLAY_COMPLETE') %}
<div>
{% if element.title|default('') is not empty %}
<h2>{{ element.title }}</h2>
{% endif %}
{% if element.contract|default('') is not empty %}
<div><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}

<div class="ui stackable grid">
{% if element.contract|default('') is not empty %}
<div class="column"><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div class="column"><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}
</div>
{% if element.content|default('') %}
<div class="content">
{{ element.content|raw }}
Expand Down
29 changes: 16 additions & 13 deletions src/Resources/views/Shop/UiElement/job_offer_ui_element.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,28 @@ element fields:
{% if element.title|default('') is not empty %}
<h2>{{ element.title }}</h2>
{% endif %}
{% if element.contract|default('') is not empty %}
<div><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}
<div class="ui stackable grid">
{% if element.contract|default('') is not empty %}
<div class="column"><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div class="column"><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}
</div>
</a>
{% elseif element.display == constant('MonsieurBiz\\SyliusUiElementsPlugin\\Form\\Type\\UiElement\\JobOfferUiElementType::DISPLAY_COMPLETE') %}
<div>
{% if element.title|default('') is not empty %}
<h2>{{ element.title }}</h2>
{% endif %}
{% if element.contract|default('') is not empty %}
<div><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}

<div class="ui stackable grid">
{% if element.contract|default('') is not empty %}
<div class="column"><i class="icon edit outline"></i>{{ element.contract }}</div>
{% endif %}
{% if element.localisation|default('') is not empty %}
<div class="column"><i class="icon map marker alternate"></i>{{ element.localisation }}</div>
{% endif %}
</div>
{% if element.content|default('') %}
<div class="content">
{{ element.content|raw }}
Expand Down

0 comments on commit 3793c27

Please sign in to comment.