Skip to content

Commit

Permalink
feat(QuickCreate) hide based on modules and global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Oct 25, 2021
1 parent 35c6fdc commit 1062eab
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Smarty/templates/Components/Components.tpl
Expand Up @@ -37,6 +37,7 @@
{$i = $i+1}
{/foreach}
</ul>
{if $SHOWQUICKCREATE}
<div class="slds-context-bar__tertiary" style="float:left; margin-top:auto; margin-bottom:auto;">
<div class="slds-form-element">
<div class="slds-form-element__control">
Expand All @@ -51,6 +52,7 @@
</div>
</div>
</div>
{/if}
</nav>
{/function}

Expand Down
1 change: 1 addition & 0 deletions build/changeSets/DefineGlobalVariables.php
Expand Up @@ -63,6 +63,7 @@ public function applyChange() {
'Application_Announcement',
'Application_Display_World_Clock',
'Application_Display_Mini_Calendar',
'Application_Display_QuickCreate',
'Application_Use_RTE',
'Application_RTESpellcheck',
'Application_Default_Action',
Expand Down
6 changes: 6 additions & 0 deletions modules/GlobalVariable/language/en_us.gvdefs.php
Expand Up @@ -208,6 +208,12 @@
'values' => '0 | 1',
'definition' => 'Show or Hide mini Calendar widget in toolbar',
),
'Application_Display_QuickCreate' => array(
'valuetype' => 'Boolean',
'category' => 'Application',
'values' => '0 | 1',
'definition' => 'Show or Hide Quick Create options in menu',
),
'Application_Use_RTE' => array(
'valuetype' => 'Boolean',
'category' => 'Application',
Expand Down
6 changes: 6 additions & 0 deletions modules/GlobalVariable/language/es_es.gvdefs.php
Expand Up @@ -208,6 +208,12 @@
'values' => '0 | 1',
'definition' => 'Mostrar o Esconder el Calendario en la barra de herramientas',
),
'Application_Display_QuickCreate' => array(
'valuetype' => 'Booleano',
'category' => 'Aplicación',
'values' => '0 | 1',
'definition' => 'Mostrar o Esconder las opciones de Creación Rápida en el menú',
),
'Application_Use_RTE' => array(
'valuetype' => 'Booleano',
'category' => 'Aplicación',
Expand Down
6 changes: 6 additions & 0 deletions modules/GlobalVariable/language/fr_fr.gvdefs.php
Expand Up @@ -208,6 +208,12 @@
'values' => '0 | 1',
'definition' => 'Montre (1) ou cache (0) le widget calendrier dans la barre d\'outils. La valeur par défaut est (1).',
),
'Application_Display_QuickCreate' => array(
'valuetype' => 'Boolean',
'category' => 'Application',
'values' => '0 | 1',
'definition' => 'Show or Hide Quick Create options in menu',
),
'Application_Use_RTE' => array(
'valuetype' => 'Booléen',
'category' => 'Application',
Expand Down
1 change: 1 addition & 0 deletions modules/Vtiger/header.php
Expand Up @@ -31,6 +31,7 @@
return (strtolower($a[0]) < strtolower($b[0])) ? -1 : 1;
});
$smarty->assign('QCMODULE', $qc_modules);
$smarty->assign('SHOWQUICKCREATE', (count($qc_modules) && GlobalVariable::getVariable('Application_Display_QuickCreate', 1)));
$smarty->assign('APP', $app_strings);
$smarty->assign('LBL_CHARSET', $default_charset);
$cnt = count($qc_modules);
Expand Down

0 comments on commit 1062eab

Please sign in to comment.