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

{% block title %}{{ 'admin.title.Charge Type List'|trans }}{% endblock title %}

{% block admin_content %}

    <h1>{{ 'admin.title.Charge Type List'|trans }}</h1>

	<table class="records_list table table-bordered border-dark">
		<thead>
			<tr>
                <th>{{ 'Ordering'|trans }}</th>
				<th>{{ 'Name'|trans }}</th>
				<th>{{ 'Active'|trans }}</th>
                <th>&nbsp;</th>
			</tr>
		</thead>
		<tbody>
			{% for entity in entities %}
				<tr>
                    <td>{{ entity.ordering }}</td>
					<td>
                        {{ entity|chill_entity_render_box }}<br/>
                        <strong>{{ 'budget.admin.form.Charge_kind_key'|trans }}&nbsp;:</strong> <code>{{ entity.kind }}</code>
                    </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_charge_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_charge_kind_new') }}" class="btn btn-create">
				{{ 'admin.new.Create a new charge type'|trans }}
			</a>
		</li>
	</ul>
{% endblock %}
