Skip to content

Commit

Permalink
feat(JobOffer): Add basic front
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Gutbub committed Oct 7, 2024
1 parent 74249cf commit f42a527
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Type/UiElement/JobOfferUiElementType.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
],
'choices' => [
'monsieurbiz_ui_elements.ui_element.job_offer_ui_element.choices.display.synthesis' => self::DISPLAY_SYNTHESIS,
'monsieurbiz_ui_elements.ui_element.job_offer_ui_element.fields.display.complete' => self::DISPLAY_COMPLETE,
'monsieurbiz_ui_elements.ui_element.job_offer_ui_element.choices.display.complete' => self::DISPLAY_COMPLETE,
],
])
->add('title', TextType::class, [
Expand Down
18 changes: 18 additions & 0 deletions src/Resources/views/Shop/UiElement/job_offer_ui_element.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,21 @@ element fields:
- content
- url
#}
<div class="ui segment">
{% if element.display == constant('MonsieurBiz\\SyliusUiElementsPlugin\\Form\\Type\\UiElement\\JobOfferUiElementType::DISPLAY_SYNTHESIS') %}
<a href="{{ element.url|default('') }}">
<h2>{{ element.title|default('') }}</h2>
<div><i class="icon edit outline"></i>{{ element.contract|default('') }}</div>
<div><i class="icon map marker alternate"></i>{{ element.localisation|default('') }}</div>
</a>
{% elseif element.display == constant('MonsieurBiz\\SyliusUiElementsPlugin\\Form\\Type\\UiElement\\JobOfferUiElementType::DISPLAY_COMPLETE') %}
<div>
<h2>{{ element.title|default('') }}</h2>
<div><i class="icon edit outline"></i>{{ element.contract|default('') }}</div>
<div><i class="icon map marker alternate"></i>{{ element.localisation|default('') }}</div>
<div class="content">
{{ element.content|default('')|raw }}
</div>
</div>
{% endif %}
</div>

0 comments on commit f42a527

Please sign in to comment.