Skip to content

Commit

Permalink
Fix logo background and hidden conf
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-john committed Oct 11, 2019
1 parent e7f56b6 commit 13115a5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
9 changes: 8 additions & 1 deletion htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -480,6 +480,12 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
{
$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI);
$mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI);

$logoContainerAdditionalClass = 'backgroundforcompanylogo';
if(!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_NO_BACKGROUND)){
$logoContainerAdditionalClass = '';
}

if (! empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini);
Expand All @@ -497,7 +503,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
print "\n".'<!-- Show logo on menu -->'."\n";
print_start_menu_entry('companylogo', 'class="tmenu tmenucompanylogo"', 1);

print '<div class="center backgroundforcompanylogo"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 100px"></div>'."\n";

print '<div class="center '.$logoContainerAdditionalClass.' menu-logo-container"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 100px"></div>'."\n";

print_end_menu_entry(4);
}
Expand Down
10 changes: 6 additions & 4 deletions htdocs/theme/eldy/global.inc.php
Expand Up @@ -1085,19 +1085,21 @@
{
border-bottom: 0 !important;
}
.backgroundforcompanylogo {
.menu-logo-container {
margin: <?php echo $disableimages?'0':'6'; ?>px;
margin-left: 8px;
margin-right: 8px;
background-color: rgba(255,255,255,0.7);
padding: 0;
border-radius: 5px;
height: <?php echo $disableimages?'20':'32'; ?>px;
/* width: 100px; */
max-width: 100px;
vertical-align: middle;
}
.backgroundforcompanylogo img.mycompany {
.backgroundforcompanylogo {
background-color: rgba(255,255,255,0.7);
border-radius: 5px;
}
.menu-logo-container img.mycompany {
object-fit: contain;
width: inherit;
height: inherit;
Expand Down
10 changes: 6 additions & 4 deletions htdocs/theme/md/style.css.php
Expand Up @@ -2253,19 +2253,21 @@
{
border-bottom: 0 !important;
}
.backgroundforcompanylogo {
.menu-logo-container {
margin: <?php echo $disableimages?'0':'6'; ?>px;
margin-left: 12px;
margin-right: 6px;
background-color: rgba(255,255,255,0.7);
padding: 0;
border-radius: 5px;
height: <?php echo $disableimages?'20':'32'; ?>px;
/* width: 100px; */
max-width: 100px;
vertical-align: middle;
}
.backgroundforcompanylogo img.mycompany {
.backgroundforcompanylogo {
background-color: rgba(255,255,255,0.7);
border-radius: 5px;
}
.menu-logo-container img.mycompany {
object-fit: contain;
width: inherit;
height: inherit;
Expand Down

0 comments on commit 13115a5

Please sign in to comment.