<turbo-frame id="plant-frame">
<div class="bx--row">
<div class="bx--col">
{% if plantList is not empty %}
<div class="card card-teal mb-3">
<div class="card-header">
<h3 class="sheet-heading--main text-center">Plants by textmining</h3>
</div>
<div class="card-body">
<section
class="mb-5"
data-controller="filter-list"
data-filter-list-hidden-class="d-none">
<span data-turbo="false">
<bx-btn kind="ghost" size="sm" style="float:right;">
<a href="{{ path('app_plant_molecule_print', {'uuid': uuid}) }}">Print</a>
</bx-btn>
</span>
<h5 class="mb-1">Filter plant list</h5>
<bx-combo-box label-text="Plant list" trigger-content="Filter..." data-action="bx-combo-box-selected->filter-list#comboBoxChange" class="mb-2">
{% for plantName, data in plantList %}
<bx-combo-box-item value="{{ plantName }}">{{ plantName }}</bx-combo-box-item>
{% endfor %}
</bx-combo-box>
</section>
{% for plantName, data in plantList %}
<div data-filterable-item data-filterable-value="{{ plantName }}">
<h4 class="mb-1">
{{ plantName|capitalize() }}
</h4>
<div class="mb-3">
{% for item in data %}
<bx-data-table>
<bx-table class="mb-2">
<bx-table-body>
<bx-table-row>
<bx-table-cell class="w-50">
Organ
</bx-table-cell>
<bx-table-cell>
{{ item.plantpart|capitalize() }}
</bx-table-cell>
</bx-table-row>
<bx-table-row>
<bx-table-cell class="w-50">
Reference
</bx-table-cell>
<bx-table-cell>
{% if (item.reference ?? null) is not null %}
{% if '|' in item.reference %}
{% set arr = item.reference|split('|') %}
{% if arr|length > 0 %}
<ul>
{% for ref in arr %}
{% if 'http' in ref %}
<a href="{{ ref }}" target="_blank">{{ ref }}</a>
{% elseif 'PubMed' in ref %}
<a href="https://pubmed.ncbi.nlm.nih.gov/{{ ref }}" target="_blank">
{{ ref }}
</a>
{% else %}
{{ ref }}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% else %}
{% if 'http' in item.reference %}
<a href="{{ item.reference }}" target="_blank">{{ item.reference }}</a>
{% elseif 'PubMed' in item.reference %}
<a href="https://pubmed.ncbi.nlm.nih.gov/{{ item.reference }}" target="_blank">
{{ item.reference }}
</a>
{% else %}
{{ item.reference }}
{% endif %}
{% endif %}
{% endif %}
{% if (item.pubmedids ?? null) is not null %}
{% set ids = item.pubmedids|split(',') %}
{% if ids|length > 0 %}
<ul>
{% for raw_id in ids %}
{% set id = raw_id|replace({'PubMed':''}) %}
<li>
<a href="https://pubmed.ncbi.nlm.nih.gov/{{ id }}" target="_blank">{{ id }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif%}
</bx-table-cell>
</bx-table-row>
<bx-table-row>
<bx-table-cell class="w-50">
Low PPM
</bx-table-cell>
<bx-table-cell>
{{ item.lowppm }}
</bx-table-cell>
</bx-table-row>
<bx-table-row>
<bx-table-cell class="w-50">
High PPM
</bx-table-cell>
<bx-table-cell>
{{ item.highppm }}
</bx-table-cell>
</bx-table-row>
</bx-table-body>
</bx-table>
</bx-data-table>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
</turbo-frame>