{% extends 'layouts/layout.html.twig' %}
{% block content %}
{% do pimcore_head_title().set(rdresource.title) %}
{% do pimcore_head_title('CESSDA Resource Directory') %}
{% do pimcore_head_title().setSeparator(' - ') %}
<main class="pullc">
<div class="container-xl directory">
<div class="row">
<div class="col-lg-3 leftpull section-pillar d-none d-lg-block" {% if pillar_background %} style="background-image: url({{ pillar_background.thumbnail('pillar') }})" {% endif %}>
<div class="section-title px-3 px-lg-3 ps-lg-0 d-flex flex-column">
<h1 class="mb-lg-5 pt-1 pe-lg-4 mt-5 text-lg-end">Resource Directory
</h1>
</div>
<div class="d-flex justify-content-end">
<ul class="sidenav list-unstyled justify-content-end align-self-end">
{% if qs is defined and qs != "" %}
<li>
<a href="/Resource-Directory?{{ qs }}">Back to search results</a>
</li>
{% endif %}
<li>
<a href="/Resource-Directory">New search</a>
</li>
</ul>
</div>
</div>
<div class="col-lg-9 ps-lg-5 pe-lg-5 pb-4">
{% if showBreadcrumbs %}
{% set mainNavStartNode = document.getProperty('navigation_root') %}
{% if mainNavStartNode is empty %}
{% set mainNavStartNode = pimcore_document(1) %}
{% endif %}
{% set breadbrumbs = pimcore_build_nav({
active: document,
root: mainNavStartNode
}) %}
{% do app_navigation_enrich_breadcrumbs(breadbrumbs) %}
{% do pimcore_nav_renderer('breadcrumbs').setMinDepth(null) %}
<div class="breadcrumbs mt-3">
<a href="/">Home</a>
/
<a href="/Tools">Tools</a>
/
<a href="/Resource-Directory">CESSDA Resource Directory</a>
/
Resource ID: crd-{{ rdresource.id }}
</div>
{% endif %}
<div id="main-content" class="main-content resource-detail rd">
<div class="col-12 my-3">
<h1>{{ rdresource.title }}</h1>
</div>
<div class="row gx-3">
<div class="col-12 col-lg-6">
<div class="rd-card">
<div class="rd-card-header">
Base data
</div>
<div class="rd-col-header">
CESSDA ID
</div>
<div class="rd-col">
crdr-{{ rdresource.id }}
</div>
{% if rdresource.publish_date %}
<div class="rd-col-header">
Date of publication
</div>
<div class="rd-col">
{% if rdresource.year_only %}
{{ rdresource.publish_date | date('Y') }}
{% else %}
{{ rdresource.publish_date | date('Y-m-d') }}
{% endif %}
</div>
{% endif %}
{% if rdresource.registered_date %}
<div class="rd-col-header">
Date added
</div>
<div class="rd-col">
{{ rdresource.registered_date | date('Y-m-d') }}
</div>
{% endif %}
{% if rdresource.modificationDate %}
<div class="rd-col-header">
Last modified
</div>
<div class="rd-col">
{{ rdresource.modificationDate | date('Y-m-d')}}
</div>
{% endif %}
{% if rdresource.resource_type %}
<div class="rd-col-header">
Resource type
</div>
<div class="rd-col">
{{ rdresource.resource_type }}
</div>
{% endif %}
</div>
</div>
<div class="col-12 col-lg-6">
<div class="rd-card links">
<div class="rd-card-header">
Links
</div>
{% if rdresource.contact_email %}
<div class="rd-col-header">
Contact email
</div>
<div class="rd-col">
<a href="mailto:{{ rdresource.contact_email }}">{{ rdresource.contact_email }}</a>
</div>
{% endif %}
{% if rdresource.doi %}
<div class="rd-col-header">
<abbr title="Digital Object identifier">DOI</abbr>
</div>
<div class="rd-col">
<a href="https://doi.org/{{ rdresource.doi }}" target="_blank">{{ rdresource.doi }}</a>
</div>
{% endif %}
{% if rdresource.landing_url %}
<div class="rd-col-header">
Information page
</div>
<div class="rd-col">
<a href="{{ rdresource.landing_url }}" target="_blank">Visit</a>
</div>
{% endif %}
{% if rdresource.direct_url %}
<div class="rd-col-header">
Direct URL
</div>
<div class="rd-col">
<a href="{{ rdresource.direct_url }}" target="_blank">View/download</a>
</div>
{% endif %}
</div>
</div>
</div>
<div class="row">
<div class="col-12">
{% if rdresource.description %}
<div class="rd-card">
<div class="rd-card-header">
Description
</div>
<div class="rd-body">
{{ rdresource.description }}
</div>
</div>
{% endif %}
{% if tags %}
<div class="rd-card">
<div class="rd-card-header">
Keyword tags
</div>
<div class="rd-body">
{% for tag in tags %}
<span class="badge rounded-pill bg-blue-050 text-dark">
<a href="/Resource-Directory?rtag={{ tag.id }}">{{ tag.name }}</a>
</span>
{% endfor %}
</div>
</div>
{% endif %}
{% if rdresource.author %}
<div class="rd-card">
<div class="rd-card-header">
Author(s)
</div>
<div class="rd-body">
{{ rdresource.author|split(';')|join(' / ') }}
</div>
</div>
{% endif %}
{% if rdresource.contributors or rdresource.other_contributors %}
<div class="rd-card">
<div class="rd-card-header">
Contributors
</div>
<div class="rd-body">
{% for contributor in rdresource.contributors %}
{{ contributorOptions[contributor] }}<br>
{% endfor %}
{% if rdresource.other_contributors %}
{# rdresource.other_contributors|split(';')|join('<br>')|raw }#}
Other
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.project or rdresource.other_project %}
<div class="rd-card">
<div class="rd-card-header">
Project(s)
</div>
<div class="rd-body">
{% for project in rdresource.project %}
{{ project }}<br>
{% endfor %}
{% if rdresource.other_project %}
{{ rdresource.other_project|split(';')|join('<br>')|raw }}
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.user_institutions or rdresource.other_user_institutions %}
<div class="rd-card">
<div class="rd-card-header">
Users
</div>
<div class="rd-body">
{% for user in rdresource.user_institutions %}
{{ contributorOptions[user] }}<br>
{% endfor %}
{% if rdresource.other_user_institutions %}
{# rdresource.other_user_institutions|split(';')|join('<br>')|raw #}
Other
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.resource_usage %}
<div class="rd-card">
<div class="rd-card-header">
Usage notes
</div>
<div class="rd-body">
{{ rdresource.resource_usage}}
</div>
</div>
{% endif %}
{% if rdresource.user_docs_link or rdresource.tech_docs_link or rdresource.source_code_link %}
<div class="rd-card">
<div class="rd-card-header">
Documentation
</div>
<div class="rd-body">
{% if rdresource.user_docs_link %}
{% if 'http' in rdresource.user_docs_link %}
<a href="{{ rdresource.user_docs_link }}">User documentation</a><br>
{% else %}
{{ rdresource.user_docs_link }}
{% endif %}
{% endif %}
{% if rdresource.tech_docs_link %}
{% if 'http' in rdresource.tech_docs_link %}
<a href="{{ rdresource.tech_docs_link }}">Technical documentation</a><br>
{% else %}
{{ rdresource.tech_docs_link }}
{% endif %}
{% endif %}
{% if rdresource.source_code_link %}
{% if 'http' in rdresource.source_code_link %}
<a href="{{ rdresource.source_code_link }}">Source code</a><br>
{% else %}
{{ rdresource.source_code_link }}
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.interoperability %}
<div class="rd-card">
<div class="rd-card-header">
Platform and interoperability
</div>
<div class="rd-body">
{{ rdresource.interoperability }}
</div>
</div>
{% endif %}
{% if rdresource.standards %}
<div class="rd-card">
<div class="rd-card-header">
Standards compliance
</div>
<div class="rd-body">
{{ rdresource.standards }}
</div>
</div>
{% endif %}
{% if rdresource.licence or rdresource.licence_url %}
<div class="rd-card">
<div class="rd-card-header">
Licence / usage rights
</div>
<div class="rd-body">
{% if rdresource.licence %}
{{ rdresource.licence }}<br>
{% endif %}
{% if rdresource.licence_url %}
<a href="{{ rdresource.licence_url }}" target="_blank">Licence information</a>
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.availability is defined and rdresource.availability is not empty %}
<div class="rd-card">
<div class="rd-card-header">
Available to other institutions
</div>
<div class="rd-body">
{% if rdresource.availability %}
Yes
{% else %}
No
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.access_cost is defined and rdresource.access_cost is not empty %}
<div class="rd-card">
<div class="rd-card-header">
Access cost
</div>
<div class="rd-body">
{% if rdresource.access_cost %}
Yes
{% else %}
No
{% endif %}
</div>
</div>
{% endif %}
{% if rdresource.funder %}
<div class="rd-card">
<div class="rd-card-header">
Funder
</div>
<div class="rd-body">
{{ rdresource.funder|split(';')|join(' / ') }}
</div>
</div>
{% endif %}
{% if rdresource.comment %}
<div class="rd-card">
<div class="rd-card-header">
Additional information
</div>
<div class="rd-body">
{{ rdresource.comment }}
</div>
</div>
{% endif %}
</div>
</div>
<!--<span class="updated">Updated
{{ rdresource.modificationDate | date('Y-m-d')}}</span>-->
</div>
</div>
</div>
</div>
</main>{% endblock %}