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')} - -
-
-
-
- {include file=\App\Layout::getTemplatePath('BreadCrumbs.tpl', $MODULE_NAME)} -
-
-
- {if isset($DETAILVIEW_LINKS['DETAIL_VIEW_ADDITIONAL'])} - {foreach item=LINK from=$DETAILVIEW_LINKS['DETAIL_VIEW_ADDITIONAL']} - {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='detailViewBasic' CLASS='c-btn-link--responsive'} - {/foreach} - {/if} - {if $DETAILVIEW_LINKS['DETAIL_VIEW_BASIC']|@count gt 0} - - {/if} + {/if} +
-
-
-
- -
-
- {/strip} +
+
+ + +
+{/strip} diff --git a/layouts/basic/modules/Vtiger/ButtonLinks.tpl b/layouts/basic/modules/Vtiger/ButtonLinks.tpl index 2a8d3d029e1..64b67b0db9f 100644 --- a/layouts/basic/modules/Vtiger/ButtonLinks.tpl +++ b/layouts/basic/modules/Vtiger/ButtonLinks.tpl @@ -11,7 +11,7 @@ {assign var=BREAKPOINT value=''} {/if} {assign var=COUNT_LINKS value=count($LINKS)} - diff --git a/layouts/basic/modules/Vtiger/Detail/ProcessWizard.tpl b/layouts/basic/modules/Vtiger/Detail/ProcessWizard.tpl index 1588bc1e227..709e6106719 100644 --- a/layouts/basic/modules/Vtiger/Detail/ProcessWizard.tpl +++ b/layouts/basic/modules/Vtiger/Detail/ProcessWizard.tpl @@ -56,9 +56,9 @@ {/foreach}
- {foreach item=LINK from=$PROCESS_WIZARD->getActions()} - {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) BUTTON_VIEW='detailViewProcessWizard' BREAKPOINT='md' CLASS='c-btn-link--responsive'} - {/foreach} + {if !empty($PROCESS_WIZARD->getActions())} + {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE_NAME) LINKS=$PROCESS_WIZARD->getActions() BUTTON_VIEW='detailViewProcessWizard' BREAKPOINT='md' MODULE=$MODULE_NAME SKIP_GROUP=true CLASS='c-btn-link--responsive'} + {/if}
{/if} diff --git a/layouts/basic/modules/Vtiger/Detail/Widget/Basic.tpl b/layouts/basic/modules/Vtiger/Detail/Widget/Basic.tpl index 0a63484d141..51e40784f1d 100644 --- a/layouts/basic/modules/Vtiger/Detail/Widget/Basic.tpl +++ b/layouts/basic/modules/Vtiger/Detail/Widget/Basic.tpl @@ -94,9 +94,7 @@ {/if} {if !empty($WIDGET['buttonHeader'])} - {foreach from=$WIDGET['buttonHeader'] item=$LINK} - {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) BUTTON_VIEW='detailViewBasic' MODULE=$MODULE_NAME} - {/foreach} + {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE_NAME) LINKS=$WIDGET['buttonHeader'] BUTTON_VIEW='detailViewBasic' MODULE=$MODULE_NAME SKIP_GROUP=true} {/if} {/if}
diff --git a/layouts/basic/modules/Vtiger/EditViewActions.tpl b/layouts/basic/modules/Vtiger/EditViewActions.tpl index e544ae91af9..44987a80260 100644 --- a/layouts/basic/modules/Vtiger/EditViewActions.tpl +++ b/layouts/basic/modules/Vtiger/EditViewActions.tpl @@ -12,9 +12,7 @@ {\App\Language::translate('LBL_CANCEL', $MODULE_NAME)} {if isset($EDITVIEW_LINKS['EDIT_VIEW_HEADER'])} - {foreach item=LINK from=$EDITVIEW_LINKS['EDIT_VIEW_HEADER']} - {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) BUTTON_VIEW='editViewHeader'} - {/foreach} + {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE_NAME) LINKS=$EDITVIEW_LINKS['EDIT_VIEW_HEADER'] BUTTON_VIEW='editViewHeader' MODULE=$MODULE_NAME SKIP_GROUP=true} {/if} {if \App\Privilege::isPermitted($MODULE_NAME, 'RecordCollector') && !empty($EDITVIEW_LINKS['EDIT_VIEW_RECORD_COLLECTOR'])} {include file=\App\Layout::getTemplatePath('Edit/RecordCollectors.tpl', $MODULE_NAME) RECORD_COLLECTOR=$EDITVIEW_LINKS['EDIT_VIEW_RECORD_COLLECTOR']} diff --git a/layouts/basic/modules/Vtiger/ListViewHeader.tpl b/layouts/basic/modules/Vtiger/ListViewHeader.tpl index f75c19a65ba..491586dd32b 100644 --- a/layouts/basic/modules/Vtiger/ListViewHeader.tpl +++ b/layouts/basic/modules/Vtiger/ListViewHeader.tpl @@ -27,9 +27,9 @@ {include file=\App\Layout::getTemplatePath('TilesSize.tpl')} {/if} {include file=\App\Layout::getTemplatePath('ButtonViewLinks.tpl') LINKS=$LINKS TEXT_HOLDER='LBL_ACTIONS' BTN_ICON='fa fa-list' CLASS='listViewMassActions mr-sm-1 mb-1 mb-sm-0 c-btn-block-sm-down'} - {foreach item=LINK from=$LISTVIEW_LINKS['LISTVIEWBASIC']} - {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='listView' CLASS='mr-sm-1 mb-1 c-btn-block-sm-down'} - {/foreach} + {if !empty($LISTVIEW_LINKS['LISTVIEWBASIC'])} + {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE) LINKS=$LISTVIEW_LINKS['LISTVIEWBASIC'] BUTTON_VIEW='listView' MODULE=$MODULE CLASS='mr-sm-1 mb-1 c-btn-block-sm-down'} + {/if}
{if $CUSTOM_VIEWS|@count gt 0} diff --git a/layouts/basic/modules/Vtiger/ListViewLeftSide.tpl b/layouts/basic/modules/Vtiger/ListViewLeftSide.tpl index a0da2c158af..93d07ec27c4 100644 --- a/layouts/basic/modules/Vtiger/ListViewLeftSide.tpl +++ b/layouts/basic/modules/Vtiger/ListViewLeftSide.tpl @@ -10,18 +10,14 @@ {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', $MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' BREAKPOINT='md' MODULE=$MODULE} {else}
{/if} diff --git a/layouts/basic/modules/Vtiger/ListViewPreProcess.tpl b/layouts/basic/modules/Vtiger/ListViewPreProcess.tpl index 13942c7786a..f13846282aa 100644 --- a/layouts/basic/modules/Vtiger/ListViewPreProcess.tpl +++ b/layouts/basic/modules/Vtiger/ListViewPreProcess.tpl @@ -10,30 +10,28 @@ ********************************************************************************/ -->*} {strip} - -{include file=\App\Layout::getTemplatePath('PageHeader.tpl', $MODULE_NAME)} -
-
- {assign var="BREADCRUMBS_ACTIVE" value=\App\Config::layout('breadcrumbs')} - {if $BREADCRUMBS_ACTIVE || $HEADER_LINKS['LIST_VIEW_HEADER']} -
-
- {include file=\App\Layout::getTemplatePath('BreadCrumbs.tpl', $MODULE_NAME)} -
-
-
- {foreach item=LINK from=$HEADER_LINKS['LIST_VIEW_HEADER']} - {include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='listViewHeader' BREAKPOINT='md' CLASS='c-btn-link--responsive'} - {/foreach} + + {include file=\App\Layout::getTemplatePath('PageHeader.tpl', $MODULE_NAME)} +
+
+ {assign var="BREADCRUMBS_ACTIVE" value=\App\Config::layout('breadcrumbs')} + {if $BREADCRUMBS_ACTIVE || $HEADER_LINKS['LIST_VIEW_HEADER']} +
+
+ {include file=\App\Layout::getTemplatePath('BreadCrumbs.tpl', $MODULE_NAME)} +
+
+ {if !empty($HEADER_LINKS['LIST_VIEW_HEADER'])} + {include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE) LINKS=$HEADER_LINKS['LIST_VIEW_HEADER'] BUTTON_VIEW='listViewHeader' BREAKPOINT='md' MODULE=$MODULE CLASS='c-btn-link--responsive'} + {/if} +
-
-
- {/if} -
- - {include file=\App\Layout::getTemplatePath('ListViewHeader.tpl', $MODULE)} - - {/strip} + {/if} +
+ + {include file=\App\Layout::getTemplatePath('ListViewHeader.tpl', $MODULE)} + +{/strip} diff --git a/layouts/basic/modules/Vtiger/ListViewRightSide.tpl b/layouts/basic/modules/Vtiger/ListViewRightSide.tpl index 65fd547d964..cb6bca90f85 100644 --- a/layouts/basic/modules/Vtiger/ListViewRightSide.tpl +++ b/layouts/basic/modules/Vtiger/ListViewRightSide.tpl @@ -5,9 +5,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', $MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' MODULE=$MODULE } {else}
{/if} diff --git a/layouts/basic/modules/Vtiger/Modals/QuickDetailModal.tpl b/layouts/basic/modules/Vtiger/Modals/QuickDetailModal.tpl index de280275710..4c92b510463 100644 --- a/layouts/basic/modules/Vtiger/Modals/QuickDetailModal.tpl +++ b/layouts/basic/modules/Vtiger/Modals/QuickDetailModal.tpl @@ -15,9 +15,9 @@