templates/rdresource/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/layout.html.twig' %}
  2. {% block content %}
  3.     {% do pimcore_head_title().set(rdresource.title) %}
  4.     {% do pimcore_head_title('CESSDA Resource Directory') %}
  5.     {% do pimcore_head_title().setSeparator(' - ') %}
  6.     <main class="pullc">
  7.         <div class="container-xl directory">
  8.             <div class="row">
  9.                 <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 %}>
  10.                     <div class="section-title px-3 px-lg-3 ps-lg-0 d-flex flex-column">
  11.                         <h1 class="mb-lg-5 pt-1 pe-lg-4 mt-5 text-lg-end">Resource Directory
  12.                         </h1>
  13.                     </div>
  14.                     <div class="d-flex justify-content-end">
  15.                         <ul class="sidenav list-unstyled justify-content-end align-self-end">
  16.                             {% if qs is defined and qs != "" %}
  17.                                 <li>
  18.                                     <a href="/Resource-Directory?{{ qs }}">Back to search results</a>
  19.                                 </li>
  20.                             {% endif %}
  21.                             <li>
  22.                                 <a href="/Resource-Directory">New search</a>
  23.                             </li>
  24.                         </ul>
  25.                     </div>
  26.                 </div>
  27.                 <div class="col-lg-9 ps-lg-5 pe-lg-5 pb-4">
  28.                     {% if showBreadcrumbs %}
  29.                         {% set mainNavStartNode = document.getProperty('navigation_root') %}
  30.                         {% if mainNavStartNode is empty %}
  31.                             {% set mainNavStartNode = pimcore_document(1) %}
  32.                         {% endif %}
  33.                         {% set breadbrumbs = pimcore_build_nav({
  34.                                     active: document,
  35.                                     root: mainNavStartNode
  36.                                 }) %}
  37.                         {% do app_navigation_enrich_breadcrumbs(breadbrumbs) %}
  38.                         {% do pimcore_nav_renderer('breadcrumbs').setMinDepth(null) %}
  39.                         <div class="breadcrumbs mt-3">
  40.                             <a href="/">Home</a>
  41.                             /
  42.                             <a href="/Tools">Tools</a>
  43.                             /
  44.                             <a href="/Resource-Directory">CESSDA Resource Directory</a>
  45.                             / 
  46.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Resource ID: crd-{{ rdresource.id }}
  47.                         </div>
  48.                     {% endif %}
  49.                     <div id="main-content" class="main-content resource-detail rd">
  50.                         <div class="col-12 my-3">
  51.                             <h1>{{ rdresource.title }}</h1>
  52.                         </div>
  53.                         <div class="row gx-3">
  54.                             <div class="col-12 col-lg-6">
  55.                                 <div class="rd-card">
  56.                                     <div class="rd-card-header">
  57.                                         Base data
  58.                                     </div>
  59.                                     <div class="rd-col-header">
  60.                                         CESSDA ID
  61.                                     </div>
  62.                                     <div class="rd-col">
  63.                                         crdr-{{ rdresource.id }}
  64.                                     </div>
  65.                                     {% if rdresource.publish_date %}
  66.                                         <div class="rd-col-header">
  67.                                             Date of publication
  68.                                         </div>
  69.                                         <div class="rd-col">
  70.                                             {% if rdresource.year_only %}
  71.                                                 {{ rdresource.publish_date | date('Y') }}
  72.                                             {% else %}
  73.                                                 {{ rdresource.publish_date | date('Y-m-d') }}
  74.                                             {% endif %}
  75.                                         </div>
  76.                                     {% endif %}
  77.                                     {% if rdresource.registered_date %}
  78.                                         <div class="rd-col-header">
  79.                                             Date added
  80.                                         </div>
  81.                                         <div class="rd-col">
  82.                                             {{ rdresource.registered_date | date('Y-m-d') }}
  83.                                         </div>
  84.                                     {% endif %}
  85. {% if rdresource.modificationDate %}
  86.                                         <div class="rd-col-header">
  87.                                             Last modified
  88.                                         </div>
  89.                                         <div class="rd-col">
  90.                                             {{ rdresource.modificationDate | date('Y-m-d')}}
  91.                                         </div>
  92.                                     {% endif %}
  93.                                     {% if rdresource.resource_type %}
  94.                                         <div class="rd-col-header">
  95.                                             Resource type
  96.                                         </div>
  97.                                         <div class="rd-col">
  98.                                             {{ rdresource.resource_type }}
  99.                                         </div>
  100.                                     {% endif %}
  101.                                 </div>
  102.                             </div>
  103.                             <div class="col-12 col-lg-6">
  104.                                 <div class="rd-card links">
  105.                                     <div class="rd-card-header">
  106.                                         Links
  107.                                     </div>
  108.                                     {% if rdresource.contact_email %}
  109.                                         <div class="rd-col-header">
  110.                                             Contact email
  111.                                         </div>
  112.                                         <div class="rd-col">
  113.                                             <a href="mailto:{{ rdresource.contact_email }}">{{ rdresource.contact_email }}</a>
  114.                                         </div>
  115.                                     {% endif %}
  116.                                     {% if rdresource.doi %}
  117.                                         <div class="rd-col-header">
  118.                                             <abbr title="Digital Object identifier">DOI</abbr>
  119.                                         </div>
  120.                                         <div class="rd-col">
  121.                                             <a href="https://doi.org/{{ rdresource.doi }}" target="_blank">{{ rdresource.doi }}</a>
  122.                                         </div>
  123.                                     {% endif %}
  124.                                     {% if rdresource.landing_url %}
  125.                                         <div class="rd-col-header">
  126.                                             Information page
  127.                                         </div>
  128.                                         <div class="rd-col">
  129.                                             <a href="{{ rdresource.landing_url }}" target="_blank">Visit</a>
  130.                                         </div>
  131.                                     {% endif %}
  132.                                     {% if rdresource.direct_url %}
  133.                                         <div class="rd-col-header">
  134.                                             Direct URL
  135.                                         </div>
  136.                                         <div class="rd-col">
  137.                                             <a href="{{ rdresource.direct_url }}" target="_blank">View/download</a>
  138.                                         </div>
  139.                                     {% endif %}
  140.                                 </div>
  141.                             </div>
  142.                         </div>
  143.                         <div class="row">
  144.                             <div class="col-12">
  145.                                 {% if rdresource.description %}
  146.                                     <div class="rd-card">
  147.                                         <div class="rd-card-header">
  148.                                             Description
  149.                                         </div>
  150.                                         <div class="rd-body">
  151.                                             {{ rdresource.description }}
  152.                                         </div>
  153.                                     </div>
  154.                                 {% endif %}
  155.                                 {% if tags %}
  156.                                     <div class="rd-card">
  157.                                         <div class="rd-card-header">
  158.                                             Keyword tags
  159.                                         </div>
  160.                                         <div class="rd-body">
  161.                                             {% for tag in tags %}
  162.                                                 <span class="badge rounded-pill bg-blue-050 text-dark">
  163.                                                     <a href="/Resource-Directory?rtag={{ tag.id }}">{{ tag.name }}</a>
  164.                                                 </span>
  165.                                             {% endfor %}
  166.                                         </div>
  167.                                     </div>
  168.                                 {% endif %}
  169.                                 {% if rdresource.author %}
  170.                                     <div class="rd-card">
  171.                                         <div class="rd-card-header">
  172.                                             Author(s)
  173.                                         </div>
  174.                                         <div class="rd-body">
  175.                                             {{ rdresource.author|split(';')|join(' / ') }}
  176.                                         </div>
  177.                                     </div>
  178.                                 {% endif %}
  179.                                 {% if rdresource.contributors or rdresource.other_contributors %}
  180.                                 
  181.                                         <div class="rd-card">
  182.                                             <div class="rd-card-header">
  183.                                                 Contributors
  184.                                             </div>
  185.                                             <div class="rd-body">
  186.                                                 {% for contributor in rdresource.contributors %}
  187.                                                     {{ contributorOptions[contributor] }}<br>
  188.                                                 {% endfor %}
  189.                                                 {% if rdresource.other_contributors  %}
  190.                                                     {# rdresource.other_contributors|split(';')|join('<br>')|raw }#}
  191.                                                     Other
  192.                                                 {% endif %}
  193.                                             </div>
  194.                                         </div>
  195.                                     
  196.                                 {% endif %}
  197.                                 {% if rdresource.project or rdresource.other_project %}
  198.                                     <div class="rd-card">
  199.                                         <div class="rd-card-header">
  200.                                             Project(s)
  201.                                         </div>
  202.                                         <div class="rd-body">
  203.                                             {% for project in rdresource.project %}
  204.                                                 {{ project }}<br>
  205.                                             {% endfor %}
  206.                                             {% if rdresource.other_project  %}
  207.                                                 {{  rdresource.other_project|split(';')|join('<br>')|raw }}
  208.                                             {% endif %}
  209.                                         </div>
  210.                                     </div>
  211.                             
  212.                             {% endif %}
  213.                             {% if rdresource.user_institutions or rdresource.other_user_institutions %}
  214.                                 <div class="rd-card">
  215.                                     <div class="rd-card-header">
  216.                                         Users
  217.                                     </div>
  218.                                     <div class="rd-body">
  219.                                         {% for user in rdresource.user_institutions %}
  220.                                             {{ contributorOptions[user] }}<br>
  221.                                         {% endfor %}
  222.                                         {% if rdresource.other_user_institutions  %}
  223.                                             {# rdresource.other_user_institutions|split(';')|join('<br>')|raw #}
  224.                                             Other
  225.                                         {% endif %}
  226.                                     </div>
  227.                                 </div>
  228.                             {% endif %}
  229.                             {% if rdresource.resource_usage %}
  230.                                 <div class="rd-card">
  231.                                     <div class="rd-card-header">
  232.                                         Usage notes
  233.                                     </div>
  234.                                     <div class="rd-body">
  235.                                         {{ rdresource.resource_usage}}
  236.                                     </div>
  237.                                 </div>
  238.                             {% endif %}
  239.                             {% if rdresource.user_docs_link or rdresource.tech_docs_link or rdresource.source_code_link %}
  240.                                 <div class="rd-card">
  241.                                     <div class="rd-card-header">
  242.                                         Documentation
  243.                                     </div>
  244.                                     <div class="rd-body">
  245.                                         {% if rdresource.user_docs_link %}
  246.                                             {% if 'http' in rdresource.user_docs_link %}
  247.                                                 <a href="{{ rdresource.user_docs_link }}">User documentation</a><br>
  248.                                             {% else %}
  249.                                                 {{ rdresource.user_docs_link }}
  250.                                             {% endif %}
  251.                                         {% endif %}
  252.                                         {% if rdresource.tech_docs_link %}
  253.                                             {% if 'http' in rdresource.tech_docs_link %}
  254.                                                 <a href="{{ rdresource.tech_docs_link }}">Technical documentation</a><br>
  255.                                             {% else %}
  256.                                                 {{ rdresource.tech_docs_link }}
  257.                                             {% endif %}
  258.                                         {% endif %}
  259.                                         {% if rdresource.source_code_link %}
  260.                                             {% if 'http' in rdresource.source_code_link %}
  261.                                                 <a href="{{ rdresource.source_code_link }}">Source code</a><br>
  262.                                             {% else %}
  263.                                                 {{ rdresource.source_code_link }}
  264.                                             {% endif %}
  265.                                         {% endif %}
  266.                                     </div>
  267.                                 </div>
  268.                             {% endif %}
  269.                             {% if rdresource.interoperability %}
  270.                                 <div class="rd-card">
  271.                                     <div class="rd-card-header">
  272.                                         Platform and interoperability
  273.                                     </div>
  274.                                     <div class="rd-body">
  275.                                         {{ rdresource.interoperability }}
  276.                                     </div>
  277.                                 </div>
  278.                             {% endif %}
  279.                             {% if rdresource.standards %}
  280.                                 <div class="rd-card">
  281.                                     <div class="rd-card-header">
  282.                                         Standards compliance
  283.                                     </div>
  284.                                     <div class="rd-body">
  285.                                         {{ rdresource.standards }}
  286.                                     </div>
  287.                                 </div>
  288.                             {% endif %}
  289.                             {% if rdresource.licence or rdresource.licence_url %}
  290.                                 <div class="rd-card">
  291.                                     <div class="rd-card-header">
  292.                                         Licence / usage rights
  293.                                     </div>
  294.                                     <div class="rd-body">
  295.                                         {% if rdresource.licence %}
  296.                                             {{ rdresource.licence }}<br>
  297.                                         {% endif %}
  298.                                         {% if rdresource.licence_url %}
  299.                                             <a href="{{ rdresource.licence_url }}" target="_blank">Licence information</a>
  300.                                         {% endif %}
  301.                                     </div>
  302.                                 </div>
  303.                             {% endif %}
  304.                             {% if rdresource.availability is defined and rdresource.availability is not empty %}
  305.                                 <div class="rd-card">
  306.                                     <div class="rd-card-header">
  307.                                         Available to other institutions
  308.                                     </div>
  309.                                     <div class="rd-body">
  310.                                         {% if rdresource.availability  %}
  311.                                             Yes
  312.                                         {% else %}
  313.                                             No
  314.                                         {% endif %}
  315.                                     </div>
  316.                                 </div>
  317.                             {% endif %}
  318.                             {% if rdresource.access_cost is defined and rdresource.access_cost is not empty %}
  319.                                 <div class="rd-card">
  320.                                     <div class="rd-card-header">
  321.                                         Access cost
  322.                                     </div>
  323.                                     <div class="rd-body">
  324.                                         {% if rdresource.access_cost  %}
  325.                                             Yes
  326.                                         {% else %}
  327.                                             No
  328.                                         {% endif %}
  329.                                     </div>
  330.                                 </div>
  331.                             {% endif %}
  332.                             {% if rdresource.funder %}
  333.                                 <div class="rd-card">
  334.                                     <div class="rd-card-header">
  335.                                         Funder
  336.                                     </div>
  337.                                     <div class="rd-body">
  338.                                         {{ rdresource.funder|split(';')|join(' / ') }}
  339.                                     </div>
  340.                                 </div>
  341.                             {% endif %}
  342.                             {% if rdresource.comment %}
  343.                                 <div class="rd-card">
  344.                                     <div class="rd-card-header">
  345.                                         Additional information
  346.                                     </div>
  347.                                     <div class="rd-body">
  348.                                         {{ rdresource.comment }}
  349.                                     </div>
  350.                                 </div>
  351.                             {% endif %}
  352.                         </div>
  353.                     </div>
  354.                     <!--<span class="updated">Updated
  355.                         {{ rdresource.modificationDate | date('Y-m-d')}}</span>-->
  356.                 </div>
  357.             </div>
  358.         </div>
  359.     </div>
  360. </main>{% endblock %}