Debug use of widget on Accounting home page

This commit is contained in:
Laurent Destailleur 2019-10-07 14:39:29 +02:00
parent 035da6a711
commit a9c844460b
3 changed files with 31 additions and 19 deletions

View File

@ -64,26 +64,33 @@ if ($conf->accounting->enabled)
{
$step = 0;
$resultboxes=FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
$resultboxes=FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy');
$helpisexpanded = empty($resultboxes['boxactivated']); // If there is no widget, the tooltip help is expanded by default.
$showtutorial = '';
print '<div align="right"><a href="#" id="show_hide">';
print img_picto('', 'chevron-down');
print ' ' . $langs->trans("ShowFAQ");
print '</a></div>';
if (! $helpisexpanded)
{
$showtutorial = '<div align="right"><a href="#" id="show_hide">';
$showtutorial .= img_picto('', 'chevron-down');
$showtutorial .= ' ' . $langs->trans("ShowTutorial");
$showtutorial .= '</a></div>';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#show_hide").click(function () {
jQuery( "#idfaq" ).toggle({
duration: 400,
});
});
});
</script>';
$showtutorial .= '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#show_hide").click(function () {
jQuery( "#idfaq" ).toggle({
duration: 400,
});
});
});
</script>';
}
print '<div class="hideobject" id="idfaq">'; // hideobject is to start hidden
print load_fiche_titre($langs->trans("AccountancyArea"), $showtutorial . $resultboxes['selectboxlist'], 'accountancy');
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
print "<br>\n";
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
print "<br>\n";print "<br>\n";
@ -201,6 +208,8 @@ if ($conf->accounting->enabled)
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."<br>\n";
print "<br>\n";
print '<br>';
print '</div>';
print '<div class="clearboth"></div>';

View File

@ -39,7 +39,10 @@ class InfoBox
if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2)
{
return array(0 => 'Home');
return array(
0 => 'Home',
27 => 'Accountancy Home'
);
}
else
{
@ -71,7 +74,7 @@ class InfoBox
24 => 'expensereportindex',
25 => 'mailingindex',
26 => 'opensurveyindex',
27 => 'accountancyindex'
27 => 'Accountancy Home'
);
}
}

View File

@ -257,7 +257,7 @@ ListOfProductsWithoutAccountingAccount=List of products not bound to any account
ChangeBinding=Change the binding
Accounted=Accounted in ledger
NotYetAccounted=Not yet accounted in ledger
ShowFAQ=Show FAQ
ShowTutorial=Show Tutorial
## Admin
ApplyMassCategories=Apply mass categories