{% extends 'base.html.twig' %} {% set titleName = "Line Status Manager" %} {% block title %} POWER DATA | {{titleName}} {% endblock %} {% block page %}{{titleName}}{% endblock %} {% block breadcrumb %} {% if titleName != "Home" %} {{titleName}} {% endif %} {% endblock %} {% block css %} {% endblock %} {% block content %}
{% for message in app.flashes('success') %} {% endfor %} {% for message in app.flashes('error') %} {% endfor %}

DataTable with default features

{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_LINE_STATUS_MANAGER') %} {% endif %}
{% for lineStatus in lineStatuss %} {% endfor %}
ID Name Category Status Action
{{ lineStatus.id }} {{ lineStatus.name }} {{ constant('App\\Entity\\Power\\LineStatus::ARRAY_OF_CATEGORY')[lineStatus.category]['name'] }} {{ lineStatus.status == 1 ? 'Enabled' : 'Disabled' }} {# View #} {% if lineStatus.category in [1,2,3] and ( is_granted('ROLE_ADMIN') or is_granted('ROLE_LINE_STATUS_MANAGER') ) %} {# Delete #} {% endif %}
ID Name Category Status Action
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_LINE_STATUS_MANAGER') %} {% endif %} {% endblock %} {% block script %} {% endblock %}