{% extends 'OroUIBundle:actions:view.html.twig' %} {% import 'OroCRMChannelBundle::macros.html.twig' as channelMacro %} {% oro_title_set({params : {"%channel.name%": entity.name } }) %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('orocrm_channel_index'), 'indexLabel': 'orocrm.channel.entity_plural_label'|trans, 'entityTitle': entity.name|default('N/A') } %} {{ parent() }} {% endblock pageHeader %} {% block navButtons %} {% if resource_granted('EDIT', entity) %} {% if entity.status %} {{ UI.button({ 'aCss': 'btn-danger', 'iCss': 'icon-remove', 'label': 'orocrm.channel.button.deactivate.label'|trans, 'path': path('orocrm_channel_change_status', {'id' : entity.id}), 'title': 'orocrm.channel.button.deactivate.label'|trans, }) }} {% else %} {{ UI.button({ 'aCss': 'btn-success', 'iCss': 'icon-ok', 'label': 'orocrm.channel.button.activate.label'|trans, 'path': path('orocrm_channel_change_status', {'id' : entity.id}), 'title': 'orocrm.channel.button.activate.label'|trans, }) }} {% endif %} {{ UI.buttonSeparator() }} {{ UI.editButton({ 'path': path('orocrm_channel_update', {'id': entity.id}), 'entity_label': 'orocrm.channel.entity_label'|trans }) }} {% endif %} {% if resource_granted('DELETE', entity) %} {{ UI.deleteButton({ 'dataUrl': path('orocrm_api_delete_channel', {'id': entity.id}), 'dataRedirect': path('orocrm_channel_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-channel', 'dataId': entity.id, 'entity_label': 'orocrm.channel.entity_label'|trans, }) }} {% endif %} {% endblock %} {% block breadcrumbs %} {{ parent() }}