47 lines
1.6 KiB
Twig
47 lines
1.6 KiB
Twig
{% extends '_dashboard/base.html.twig' %}
|
|
|
|
{% block page_content %}
|
|
{% if is_granted('ROLE_SENIOR') %}
|
|
<p>
|
|
<a href="{{ path('bo_item_new', {'itemCategoryId': itemCategory.id}) }}">Create new</a>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
{#<th>Id</th>#}
|
|
<th>Name</th>
|
|
<th>Slug</th>
|
|
<th>Description</th>
|
|
{#<th>Icon</th>#}
|
|
<th>Version</th>
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
<th>actions</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in items %}
|
|
<tr>
|
|
{#<td>{{ item.id }}</td>#}
|
|
<td><img {% if item.icon %}data-src="{{ asset(assets.item.upload_path ~ item.icon) }}"{% endif %} src="{{ asset(assets.img._black_xs) }}" alt="{{ item.name }}" style="height: 48px; width: auto;"> {{ item.name }}</td>
|
|
<td>{{ item.slug }}</td>
|
|
<td>{{ item.description }}</td>
|
|
{#<td>{{ item.icon }}</td>#}
|
|
<td>{{ item.version }}</td>
|
|
{% if is_granted('ROLE_SENIOR') %}
|
|
<td>
|
|
<a href="{{ path('bo_item_edit', {'itemCategoryId': itemCategory.id, 'id': item.id}) }}">edit</a>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="{{ is_granted('ROLE_SENIOR') ? '4' : '3' }}">no records found</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|