-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathadvisories.html.twig
More file actions
33 lines (33 loc) · 1.34 KB
/
advisories.html.twig
File metadata and controls
33 lines (33 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% if ea().crud.currentAction == 'detail' %}
{% set advisories = entity.instance.advisories %}
{% if advisories|length > 0 %}
<table class="table table-sm table-borderless">
<thead>
<tr>
<th>Package</th>
<th>CVE</th>
<th>Title</th>
</tr>
</thead>
<tbody>
{% for advisory in advisories %}
{% set url = ea_url()
.unsetAll()
.setController('App\\Controller\\Admin\\AdvisoryCrudController')
.setAction('detail')
.setEntityId(advisory.id) %}
<tr>
<td>{{ advisory.package }}</td>
<td><a href="{{ url }}">{{ advisory.cve ?? advisory.advisoryId }}</a></td>
<td>{{ advisory.title }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% elseif field.formattedValue != 0 %}
<span class="badge badge-danger">{{ field.formattedValue }}</span>
{% endif %}