{% extends 'foundation/front/front.html.twig' %}
{% block body_class %}{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "{{ url('app_home') }}",
"name": "{{ 'home'|trans }}"
}
},
{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "{{ url('app_accomplishments_all') }}",
"name": "{{ 'achievements'|trans }}"
}
}
{% if accomplishment.subCategories is defined and accomplishment.subCategories is not empty %}
{% for subCategory in accomplishment.subCategories %}
{% if subCategory.id == subcategoryId %}
{% if subCategory.category is defined and subCategory.category is not null %}
{% if subCategory.category.i18ns is defined and subCategory.category.i18ns|length > 0 %}
{% set firstI18nCategoryJson = subCategory.category.i18ns|first %}
{% set localeCodeCategoryJson = firstI18nCategoryJson.locale|split('_')|first %}
{% set i18nCategoryJson = (app.request.locale == localeCodeCategoryJson) ? firstI18nCategoryJson : (subCategory.category.i18ns[1] is defined ? subCategory.category.i18ns[1] : null) %}
{% if i18nCategoryJson %}
,{
"@type": "ListItem",
"position": 3,
"item": {
"@id": "{{ url('app_accomplishments_all') }}",
"name": "{{ i18nCategoryJson.name }}"
}
}
{% endif %}
{% endif %}
{% endif %}
{% if subCategory.i18ns is defined and subCategory.i18ns|length > 0 %}
{% set firstI18nSubCategoryJson = subCategory.i18ns|first %}
{% set localeCodeSubCategoryJson = firstI18nSubCategoryJson.locale|split('_')|first %}
{% set i18nSubCategoryJson = (app.request.locale == localeCodeSubCategoryJson) ? firstI18nSubCategoryJson : (subCategory.i18ns[1] is defined ? subCategory.i18ns[1] : null) %}
{% if i18nSubCategoryJson %}
,{
"@type": "ListItem",
"position": 4,
"item": {
"@id": "{{ url('app_accomplishments_sub_category_list',{'id':subCategory.id,'slug':i18nSubCategoryJson.slug}) }}",
"name": "{{ i18nSubCategoryJson.name }}"
}
}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if accomplishment.i18ns is defined and accomplishment.i18ns|length > 0 %}
{% set firstI18nAccomplishmentJson = accomplishment.i18ns|first %}
,{
"@type": "ListItem",
"position": {% if accomplishment.subCategories is defined and accomplishment.subCategories is not empty %}5{% else %}3{% endif %},
"item": {
"@id": "{{ app.request.uri }}",
"name": "{{ firstI18nAccomplishmentJson.name|striptags }}"
}
}
{% endif %}
]
}
</script>
{% endblock %}
{% block front %}
<main class="m_site-main m_position-relative">
<!-- Breadcrumbs Section -->
<div class="m_breadcumbs">
<div class="m_container-lg">
<ul class="m_nav-breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="{{ path('app_home') }}">
<i class="fa fa-home"></i>
<meta itemprop="name" content="{{ 'home'|trans }}">
</a>
<meta itemprop="position" content="1">
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="{{ path('app_accomplishments_all') }}">
{{ 'achievements'|trans }}
<meta itemprop="name" content="{{ 'achievements'|trans }}">
</a>
<meta itemprop="position" content="2">
</li>
{% if accomplishment.subCategories is defined and accomplishment.subCategories is not empty %}
{% for subCategory in accomplishment.subCategories %}
{% if subCategory.id == subcategoryId %}
{% if subCategory.category is defined and subCategory.category is not null %}
{% if subCategory.category.i18ns is defined and subCategory.category.i18ns|length > 0 %}
{% set firstI18nCategory = subCategory.category.i18ns|first %}
{% set localeCodeCategory = firstI18nCategory.locale|split('_')|first %}
{% set i18nCategory = (app.request.locale == localeCodeCategory) ? firstI18nCategory : (subCategory.category.i18ns[1] is defined ? subCategory.category.i18ns[1] : null) %}
{% if i18nCategory %}
<li itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a itemprop="item"
href="{{ path('app_accomplishments_all') ~ '?tab=m_cat-' ~ subCategory.category.id }}">
<span>{{ i18nCategory.name }}</span>
<meta itemprop="name" content="{{ i18nCategory.name }}">
</a>
<meta itemprop="position" content="3">
</li>
<li itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
{% if subCategory.i18ns is defined and subCategory.i18ns|length > 0 %}
{% set firstI18nSubCategory = subCategory.i18ns|first %}
{% set localeCodeSubCategory = firstI18nSubCategory.locale|split('_')|first %}
{% set i18nSubCategory = (app.request.locale == localeCodeSubCategory) ? firstI18nSubCategory : (subCategory.i18ns[1] is defined ? subCategory.i18ns[1] : null) %}
{% if i18nSubCategory %}
<a itemprop="item"
href="{{ path('app_accomplishments_sub_category_list',{'id':subCategory.id,'slug':i18nSubCategory.slug}) }}">
<span itemprop="name">{{ i18nSubCategory.name }}</span>
</a>
<meta itemprop="position" content="4">
{% endif %}
{% endif %}
</li>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
{% set localeCode = accomplishment.i18ns[0].locale|split('_')|first %}
{% set firstI18nAccomplishment = ( app.request.locale == localeCode and localeCode is defined) ? accomplishment.i18ns[0] : (accomplishment.i18ns[1] is defined ? accomplishment.i18ns[1] : null) %}
{% if firstI18nAccomplishment %}
<span itemprop="name">{{ firstI18nAccomplishment.name|striptags|u.truncate(50, '...') }}</span>
<meta itemprop="position"
content="{% if accomplishment.subCategories is defined and accomplishment.subCategories is not empty %}5{% else %}3{% endif %}">
{% endif %}
</li>
</ul>
</div>
</div>
<!-- Banner Section -->
<section class="m_section-banner-slide m_section-page">
<div class="m_banner-slides">
{% if accomplishment.attachments is defined and accomplishment.attachments|length > 0 %}
{% for elt in accomplishment.attachments %}
<div class="m_banner-slide"
style="background-image: url({{ path('proxy_avatar', {'path': elt.filename}) }});"></div>
{% endfor %}
{% else %}
<div class="m_banner-slide"
style="background-image: url('{{ asset('images/banner_acc.png') }}');height: 55vh;">
</div>
{% endif %}
</div>
<div class="m_section-banner-container">
{% if accomplishment.subCategories is defined and accomplishment.subCategories is not empty %}
{% for subCategory in accomplishment.subCategories %}
{% if subCategory.id == subcategoryId %}
{% if subCategory.category is defined and subCategory.category is not null %}
{% if subCategory.category.i18ns is defined and subCategory.category.i18ns|length > 0 %}
{% set firstI18nCategory = subCategory.category.i18ns|first %}
{% set localeCodeCategory = firstI18nCategory.locale|split('_')|first %}
{% set i18nCategory = (app.request.locale == localeCodeCategory) ? firstI18nCategory : (subCategory.category.i18ns[1] is defined ? subCategory.category.i18ns[1] : null) %}
{% if i18nCategory %}
<div class="m_container-lg">
<div class="m_section-banner-desc m_text-center">
<h1><span class="m_category-name">{{ i18nCategory.name }}</span>
{% if subCategory.i18ns is defined and subCategory.i18ns|length > 0 %}
{% set firstI18nSubCategory = subCategory.i18ns|first %}
{% set localeCodeSubCategory = firstI18nSubCategory.locale|split('_')|first %}
{% set i18nSubCategory = (app.request.locale == localeCodeSubCategory) ? firstI18nSubCategory : (subCategory.i18ns[1] is defined ? subCategory.i18ns[1] : null) %}
{% if i18nSubCategory %}
<span>{{ i18nSubCategory.name }}</span>
{% endif %}
{% endif %}
</h1>
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</div>
</section>
<!-- Mission Section -->
<section class="m_section-page m_section-mission">
<div class="m_container-lg">
<div class="m_section-page-content">
<div class="m_flex">
{% set localeCode = accomplishment.i18ns[0].locale|split('_')|first %}
{% set firstI18nAccomplishment = ( app.request.locale == localeCode and localeCode is defined) ? accomplishment.i18ns[0] : (accomplishment.i18ns[1] is defined ? accomplishment.i18ns[1] : null) %}
{% if firstI18nAccomplishment %}
<div class="m_section-page-text">
<div class="m_resume-text">
<h2>{{ 'mission.title'|trans }}</h2>
<p>{{ firstI18nAccomplishment.name }}</p>
</div>
<h2>{{ 'detail'|trans }}</h2>
<p>{{ firstI18nAccomplishment.description|raw }}</p>
</div>
{% endif %}
<div class="m_section-page-details">
<div class="m_widget-details">
<h2>{{ 'project'|trans }}</h2>
<div class="m_widget-attribute">
<span class="m_widget-name"> Client</span>
<span class="m_widget-value">{{ accomplishment.client }}</span>
</div>
<div class="m_widget-attribute">
<span class="m_widget-name">{{ 'country'|trans }}</span>
{% if accomplishment.country is defined and accomplishment.country is not null and accomplishment.country.i18ns|length > 0 %}
{% set firstI18n = accomplishment.country.i18ns|first %}
<span class="m_widget-value">{{ firstI18n.name }}</span>
{% endif %}
</div>
<div class="m_widget-attribute">
<span class="m_widget-name">{{ 'financial.backer'|trans }}</span>
<span class="m_widget-value">{{ accomplishment.fundProvider }}</span>
</div>
{% if accomplishment.contractAmount.value > 0 and accomplishment.showContractAmount == true %}
<div class="m_widget-attribute">
<span class="m_widget-name">{{ 'contract.amount'|trans }}</span>
<span class="m_widget-value">{{ accomplishment.contractAmount.value |number_to_words(app.request.locale) }} ( {{ symbol }})</span>
</div>
{% endif %}
</div>
<div class="m_widget-details">
<h2>EXPERTISE</h2>
{% if item is defined and item is not null %}
<div class="m_widget-attribute">
<span class="m_widget-name">{{ 'sector'|trans }}</span>
{% set localeCode = item.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and item.i18ns[0] is defined) ? item.i18ns[0] : (item.i18ns[1] is defined ? item.i18ns[1] : null) %}
{% set elt = (app.request.locale == localeCode and category.i18ns[0] is defined) ? category.i18ns[0] : (category.i18ns[1] is defined ? category.i18ns[1] : null) %}
{% if i18n and elt %}
<span class="m_widget-value">{{ elt.name }}--{{ i18n.name }}</span>
{% endif %}
</div>
{% endif %}
{% if accomplishment.domain is defined and accomplishment.domain.i18ns is not empty %}
<div class="m_widget-attribute">
<span class="m_widget-name">{{ 'area.of.expertise'|trans }}</span>
{% set localeCode = accomplishment.domain.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and accomplishment.domain.i18ns[0] is defined) ? accomplishment.domain.i18ns[0] : (accomplishment.domain.i18ns[1] is defined ? accomplishment.domain.i18ns[1] : null) %}
{% if i18n %}
<span class="m_widget-value">{{ i18n.name }}</span>
{% endif %}
</div>
{% endif %}
{% if accomplishment.missionDuration is defined %}
<div class="m_widget-attribute">
<span class="m_widget-name">{{ 'mission.duration'|trans }}</span>
<span class="m_widget-value">{{ accomplishment.missionDuration }} {{ 'month'|trans }}</span>
</div>
{% endif %}
</div>
</div>
</div>
<!-- Slides Section -->
<div class="m_slides">
{% if accomplishment.attachments is defined and accomplishment.attachments|length > 0 %}
{% for elt in accomplishment.attachments %}
<div class="m_item-slide">
<img alt="" src="{{ path('proxy_avatar', {'path': elt.filename}) }}"/>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</section>
<section class="m_section-page m_section-related-posts">
<div class="m_container-lg">
<h2 class="m_text-center">{{ 'achievements.category'|trans }}</h2>
<div class="m_listing-posts m_flex row">
{% if accomplishments is defined and accomplishments is not empty %}
{% for elt in accomplishments %}
{% if accomplishment is defined and elt.id != accomplishment.id %}
{% if elt.i18ns is defined and elt.i18ns is not empty %}
{% set locale = elt.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == locale and elt.i18ns[0] is defined)
? elt.i18ns[0]
: (elt.i18ns[1] is defined ? elt.i18ns[1] : null) %}
{% if i18n %}
<article class="m_item-post">
<div class="m_item-post-container m_position-relative">
<div class="m_item-post-thumb">
{% if elt.attachments is defined and elt.attachments|length > 0 and elt.attachments[0].filename is defined %}
<img alt=""
src="{{ path('proxy_avatar', {'path': elt.attachments[0].filename}) }}"/>
{% else %}
<img alt="" src="{{ asset('images/defaults/media.png') }}"/>
{% endif %}
</div>
<div class="m_item-post-content">
<h3>{{ i18n.name|striptags|u.truncate(70, '...') }}</h3>
<div class="m_item-post-excerpt">
<p>
{{ i18n.description|striptags|u.truncate(80, '...')|raw }}
</p>
</div>
<a href="{{ path('app_accomplishments_detail',{'id':elt.id,'slug':i18n.slug,'subCategoryId':subcategoryId}) }}"
class="m_link-blue-underline">{{ 'detail'|trans }}</a>
</div>
<a class="m_link-overlay"
href="{{ path('app_accomplishments_detail',{'id':elt.id,'slug':i18n.slug,'subCategoryId':subcategoryId}) }}"></a>
</div>
</article>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
</section>
</main>
{% endblock %}