Created
September 19, 2016 18:15
-
-
Save anyt/2f4f70c36aa100837634d3f77ee19840 to your computer and use it in GitHub Desktop.
Add button to "More Actions" dropdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ UI.clientLink({ | |
'dataUrl': path( | |
'acme_demo_foo_route', { | |
entityClass: oro_class_name(entity, true), | |
entityId: entity.id | |
}), | |
'aCss': 'no-hash', | |
'iCss': 'icon-comment-alt', | |
'dataId': entity.id, | |
'label': 'acme_demo.contact.action.foo'|trans, | |
'widget': { | |
'type': 'dialog', | |
'multiple': false, | |
'refresh-widget-alias': 'activity-list-widget', | |
'options': { | |
'alias': 'foo-dialog', | |
'dialogOptions': { | |
'title': 'acme_demo.contact.action.foo'|trans, | |
'allowMaximize': true, | |
'allowMinimize': true | |
} | |
} | |
} | |
}) }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acme_demo_foo_button: | |
template: AcmeDemoBundle:Contact:fooButton.html.twig | |
applicable: "@oro_ui.placeholder.filter->isInstanceOf($entity$, %orocrm_contact.entity.class%)" | |
acl: [orocrm_contact_view] | |
acme_demo_foo_link: | |
template: AcmeDemoBundle:Contact:fooLink.html.twig | |
applicable: "@oro_ui.placeholder.filter->isInstanceOf($entity$, %orocrm_contact.entity.class%)" | |
acl: [orocrm_contact_view] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
acme_demo.widget_provider.actions: | |
parent: oro_ui.widget_provider.action_button.abstract | |
arguments: | |
- acme_demo_foo_button | |
- acme_demo_foo_link | |
tags: | |
- { name: oro_ui.view_action_provider, group: activity, priority: -100 } # change priority to render button at the right place |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment