diff --git a/layouts/basic/modules/OSSMailView/widgets.tpl b/layouts/basic/modules/OSSMailView/widgets.tpl
index b55e967e9e2..38e7d1c8474 100644
--- a/layouts/basic/modules/OSSMailView/widgets.tpl
+++ b/layouts/basic/modules/OSSMailView/widgets.tpl
@@ -55,7 +55,7 @@
'confirm' => \App\Language::translate('LBL_REMOVE_RELATION_CONFIRMATION'), 'id' => $ROW['id'], 'url'=> $RELATION_MODEL->getDeleteUrl($ROW['id'])
]
])}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) MODULE=$MODULE_NAME}
+ {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) BUTTON_VIEW='' MODULE=$MODULE_NAME}
{/if}
{if \App\Privilege::isPermitted($MODULE_NAME, 'Delete', $ROW['id'])}
{assign var=LINK value=Vtiger_Link_Model::getInstanceFromValues(['dataUrl' => "index.php?module={$MODULE_NAME}&action=Delete&record={$ROW['id']}",
@@ -65,7 +65,7 @@
'linkdata' => ['confirm' => \App\Language::translate('LBL_DELETE_RECORD_COMPLETELY_DESC')],
'linkclass' => 'btn-xs btn-dark relationDelete entityStateBtn'
])}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) MODULE=$MODULE_NAME}
+ {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) BUTTON_VIEW='' MODULE=$MODULE_NAME}
{/if}
{/if}
diff --git a/layouts/basic/modules/Settings/Profiles/ListViewContents.tpl b/layouts/basic/modules/Settings/Profiles/ListViewContents.tpl
index 830808e4bb8..6b6b26660f0 100644
--- a/layouts/basic/modules/Settings/Profiles/ListViewContents.tpl
+++ b/layouts/basic/modules/Settings/Profiles/ListViewContents.tpl
@@ -30,7 +30,7 @@
{assign var=LINKS value=$LISTVIEW_ENTRY->getRecordLinks()}
- {if count($LINKS) > 0}
+ {if !empty($LINKS) > 0}
{foreach from=$LINKS item=LINK}
diff --git a/layouts/basic/modules/Settings/Vtiger/EditViewActions.tpl b/layouts/basic/modules/Settings/Vtiger/EditViewActions.tpl
index bdc7202c7c9..b36276ee991 100644
--- a/layouts/basic/modules/Settings/Vtiger/EditViewActions.tpl
+++ b/layouts/basic/modules/Settings/Vtiger/EditViewActions.tpl
@@ -4,17 +4,14 @@
{assign var=SINGLE_MODULE_NAME value='SINGLE_'|cat:$MODULE}
- ffff
{if isset($EDITVIEW_LINKS['EDIT_VIEW_HEADER'])}
- {foreach item=LINK from=$EDITVIEW_LINKS['EDIT_VIEW_HEADER']}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='editViewHeader'}
- {/foreach}
+ {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$EDITVIEW_LINKS['EDIT_VIEW_HEADER'] BUTTON_VIEW='editViewHeader' MODULE=$QUALIFIED_MODULE SKIP_GROUP=true}
{/if}
diff --git a/layouts/basic/modules/Settings/Vtiger/ListViewContents.tpl b/layouts/basic/modules/Settings/Vtiger/ListViewContents.tpl
index 6fa6bb56249..16672e79b32 100644
--- a/layouts/basic/modules/Settings/Vtiger/ListViewContents.tpl
+++ b/layouts/basic/modules/Settings/Vtiger/ListViewContents.tpl
@@ -49,9 +49,7 @@
{if count($LINKS) > 0}
- {foreach from=$LINKS item=LINK}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $QUALIFIED_MODULE) BUTTON_VIEW='listViewBasic' MODULE_NAME=$QUALIFIED_MODULE MODULE=$QUALIFIED_MODULE}
- {/foreach}
+ {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' MODULE=$QUALIFIED_MODULE}
{/if}
diff --git a/layouts/basic/modules/Settings/WebserviceUsers/ListViewContents.tpl b/layouts/basic/modules/Settings/WebserviceUsers/ListViewContents.tpl
index f040e2a0f52..557e56ff73b 100644
--- a/layouts/basic/modules/Settings/WebserviceUsers/ListViewContents.tpl
+++ b/layouts/basic/modules/Settings/WebserviceUsers/ListViewContents.tpl
@@ -11,9 +11,7 @@
- {foreach item=LINK from=$LISTVIEW_LINKS['LISTVIEWBASIC']}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='listViewBasic'}
- {/foreach}
+ {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$LISTVIEW_LINKS['LISTVIEWBASIC'] BUTTON_VIEW='listViewBasic' MODULE=$QUALIFIED_MODULE SKIP_GROUP=true}
diff --git a/layouts/basic/modules/Settings/WidgetsManagement/WidgetConfig.tpl b/layouts/basic/modules/Settings/WidgetsManagement/WidgetConfig.tpl
index 99855dd866e..6e393ba943f 100644
--- a/layouts/basic/modules/Settings/WidgetsManagement/WidgetConfig.tpl
+++ b/layouts/basic/modules/Settings/WidgetsManagement/WidgetConfig.tpl
@@ -15,9 +15,9 @@
- {foreach item=LINK from=$WIDGET_MODEL->getSettingsLinks()}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $QUALIFIED_MODULE) BUTTON_VIEW='' BTN_CLASS=""}
- {/foreach}
+ {if !empty($WIDGET_MODEL->getSettingsLinks())}
+ {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$WIDGET_MODEL->getSettingsLinks() MODULE=$QUALIFIED_MODULE SKIP_GROUP=true}
+ {/if}
diff --git a/layouts/basic/modules/Users/ListViewContents.tpl b/layouts/basic/modules/Users/ListViewContents.tpl
index c81ba0aa8c8..3feb082d575 100644
--- a/layouts/basic/modules/Users/ListViewContents.tpl
+++ b/layouts/basic/modules/Users/ListViewContents.tpl
@@ -44,9 +44,7 @@
{assign var=ONLY_ONE value=count($LINKS) eq 1}
{if $ONLY_ONE}
- {foreach from=$LINKS item=LINK}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='listViewBasic'}
- {/foreach}
+ {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' MODULE=$QUALIFIED_MODULE}
{else}
{/if}
@@ -116,7 +114,7 @@
{assign var="SEARCH_INFO" value=[]}
{/if}
{include file=\App\Layout::getTemplatePath($FIELD_UI_TYPE_MODEL->getListSearchTemplateName(), $MODULE_NAME)
- FIELD_MODEL= $LISTVIEW_HEADER SEARCH_INFO=$SEARCH_INFO USER_MODEL=$USER_MODEL}
+ FIELD_MODEL= $LISTVIEW_HEADER SEARCH_INFO=$SEARCH_INFO USER_MODEL=$USER_MODEL}
|
{/foreach}
diff --git a/layouts/basic/modules/Users/PreferenceDetailViewHeader.tpl b/layouts/basic/modules/Users/PreferenceDetailViewHeader.tpl
index ca769842272..9b77cfc06f9 100644
--- a/layouts/basic/modules/Users/PreferenceDetailViewHeader.tpl
+++ b/layouts/basic/modules/Users/PreferenceDetailViewHeader.tpl
@@ -39,9 +39,9 @@
- {foreach item=LINK from=$DETAILVIEW_LINKS['DETAILVIEWPREFERENCE']}
- {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='detailViewBasic' BREAKPOINT='md' CLASS='c-btn-link--responsive'}
- {/foreach}
+ {if !empty($DETAILVIEW_LINKS['DETAILVIEWPREFERENCE'])}
+ {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE) LINKS=$DETAILVIEW_LINKS['DETAILVIEWPREFERENCE'] BUTTON_VIEW='detailViewBasic' BREAKPOINT='md' CLASS='c-btn-link--responsive'}
+ {/if}
{if $DETAILVIEW_LINKS['DETAIL_VIEW_BASIC']|@count gt 0}
{include file=\App\Layout::getTemplatePath('ButtonViewLinks.tpl') TEXT_HOLDER='LBL_MORE' LINKS=$DETAILVIEW_LINKS['DETAIL_VIEW_BASIC'] CLASS='c-btn-link--responsive btn-group' BTN_CLASS=' btn-outline-dark'}
{/if}
diff --git a/layouts/basic/modules/Users/RecordPopover.tpl b/layouts/basic/modules/Users/RecordPopover.tpl
index d43d8a050c2..e9c491c4dfd 100644
--- a/layouts/basic/modules/Users/RecordPopover.tpl
+++ b/layouts/basic/modules/Users/RecordPopover.tpl
@@ -10,9 +10,7 @@
{$RECORD->getDisplayName()}
{if $HEADER_LINKS}
{/if}
diff --git a/layouts/basic/modules/Users/UserViewHeader.tpl b/layouts/basic/modules/Users/UserViewHeader.tpl
index dc2dc6b78f9..ee5a8d34b5f 100644
--- a/layouts/basic/modules/Users/UserViewHeader.tpl
+++ b/layouts/basic/modules/Users/UserViewHeader.tpl
@@ -10,70 +10,67 @@
********************************************************************************/
-->*}
{strip}
-{assign var="MODULE_NAME" value=$MODULE_MODEL->get('name')}
-
-