{% import 'OroUIBundle::macros.html.twig' as UI %} {% if resource_granted('orocrm_task_create') %} {# Find a way to pass here parameter from container to not hard-code class name for Task entity #} {{ UI.clientButton({ 'dataUrl': path('orocrm_task_create', { 'contactId': entity.id }) , 'aCss': 'no-hash', 'iCss': oro_entity_config_value('OroCRM\\Bundle\\TaskBundle\\Entity\\Task', 'icon')|default(''), 'label' : 'orocrm.task.add_entity'|trans, 'widget' : { 'type' : 'dialog', 'multiple' : false, 'reload-grid-name' : 'task-contact-tasks-grid', 'options' : { 'dialogOptions' : { 'title' : 'orocrm.task.add_entity'|trans, 'allowMaximize': true, 'allowMinimize': true, 'dblclick': 'maximize', 'maximizedHeightDecreaseBy': 'minimize-bar', 'width': 1000 } } }, }) }} {% endif %}