Skip to content

Commit

Permalink
Merge branch '2024_rc' into 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Sep 1, 2024
2 parents b2d04a8 + 4795328 commit 7f48f4d
Show file tree
Hide file tree
Showing 14 changed files with 167 additions and 43 deletions.
7 changes: 4 additions & 3 deletions .easya_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dol_min": 18,
"dol_max": 19,
"php_min": 7
"dlb_min_version": 18,
"dlb_max_version": 18,
"php_min_version": 7.0,
"php_max_version": 8.2
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Changelog ##

### Version 3.0.5 - Compatibility 14.0.x - 20.0.x (2024/09/01)
- Fix Z-index with option FIX_AREAREF_TABACTION activated
- Add Use specific landing page to home menu entry (Thanks Christophe from Altairis)
- Fix display of new dropdown action button

### Version 3.0.4 - Compatibility 14.0.x - 20.0.x (2024/07/03)
- Add CSS for drag & drop card feature
- Fix menu orders (customer and supplier), problem on search_billed
- If Easya version detected, force json information for dlb_min_version & php_min_version

### Version 3.0.3 - Compatibility 14.0.x - 20-alpha (2024/05/24)
- Fix Contract expired services menu link (From Dolibarr 18.0.x)
- FIX can not show group when MULTICOMPANY_TRANSVERSE_MODE
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
3.0.5
18 changes: 15 additions & 3 deletions admin/colors.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/************************************************
* Copyright (C) 2015-2022 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2023 Sylvain Legrand <contact@infras.fr>
* Copyright (C) 2015-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2023-2024 Sylvain Legrand <contact@infras.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -86,7 +86,9 @@
'OBLYON_COLOR_FLINE_HOVER',
'OBLYON_COLOR_FDATE_DEFAULT',
'OBLYON_COLOR_TEXTTABACTIVE',
'OBLYON_COLOR_INPUT_BCKGRD'
'OBLYON_COLOR_INPUT_BCKGRD',
'OBLYON_COLOR_INFOBOX_BCKGRD1',
'OBLYON_COLOR_INFOBOX_BCKGRD2'
),
'eldy' => array('THEME_ELDY_TOPBORDER_TITLE1',
'THEME_ELDY_BACKTITLE1',
Expand Down Expand Up @@ -145,6 +147,8 @@
'OBLYON_COLOR_FDATE_DEFAULT' => '#FF0000',
'OBLYON_COLOR_TEXTTABACTIVE' => '#222222',
'OBLYON_COLOR_INPUT_BCKGRD' => '#FFFFFF',
'OBLYON_COLOR_INFOBOX_BCKGRD1' => '#444444',
'OBLYON_COLOR_INFOBOX_BCKGRD2' => '#E4EFE8',
'THEME_INVERT_RATIO_FILTER' => '0',
'THEME_ELDY_TOPBORDER_TITLE1' => '#FFFFFF',
'THEME_ELDY_BACKTITLE1' => '#E9EAED',
Expand Down Expand Up @@ -202,6 +206,8 @@
'OBLYON_COLOR_FDATE_DEFAULT' => '#FF0000',
'OBLYON_COLOR_TEXTTABACTIVE' => '#222222',
'OBLYON_COLOR_INPUT_BCKGRD' => '#FFFFFF',
'OBLYON_COLOR_INFOBOX_BCKGRD1' => '#444444',
'OBLYON_COLOR_INFOBOX_BCKGRD2' => '#E4EFE8',
'THEME_INVERT_RATIO_FILTER' => '80',
'THEME_ELDY_TOPBORDER_TITLE1' => '#FFFFFF',
'THEME_ELDY_BACKTITLE1' => '#E9EAED',
Expand Down Expand Up @@ -259,6 +265,8 @@
'OBLYON_COLOR_FDATE_DEFAULT' => '#FF0000',
'OBLYON_COLOR_TEXTTABACTIVE' => '#222222',
'OBLYON_COLOR_INPUT_BCKGRD' => '#FFFFFF',
'OBLYON_COLOR_INFOBOX_BCKGRD1' => '#444444',
'OBLYON_COLOR_INFOBOX_BCKGRD2' => '#E4EFE8',
'THEME_INVERT_RATIO_FILTER' => '0',
'THEME_ELDY_TOPBORDER_TITLE1' => '#FFFFFF',
'THEME_ELDY_BACKTITLE1' => '#E9EAED',
Expand Down Expand Up @@ -316,6 +324,8 @@
'OBLYON_COLOR_FDATE_DEFAULT' => '#FF0000',
'OBLYON_COLOR_TEXTTABACTIVE' => '#222222',
'OBLYON_COLOR_INPUT_BCKGRD' => '#DEDEDE',
'OBLYON_COLOR_INFOBOX_BCKGRD1' => '#444444',
'OBLYON_COLOR_INFOBOX_BCKGRD2' => '#E4EFE8',
'THEME_INVERT_RATIO_FILTER' => '0',
'THEME_ELDY_TOPBORDER_TITLE1' => '#FFFFFF',
'THEME_ELDY_BACKTITLE1' => '#E9EAED',
Expand Down Expand Up @@ -373,6 +383,8 @@
'OBLYON_COLOR_FDATE_DEFAULT' => '#FF0000',
'OBLYON_COLOR_TEXTTABACTIVE' => '#222222',
'OBLYON_COLOR_INPUT_BCKGRD' => '#F4F4F4',
'OBLYON_COLOR_INFOBOX_BCKGRD1' => '#444444',
'OBLYON_COLOR_INFOBOX_BCKGRD2' => '#E4EFE8',
'THEME_INVERT_RATIO_FILTER' => '0',
'THEME_ELDY_TOPBORDER_TITLE1' => '#FFFFFF',
'THEME_ELDY_BACKTITLE1' => '#E9EAED',
Expand Down
29 changes: 22 additions & 7 deletions core/menus/standard/oblyon.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
$mainmenu = (empty($_SESSION["mainmenu"]) ? '' : $_SESSION["mainmenu"]);
$leftmenu = (empty($_SESSION["leftmenu"]) ? '' : $_SESSION["leftmenu"]);

$landingpage = (!getDolUserString('MAIN_LANDING_PAGE') ? (!getDolGlobalString('MAIN_LANDING_PAGE') ? '' : getDolGlobalString('MAIN_LANDING_PAGE')) : getDolUserString('MAIN_LANDING_PAGE'));
if (! empty($landingpage)) {
$landingpage = dol_buildpath($landingpage, 1);
} else {
$landingpage = DOL_URL_ROOT . '/index.php?mainmenu=home&amp;leftmenu=home';
}

$id = 'mainmenu';
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);

Expand Down Expand Up @@ -84,7 +91,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no


print '<div class="center backgroundforcompanylogo menulogocontainer">';
print '<a href="'.DOL_URL_ROOT.'" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'">';
print '<a href="' . DOL_URL_ROOT . $landingpage . '" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'">';
print '<img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 100px; height: 32px;">';
print '</a>'."\n";
print '</div>'."\n";
Expand Down Expand Up @@ -146,9 +153,9 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
$chaine=$langs->trans("Home");

if (empty($noout)) print_start_menu_entry($idsel,$itemsel,$showmode);
if (empty($noout)) print_text_menu_entry($chaine, 1, DOL_URL_ROOT.'/index.php?mainmenu=home&amp;leftmenu=', $id, $idsel, $atarget);
if (empty($noout)) print_text_menu_entry($chaine, 1, $landingpage, $id, $idsel, $atarget);
if (empty($noout)) print_end_menu_entry($showmode);
$menu->add('/index.php?mainmenu=home&amp;leftmenu=', $chaine, 0, $showmode, $atarget, "home", '');
$menu->add($landingpage, $chaine, 0, $showmode, $atarget, "home", '');

// Members
$tmpentry = array(
Expand Down Expand Up @@ -714,6 +721,14 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
print '<div class="pushy-btn" title="'.$langs->trans("ShowLeftMenu").'">&#8801;</div>';
}

// get landing page
$landingpage = (empty($user->conf->MAIN_LANDING_PAGE) ? (!getDolGlobalString('MAIN_LANDING_PAGE') ? '' : $conf->global->MAIN_LANDING_PAGE) : $user->conf->MAIN_LANDING_PAGE);
if (! empty($landingpage)) {
$landingpage = str_replace(DOL_URL_ROOT, '', dol_buildpath($landingpage, 1));
} else {
$landingpage = '/index.php?mainmenu=home&amp;leftmenu=home';
}

// Show logo company
if (! empty($menu_invert) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO)) {
//$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI);
Expand All @@ -737,7 +752,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
print "\n".'<!-- Show logo on menu -->'."\n";

print '<div class="menu_contenu db-menu__society center backgroundforcompanylogo menulogocontainer">';
print '<a href="'.DOL_URL_ROOT.'" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'">';
print '<a href="' . DOL_URL_ROOT . $landingpage . '" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'">';
print '<img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 100px; height: 32px;">';
print '</a>'."\n";
print '</div>'."\n";
Expand Down Expand Up @@ -785,7 +800,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
$langs->load("users");

// Home - dashboard
$newmenu->add("/index.php?mainmenu=home&amp;leftmenu=home", $langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home');
$newmenu->add($landingpage, $langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home');

// Setup
$newmenu->add("/admin/index.php?mainmenu=home&amp;leftmenu=setup", $langs->trans("Setup"), 0, $user->admin, '', $mainmenu, 'setup');
Expand Down Expand Up @@ -1184,7 +1199,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
if (!empty($conf->commande->enabled)) {
$langs->load("orders");
if (!empty($conf->facture->enabled)) {
$newmenu->add("/commande/list.php?leftmenu=orders&amp;search_status=-3&amp;billed=0&amp;contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0);
$newmenu->add("/commande/list.php?leftmenu=orders&amp;search_status=-3&amp;search_billed=0&amp;contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0);
}
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
}
Expand All @@ -1193,7 +1208,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
if (!empty($conf->supplier_invoice->enabled)) {
if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) {
$langs->load("supplier");
$newmenu->add("/fourn/commande/list.php?leftmenu=orders&amp;search_status=5&amp;billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0);
$newmenu->add("/fourn/commande/list.php?leftmenu=orders&amp;search_status=5&amp;search_billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0);
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
}
}
Expand Down
13 changes: 11 additions & 2 deletions core/modules/modOblyon.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function __construct($db)
global $langs, $conf;

$langs->loadLangs(array('oblyon@oblyon', 'inovea@oblyon'));

$easyaVersion = (float) !empty($conf->global->EASYA_VERSION) ? $conf->global->EASYA_VERSION : '';

$this->db = $db;
$this->numero = 432573; // Unique Id for module
$this->name = preg_replace('/^mod/i', '', get_class($this)); // Module label (no space allowed)
Expand Down Expand Up @@ -72,12 +75,18 @@ function __construct($db)
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(7, 4); // Minimum version of PHP required by module
$this->phpmin = array(7, 1); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(14,0); // Minimum version of Dolibarr required by module
if ($easyaVersion >= '2024') {
$easya_info = json_decode(file_get_contents(__DIR__ . '/../../.easya_info.json'));
$this->phpmin = explode('.', $easya_info->php_min_version); // Minimum version of PHP required by module
$this->need_dolibarr_version = explode('.', $easya_info->dlb_min_version); // Minimum version of Dolibarr required by module
}
$this->langfiles = array($this->name.'@'.$this->name);
$this->const = array(); // List of particular constants to add when module is enabled

// WIP - Remove classic Dolibarr tabs to avoid a theme change problem (Only available > 15.0.x)
$easyaVersion = (float) !empty($conf->global->EASYA_VERSION) ? $conf->global->EASYA_VERSION : '';

if ($easyaVersion >= '2022.5.2' || (float) DOL_VERSION >= 16.0) {
$this->tabs = array(
//'ihm_admin:-template',
Expand Down
2 changes: 2 additions & 0 deletions langs/en_US/oblyon.lang
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ OBLYON_COLOR_NOTIF_ERROR_BCKGRD = Color background on notification error mess
OBLYON_COLOR_NOTIF_ERROR_TEXT = Color text on notification error message
OBLYON_COLOR_TEXTTABACTIVE = Color text of active tabs
OBLYON_COLOR_INPUT_BCKGRD = Background color of inputs
OBLYON_COLOR_INFOBOX_BCKGRD1 = Background color 1 of active kanban cards (applications / modules)
OBLYON_COLOR_INFOBOX_BCKGRD2 = Background color 2 of active kanban cards (applications / modules)
InvertRatioDesc = Color Inversion Filter Ratio (Applicable to icons based on PNG image files)
Eldys = Basic colors
THEME_ELDY_TOPBORDER_TITLE1 = Title border color
Expand Down
2 changes: 2 additions & 0 deletions langs/fr_FR/oblyon.lang
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ OBLYON_COLOR_NOTIF_ERROR_BCKGRD = Couleur de fond des notifications d'erreur
OBLYON_COLOR_NOTIF_ERROR_TEXT = Couleur de texte des notifications d'erreur
OBLYON_COLOR_TEXTTABACTIVE = Couleur de texte des onglets actifs
OBLYON_COLOR_INPUT_BCKGRD = Couleur de fond des zones de saisie
OBLYON_COLOR_INFOBOX_BCKGRD1 = Couleur de fond 1 des cartes kanban active (applications / modules)
OBLYON_COLOR_INFOBOX_BCKGRD2 = Couleur de fond 2 des cartes kanban active (applications / modules)
InvertRatioDesc = Ratio du filtre d'inversion des couleurs (Applicable aux icones basées sur des fichiers images PNG)
Eldys = Couleurs de base
THEME_ELDY_TOPBORDER_TITLE1 = Couleur des bordures de titre
Expand Down
6 changes: 4 additions & 2 deletions sql/data.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- /************************************************
-- * Copyright (C) 2015-2022 Alexandre Spangaro <[email protected]>
-- * Copyright (C) 2022 Sylvain Legrand <[email protected]>
-- * Copyright (C) 2015-2024 Alexandre Spangaro <[email protected]>
-- * Copyright (C) 2022-2024 Sylvain Legrand <[email protected]>
-- *
-- * This program is free software: you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -96,6 +96,8 @@ INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('OBLYON
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('OBLYON_COLOR_FDATE_DEFAULT', '__ENTITY__', '#FF0000', 'chaine', '0', 'Oblyon text default date (today) color');
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('OBLYON_COLOR_TEXTTABACTIVE', '__ENTITY__', '#222222', 'chaine', '0', 'Oblyon text tab active');
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('OBLYON_COLOR_INPUT_BCKGRD', '__ENTITY__', '#FFFFFF', 'chaine', '0', 'Oblyon background imput color');
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('OBLYON_COLOR_INFOBOX_BCKGRD1', '__ENTITY__', '#444444', 'chaine', '0', 'Oblyon Background color 1 of active kanban cards');
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('OBLYON_COLOR_INFOBOX_BCKGRD2', '__ENTITY__', '#E4EFE8', 'chaine', '0', 'Oblyon Background color 1 of active kanban cards');
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('THEME_INVERT_RATIO_FILTER', '__ENTITY__', '0', 'chaine', '0', 'Oblyon Ratio for invert filter');
-- Color - Default Eldy values
INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('THEME_ELDY_TOPBORDER_TITLE1', '__ENTITY__', '#D4D4D4', 'chaine', '0', 'Oblyon module');
Expand Down
Loading

0 comments on commit 7f48f4d

Please sign in to comment.