-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1066 from Evarisk/develop
1.6.0
- Loading branch information
Showing
31 changed files
with
2,853 additions
and
1,573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"bitwise": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"esversion": 6, | ||
"forin": true, | ||
"freeze": true, | ||
"latedef": "nofunc", | ||
"maxcomplexity": 10, | ||
"noarg": true, | ||
"nonbsp": true, | ||
"nonew": true, | ||
"undef": true, | ||
"unused": true, | ||
"node": true, | ||
"browser": true, | ||
"jquery": true, | ||
"devel": true, | ||
"strict": "global", | ||
"globals": { | ||
"angular": false, | ||
"module": false, | ||
"require": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
/* Copyright (C) 2021-2023 EVARISK <[email protected]> | ||
/* Copyright (C) 2021-2024 EVARISK <[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 | ||
|
@@ -31,7 +31,10 @@ | |
} | ||
|
||
// Get module parameters | ||
$moduleName = GETPOST('module_name', 'alpha'); | ||
$moduleName = GETPOST('module_name'); | ||
if (dol_strlen($moduleName) > 0 && strpos($moduleName, '#') !== false) { | ||
$moduleName = explode('#', $moduleName)[0]; | ||
} | ||
$moduleNameLowerCase = strtolower($moduleName); | ||
|
||
// Load Dolibarr libraries | ||
|
@@ -234,6 +237,12 @@ | |
|
||
saturne_header(0, '', $title, $help_url); | ||
|
||
?> | ||
<script> | ||
history.replaceState(null, '', window.saturne.toolbox.replaceUrlAnchor()); | ||
</script> | ||
<?php | ||
|
||
$parameters = []; | ||
$reshook = $hookmanager->executeHooks('saturneAdminDocumentData', $parameters); // Note that $action and $object may have been modified by some hooks | ||
if (empty($reshook)) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
/* Copyright (C) 2022-2023 EVARISK <[email protected]> | ||
/* Copyright (C) 2022-2024 EVARISK <[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 | ||
|
@@ -42,18 +42,20 @@ | |
require_once __DIR__ . '/../../' . $moduleNameLowerCase . '/lib/' . $moduleNameLowerCase . '.lib.php'; | ||
|
||
// Global variables definitions | ||
global $conf, $db, $langs, $user; | ||
global $conf, $db, $hookmanager, $langs, $user; | ||
|
||
// Load translation files required by the page | ||
saturne_load_langs(['admin']); | ||
|
||
// Initialize view objects | ||
$form = new Form($db); | ||
|
||
// Get parameters | ||
$action = GETPOST('action', 'alpha'); | ||
$backtopage = GETPOST('backtopage', 'alpha'); | ||
|
||
// Initialize view objects | ||
$form = new Form($db); | ||
|
||
$hookmanager->initHooks(['pwaadmin', 'globalcard']); // Note that conf->hooks_modules contains array | ||
|
||
// Security check - Protection if external user | ||
$permissiontoread = $user->rights->$moduleNameLowerCase->adminpage->read; | ||
saturne_check_access($permissiontoread); | ||
|
@@ -120,6 +122,10 @@ | |
print $form->buttonsSaveCancel('Generate', ''); | ||
print '</form>'; | ||
|
||
$parameters = []; | ||
$hookmanager->executeHooks('saturneAdminPWAAdditionalConfig', $parameters); | ||
print $hookmanager->resPrint; | ||
|
||
// Page end | ||
print dol_get_fiche_end(); | ||
llxFooter(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
/* Copyright (C) 2021-2023 EVARISK <[email protected]> | ||
/* Copyright (C) 2021-2024 EVARISK <[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 | ||
|
@@ -148,9 +148,12 @@ public function show_dashboard(?array $moreParams = []) | |
for ($i = 0; $i < count($dashboardWidget['label']); $i++) { | ||
if (!empty($dashboardWidget['label'][$i])) { | ||
$widget .= '<span class=""><strong>' . $dashboardWidget['label'][$i] . ' : ' . '</strong>'; | ||
if (!empty($dashboardWidget['content'][$i])) { | ||
if (isset($dashboardWidget['content'][$i]) && $dashboardWidget['content'][$i] !== '') { | ||
$widget .= '<span class="classfortooltip badge badge-info">' . $dashboardWidget['content'][$i] . '</span>'; | ||
$widget .= (!empty($dashboardWidget['tooltip'][$i]) ? $form->textwithpicto('', $langs->transnoentities($dashboardWidget['tooltip'][$i])) : '') . '</span>'; | ||
if (isset($dashboardWidget['moreContent'][$i]) && $dashboardWidget['moreContent'][$i] !== '') { | ||
$widget .= $dashboardWidget['moreContent'][$i]; | ||
} | ||
} else { | ||
$widget .= $dashboardWidget['customContent'][$i]; | ||
} | ||
|
Oops, something went wrong.