-
Notifications
You must be signed in to change notification settings - Fork 2
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 #12 from Evarisk/develop
1.0.0
- Loading branch information
Showing
28 changed files
with
1,585 additions
and
2 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,19 @@ | ||
# EditorConfig is awesome: https://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.php] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Generate Auto Changelog' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
master: | ||
name: 'build' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate Auto Changelog | ||
uses: Evarisk/action-auto-changelog@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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,22 @@ | ||
# Generated binaries | ||
/build/*.zip | ||
/bin/*.zip | ||
# Doxygen generated documentation | ||
/build/doxygen/doxygen_warnings.log | ||
/doc/code/doxygen | ||
# Composer managed dependencies | ||
/vendor | ||
/dev/bin | ||
# PHPdocumentor generated files | ||
/build/phpdoc | ||
/doc/code/phpdoc | ||
# Sphinx generated files | ||
/doc/user/build | ||
/.settings/ | ||
/.buildpath | ||
/.project | ||
# Other | ||
*.back | ||
/.gitattributes | ||
node_modules | ||
package-lock.json |
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,2 +1,53 @@ | ||
# digiboard | ||
Tableau de bord pour les applications DigiRisk, DigiQuali et bien plus ... | ||
# DigiBoard sur [DOLIBARR ERP CRM](https://dolibarr.org) | ||
|
||
## Informations | ||
|
||
- Numéro du module : 436320 | ||
- Dernière mise à jour : 11/10/2024 | ||
- Éditeur : [Evarisk](https://evarisk.com) | ||
- Thème : Eldy Menu | ||
- Licence : GPLv3 | ||
- Disponible sur : Windows - MacOS - Linux | ||
|
||
### Version | ||
|
||
- Version : 1.0.0 | ||
- PHP : 7.4.33 | ||
- Compatibilité : Dolibarr 19.0.3 - 20.0.0 | ||
- Saturne Framework : 1.7.0 | ||
|
||
## Liens | ||
|
||
- Support & Assistance : [Forum dolibarr.fr](https://dolibarr.fr) / Par mail à [email protected] | ||
- Demo : [Demo DigiBoard](https://demodoli.digirisk.com) - ID: demo - Password: demo | ||
- Documentation : [Wiki DigiBoard](https://wiki.dolibarr.org/index.php/Module_DigiBoard) | ||
- Projet Github : [Projet DigiBoard](https://github.com/Evarisk/digiboard/projects?query=is%3Aopen) | ||
- Saturne Framework : [Télécharger Saturne](https://dolistore.com/fr/modules/1906-Saturne.html) | ||
- D'autres modules développés par Evarisk disponibles sur [Dolistore.com](https://dolistore.com) | ||
|
||
## Fonctionnalités | ||
|
||
- Tableau de bord pour les applications DigiRisk, DigiQuali et bien plus ... | ||
|
||
## Traductions | ||
|
||
- Français | ||
- Anglais | ||
|
||
## Installation | ||
|
||
### Méthode 1 : | ||
|
||
- Depuis le menu "Déployer/Installer un module externe" de Dolibarr : | ||
- Glisser l'archive ZIP 'module_digiboard-X.Y.Z' et cliquer sur "ENVOYER FICHIER" | ||
- Glisser l'archive ZIP 'module_saturne-X.Y.Z' et cliquer sur "ENVOYER FICHIER" | ||
- Activer le module dans la liste des Modules/Applications installés | ||
|
||
### Méthode 2 : | ||
|
||
- Dans le dossier "dolibarr/htdocs/custom" copier la ligne suivante : | ||
``` | ||
git clone https://github.com/Evarisk/digiboard.git | ||
git clone https://github.com/Evarisk/saturne.git | ||
``` | ||
- Activer le module dans la liste des Modules/Applications installés |
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,2 @@ | ||
<?php | ||
//Silence is golden |
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,78 @@ | ||
<?php | ||
/* Copyright (C) 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 | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* \file admin/setup.php | ||
* \ingroup digiboard | ||
* \brief DigiBoard setup page | ||
*/ | ||
|
||
// Load DigiBoard environment | ||
if (file_exists('../digiboard.main.inc.php')) { | ||
require_once __DIR__ . '/../digiboard.main.inc.php'; | ||
} elseif (file_exists('../../digiboard.main.inc.php')) { | ||
require_once __DIR__ . '/../../digiboard.main.inc.php'; | ||
} else { | ||
die('Include of digiboard main fails'); | ||
} | ||
|
||
// Load DigiBoard libraries | ||
require_once __DIR__ . '/../lib/digiboard.lib.php'; | ||
|
||
// Global variables definitions | ||
global $conf, $db, $langs, $user; | ||
|
||
// Load translation files required by the page | ||
saturne_load_langs(); | ||
|
||
// Get parameters | ||
$action = GETPOST('action', 'alpha'); | ||
|
||
// Security check - Protection if external user | ||
$permissionToRead = $user->hasRight('digiboard', 'adminpage', 'read'); | ||
saturne_check_access($permissionToRead); | ||
|
||
/* | ||
* View | ||
*/ | ||
|
||
$title = $langs->trans('ModuleSetup', 'DigiBoard'); | ||
$help_url = 'FR:Module_DigiBoard'; | ||
|
||
saturne_header(0,'', $title, $help_url); | ||
|
||
// Subheader | ||
$linkBack = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1' . '">' . $langs->trans('BackToModuleList') . '</a>'; | ||
print load_fiche_titre($title, $linkBack, 'title_setup'); | ||
|
||
// Configuration header | ||
$head = digiboard_admin_prepare_head(); | ||
print dol_get_fiche_head($head, 'settings', $title, -1, 'digiboard_color@digiboard'); | ||
|
||
$constArray['digiboard'] = [ | ||
'DIGIBOARD_DIGIRISIK_STATS_LOAD_ACCIDENT' => [ | ||
'name' => 'DigiRiskStatsLoadAccident', | ||
'description' => 'DigiRiskStatsLoadAccidentDescription', | ||
'code' => 'DIGIBOARD_DIGIRISIK_STATS_LOAD_ACCIDENT', | ||
] | ||
]; | ||
require __DIR__ . '/../../saturne/core/tpl/admin/object/object_const_view.tpl.php'; | ||
|
||
// Page end | ||
print dol_get_fiche_end(); | ||
$db->close(); | ||
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
### Changelog |
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,101 @@ | ||
<?php | ||
/* Copyright (C) 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 | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* \file class/actions_digiboard.class.php | ||
* \ingroup digiboard | ||
* \brief DigiBoard hook overload | ||
*/ | ||
|
||
/** | ||
* Class ActionsDigiboard | ||
*/ | ||
class ActionsDigiboard | ||
{ | ||
/** | ||
* @var DoliDB Database handler | ||
*/ | ||
public DoliDB $db; | ||
|
||
/** | ||
* @var string Error code (or message) | ||
*/ | ||
public string $error = ''; | ||
|
||
/** | ||
* @var array Errors. | ||
*/ | ||
public array $errors = []; | ||
|
||
/** | ||
* @var array Hook results. Propagated to $hookmanager->resArray for later reuse | ||
*/ | ||
public array $results = []; | ||
|
||
/** | ||
* @var string|null String displayed by executeHook() immediately after return | ||
*/ | ||
public ?string $resprints; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param DoliDB $db Database handler | ||
*/ | ||
public function __construct(DoliDB $db) | ||
{ | ||
$this->db = $db; | ||
} | ||
|
||
/** | ||
* Overloading the addHtmlHeader function : replacing the parent's function with the one below | ||
* | ||
* @param array $parameters Hook metadata (context, etc...) | ||
* @return int 0 < on error, 0 on success, 1 to replace standard code | ||
*/ | ||
public function addHtmlHeader(array $parameters): int | ||
{ | ||
if (strpos($parameters['context'], 'digiboardindex') !== false) { | ||
$resourcesRequired = [ | ||
'css' => '/custom/digiriskdolibarr/css/digiriskdolibarr.min.css', | ||
]; | ||
|
||
$out = '<!-- Includes CSS added by module digiriskdolibarr -->'; | ||
$out .= '<link rel="stylesheet" type="text/css" href="' . dol_buildpath($resourcesRequired['css'], 1) . '">'; | ||
|
||
$this->resprints = $out; | ||
} | ||
|
||
return 0; // or return 1 to replace standard code | ||
} | ||
|
||
/** | ||
* Overloading the printUserListWhere function : replacing the parent's function with the one below | ||
* | ||
* @param array $parameters Hook metadata (context, etc...) | ||
* @return int 0 < on error, 0 on success, 1 to replace standard code | ||
*/ | ||
public function printUserListWhere(array $parameters): int | ||
{ | ||
if (strpos($parameters['context'], 'digiboardindex') !== false) { | ||
$this->resprints = ' WHERE 1 = 1'; | ||
return 1; | ||
} | ||
|
||
return 0; // or return 1 to replace standard code | ||
} | ||
} |
Oops, something went wrong.