Skip to content

Commit 5a3343c

Browse files
authored
Merge pull request mautic#15095 from andersonjeccel/UXUI-188-launch-the-builder-and-preview-from-the-landing-page-list-view
[UXUI-188] Launch preview and other actions from list views
2 parents 5c26aa9 + 46e522f commit 5a3343c

File tree

4 files changed

+44
-8
lines changed

4 files changed

+44
-8
lines changed

app/bundles/CoreBundle/Translations/en_US/messages.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mautic.core.troubleshooting="Troubleshooting"
2121
mautic.core.tag.search_index.disabled="Hiding from search engines"
2222
mautic.core.alias="Alias"
2323
mautic.core.autogenerated="Autogenerated"
24-
mautic.core.open_link="Open preview link in new tab"
24+
mautic.core.open_link="Preview in new tab"
2525
mautic.core.options="Options"
2626
mautic.core.sort.ascending.description="Click to sort rows by %header% in ascending order"
2727
mautic.core.sort.descending.description="Click to sort rows by %header% in descending order"

app/bundles/EmailBundle/Resources/views/Email/_list.html.twig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,19 @@
8989
}) %}
9090
{% endif %}
9191

92-
{% set customButtons = ('list' == type) ? [sendButton] : [] %}
92+
{% set previewButton = {
93+
'attr': {
94+
'class': 'btn btn-ghost btn-sm btn-nospin',
95+
'href': url('mautic_email_preview', {'objectId': item.getId()}),
96+
'target': '_blank',
97+
'data-toggle': '',
98+
},
99+
'iconClass': 'ri-external-link-line',
100+
'btnText': 'mautic.core.open_link'|trans,
101+
'priority': 100
102+
} %}
93103

104+
{% set customButtons = ('list' == type) ? [sendButton, previewButton] : [previewButton] %}
94105

95106
{{- include('@MauticCore/Helper/list_actions.html.twig', {
96107
'item' : item,

app/bundles/LeadBundle/Resources/views/List/_list_row.html.twig

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@
2222
},
2323
'routeBase': 'segment',
2424
'langVar': 'lead.list',
25-
'custom': [
26-
{
25+
'customButtons': {
26+
'viewcontacts': {
2727
'attr': {
2828
'data-toggle': 'ajax',
2929
'href': path('mautic_contact_index', {'search': listCommand ~ ':' ~ item.alias}),
3030
},
31-
'icon': 'ri-team-line',
32-
'label': 'mautic.lead.list.view_contacts',
33-
},
34-
],
31+
'iconClass': 'ri-team-line',
32+
'btnText': 'mautic.lead.list.view_contacts'|trans,
33+
'priority': 100
34+
}
35+
},
3536
}) }}
3637
</td>
3738
<td>

app/bundles/PageBundle/Resources/views/Page/_list.html.twig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,30 @@
9292
},
9393
'routeBase': 'page',
9494
'nameGetter': 'getTitle',
95+
'customButtons': {
96+
'preview': {
97+
'attr': {
98+
'class': 'btn btn-ghost btn-sm btn-nospin',
99+
'href': path('mautic_page_preview', {'id': item.id}),
100+
'target': '_blank',
101+
'data-toggle': '',
102+
},
103+
'iconClass': 'ri-external-link-line',
104+
'btnText': 'mautic.core.open_link'|trans,
105+
'priority': 100
106+
},
107+
'results': {
108+
'attr': {
109+
'class': 'btn btn-ghost btn-sm btn-nospin',
110+
'href': path('mautic_page_results', {'objectId': item.id}),
111+
'data-toggle': 'ajax',
112+
'data-menu-link': 'mautic_form_index'
113+
},
114+
'iconClass': 'ri-bar-chart-line',
115+
'btnText': 'mautic.form.form.results'|trans,
116+
'priority': 80
117+
}
118+
}
95119
}) }}
96120
</td>
97121
<td>

0 commit comments

Comments
 (0)