Skip to content

Commit

Permalink
NEW: Param to show main menu logo in color look and feel (#29305)
Browse files Browse the repository at this point in the history
* NEW: Param to show main menu logo in color look and feel

* Update ChangeLog

---------

Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
  • Loading branch information
BB2A-Anthony and Anthony Berton authored Apr 28, 2024
1 parent a08714e commit 499a493
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ English Dolibarr ChangeLog
For users:
----------
NEW: Compatibility with PHP 8.2 (with no need to disable warnings)
NEW: Font param Look and Feel THEME_FONT_FAMILY
NEW: Font param Look and Feel THEME_FONT_FAMILY (#29302)
NEW: Param to show main menu logo in color (#29305)
...

For developers or integrators:
Expand Down
17 changes: 17 additions & 0 deletions htdocs/core/lib/usergroups.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,23 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print "</tr>";*/
}

// Main menu color logo
if ($foruserprofile) {
// Nothing
} else {
// Show logo
print '<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans("THEME_MENU_COLORLOGO").'</td>';
print '<td colspan="'.($colspan - 1).'" class="valignmiddle">';
if ($edit) {
print ajax_constantonoff('THEME_MENU_COLORLOGO', array(), null, 0, 0, 1);
} else {
print yn(getDolGlobalString('THEME_MENU_COLORLOGO'));
}
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes"), 1, 'help', 'inline-block');
print '</td>';
print '</tr>';
}

// BorderTableActive
if ($foruserprofile) {
} else {
Expand Down
3 changes: 2 additions & 1 deletion htdocs/langs/en_US/admin.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,8 @@ BackgroundImageLogin=Background image
PermanentLeftSearchForm=Permanent search form on left menu
DefaultLanguage=Default language
EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships
EnableShowLogo=Show the company logo in the menu
EnableShowLogo=Show the company logos in the menu
THEME_MENU_COLORLOGO=Show main menu logo in color
CompanyInfo=Company/Organization
CompanyIds=Company/Organization identities
CompanyAddress=Address
Expand Down
6 changes: 5 additions & 1 deletion htdocs/theme/eldy/main_menu_fa_icons.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@
margin-left: 30px;
}
.tmenu span.fas, .tmenu span.far {
color: unset !important;
<?php
if (!getDolGlobalString('THEME_MENU_COLORLOGO')) {
echo "color: unset !important;";
}
?>;
line-height: 28px;
text-align: center;
}
Expand Down
6 changes: 5 additions & 1 deletion htdocs/theme/md/main_menu_fa_icons.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@
}

.tmenu span.fas, .tmenu span.far {
color: unset !important;
<?php
if (!getDolGlobalString('THEME_MENU_COLORLOGO')) {
echo "color: unset !important;";
}
?>;
line-height: 28px;
text-align: center;
}
Expand Down

0 comments on commit 499a493

Please sign in to comment.