{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}

{% block title %}{{ 'event.admin.title.Event budget element list'|trans }}{% endblock title %}

{% block admin_content %}

    <h1>{{ 'event.admin.title.Event budget element list'|trans }}</h1>

	<table class="records_list table table-bordered border-dark">
		<thead>
			<tr>
				<th>{{ 'Name'|trans }}</th>
                <th>{{ 'Type'|trans }}</th>
				<th>{{ 'Active'|trans }}</th>
                <th>&nbsp;</th>
			</tr>
		</thead>
		<tbody>
			{% for entity in entities %}
				<tr>
					<td>{{ entity.name|localize_translatable_string }}</td>
                    <td>{{ entity.type.value|trans }}</td>
					<td style="text-align:center;">
						{%- if entity.isActive -%}
							<i class="fa fa-check-square-o"></i>
						{%- else -%}
							<i class="fa fa-square-o"></i>
						{%- endif -%}
					</td>
                    <td>
						<ul class="record_actions">
							<li>
								<a href="{{ path('chill_crud_event_budget_kind_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
							</li>
						</ul>
					</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>

    {{ chill_pagination(paginator) }}

	<ul class="record_actions sticky-form-buttons">
		<li>
			<a href="{{ path('chill_crud_event_budget_kind_new') }}" class="btn btn-create">
				{{ 'event.admin.new.Create a new budget kind'|trans }}
			</a>
		</li>
	</ul>
{% endblock %}
