{% set paths_base = "../.." %}
{% set bodyClasses = "single single-tender" %}
{% set post = post_type.tenders.items[currentPost] %}
{% extends "base.twig" %}
{% block breadcrumbs %}
{% set breadcrumbs_block =
{
"post_type": "tenders",
"show_terms": false,
"current_id": currentPost,
"classes": "breadcrumbs--spacing-2"
}
%}
{% include '../blocks/breadcrumbs.twig' with {'block': breadcrumbs_block } %}
{% endblock %}
{% block content %}
<div class="grid-container">
<div>
<div class="tender-date">
{% if post.status.class == 'expired' or post.status.class == 'archived' or post.status.class == 'completed' or post.status.class == 'closed' %}Scaduto{% endif %}
{% if post.date is iterable %}
<div>
<span>Prorogato al {{post.date[1]|date('d.m.Y, H:s')}}</span>
<span>Scadenza {{post.date[0]|date('d.m.Y, H:s')}}</span>
</div>
{% else %}
<span>{% if post.status.class == 'open' or post.status.class == 'closed' %}Scadenza{% endif %} {{post.date|date('d.m.Y, H:s')}}</span>
{% endif %}
</div>
<div class="spacing-5">
<span class="status status--{{post.status.class}}"><span></span>{{post.status.label}}</span>
</div>
<div class="block-container block-grid-list spacing-5">
<div class="block-grid-list__inner">
{% for id in post.terms|slice(0,1) %}
{% set parent = id[0] %}
{% set terms = id[1] %}
{% set taxonomy = taxonomies.tenders.terms[parent] %}
<div>
<p>{{taxonomy.name}}</p>
<p>
{% for term in terms %}
{% set term = taxonomies.tenders.terms[parent].items[term] %}
<span>{{term.name}}</span>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
</div>
{% endfor %}
<div>
<p>Posti disponibili</p>
<p>{{post.seats}}</p>
</div>
{% for id in post.terms|slice(1) %}
{% set parent = id[0] %}
{% set terms = id[1] %}
{% set taxonomy = taxonomies.tenders.terms[parent] %}
<div>
<p>{{taxonomy.name}}</p>
<p>
{% for term in terms %}
{% set term = taxonomies.tenders.terms[parent].items[term] %}
<span>{{term.name}}</span>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
</div>
{% endfor %}
{% for item in post.info %}
<div>
<p>{{item.label}}</p>
<p>{{item.text}}</p>
</div>
{% endfor %}
</div>
</div>
{% if post.content %}
<div class="block-paragraph block-paragraph--1col">
{{post.content}}
</div>
{% endif %}
{% if post.logos %}
<div class="block-container">
<p><strong>Partnership</strong></p>
<div class="tender-logos">
{% for logo in post.logos %}
{% if logo.url %}
<a href="{{logo.url}}" target="_blank">
{% else %}
<div>
{% endif %}
{% include "../layout/partials/picture.twig" with {"image": logo } %}
{% if logo.url %}
</a>
{% else %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
<div class="block-composition">
{% if post.files_list %}
{% set tender_files = {
"key": "files-list",
"classes": "",
"content": {
"label": "Materiali",
"items": post.files_list
}
} %}
{% include '../blocks/files-list.twig' with {'block': tender_files } %}
{% endif %}
{% if post.result %}
{% set tender_result = {
"key": "files-list",
"classes": "",
"content": {
"label": "Esito",
"items": post.result
}
} %}
{% include '../blocks/files-list.twig' with {'block': tender_result } %}
{% endif %}
</div>
{% if post.status.class != 'expired' and post.status.class != 'completed' and post.status.class != 'archived' and post.status.class != 'closed' %}
<div>
{% set tender_application_cta = {
"key": "link",
"url": "https://www.google.com",
"classes": "",
"links_size": null,
"content": {
"name": "Compila la domanda",
"external_name": "Pica"
}
} %}
{% include '../blocks/link.twig' with {'block': tender_application_cta } %}
</div>
{% endif %}
</div>
</div>
{% endblock %}