-
Notifications
You must be signed in to change notification settings - Fork 12
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 #108 from Eoxia/1.2.0
1.3.0
- Loading branch information
Showing
32 changed files
with
6,816 additions
and
185 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
# DOLIPROJECT POUR [DOLIBARR ERP CRM](https://www.dolibarr.org) | ||
|
||
## Informations | ||
|
||
Version du module: 1.3.0 | ||
|
||
Dernière mise à jour: 18/08/2022 | ||
|
||
Prérequis: | ||
* Dolibarr min version 14.0.0 | ||
* Dolibarr min version 15.0.3 | ||
|
||
Thème: Eldy Menu | ||
|
||
Editeur/Licence: [Eoxia](https://www.eoxia.com) / GPL-v3 | ||
|
||
Assitance: [Forum www.dolibarr.fr](https://www.dolibarr.fr) / Par mail à [email protected] | ||
|
||
Demo: [Demo DoliProject](https://www.doliproject.projetm.com) - ID: demo - Password: demo | ||
|
||
Documentation: [Wiki DoliProject](https://wiki.dolibarr.org/index.php/Module_DoliProject) | ||
|
||
## Fonctionnalités | ||
|
||
- Module ajoutant la possibilité de simplifier la création de tâche liée à un projet à partir d'une facture. | ||
|
@@ -10,12 +30,12 @@ | |
# Méthode 1 : | ||
|
||
- Depuis le menu "Déployer/Installer un module externe" de Dolibarr : | ||
- Glisser l'archive ZIP 'module_doliproject-1.1.0' et cliquer sur "SEND" | ||
- Glisser l'archive ZIP 'module_doliproject-1.2.0' et cliquer sur "SEND" | ||
- 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/Eoxia/doliproject.git | ||
``` | ||
``` |
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,217 @@ | ||
<?php | ||
/* Copyright (C) 2004-2017 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2020 SuperAdmin | ||
* | ||
* 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 doliproject/admin/about.php | ||
* \ingroup doliproject | ||
* \brief About page of module Doliproject. | ||
*/ | ||
|
||
// Load Dolibarr environment | ||
$res = 0; | ||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) | ||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; | ||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME | ||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; | ||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } | ||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; | ||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; | ||
// Try main.inc.php using relative path | ||
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; | ||
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; | ||
if (!$res) die("Include of main fails"); | ||
|
||
// Libraries | ||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; | ||
require_once DOL_DOCUMENT_ROOT . "/core/class/html.formother.class.php"; | ||
require_once DOL_DOCUMENT_ROOT . "/core/class/html.formprojet.class.php"; | ||
|
||
require_once '../lib/doliproject.lib.php'; | ||
|
||
// Translations | ||
$langs->loadLangs(array("errors", "admin", "doliproject@doliproject")); | ||
|
||
// Access control | ||
if (!$user->admin) accessforbidden(); | ||
|
||
// Parameters | ||
$action = GETPOST('action', 'alpha'); | ||
$backtopage = GETPOST('backtopage', 'alpha'); | ||
|
||
|
||
/* | ||
* Actions | ||
*/ | ||
|
||
if (($action == 'update' && ! GETPOST("cancel", 'alpha')) || ($action == 'updateedit')) { | ||
$HRProject = GETPOST('HRProject', 'none'); | ||
$HRProject = preg_split('/_/', $HRProject); | ||
|
||
dolibarr_set_const($db, "DOLIPROJECT_HR_PROJECT", $HRProject[0], 'integer', 0, '', $conf->entity); | ||
setEventMessages($langs->transnoentities('TicketProjectUpdated'), array()); | ||
|
||
if ($action != 'updateedit' && ! $error) { | ||
header("Location: " . $_SERVER["PHP_SELF"]); | ||
exit; | ||
} | ||
} | ||
|
||
if ($action == 'updateThemeColor') { | ||
$val = (implode(',', (colorStringToArray(GETPOST('DOLIPROJECT_EXCEEDED_TIME_SPENT_COLOR'), array())))); | ||
if ($val == '') { | ||
dolibarr_del_const($db, 'DOLIPROJECT_EXCEEDED_TIME_SPENT_COLOR', $conf->entity); | ||
} else { | ||
dolibarr_set_const($db, 'DOLIPROJECT_EXCEEDED_TIME_SPENT_COLOR', $val, 'chaine', 0, '', $conf->entity); | ||
} | ||
|
||
$val = (implode(',', (colorStringToArray(GETPOST('DOLIPROJECT_NOT_EXCEEDED_TIME_SPENT_COLOR'), array())))); | ||
if ($val == '') { | ||
dolibarr_del_const($db, 'DOLIPROJECT_NOT_EXCEEDED_TIME_SPENT_COLOR', $conf->entity); | ||
} else { | ||
dolibarr_set_const($db, 'DOLIPROJECT_NOT_EXCEEDED_TIME_SPENT_COLOR', $val, 'chaine', 0, '', $conf->entity); | ||
} | ||
|
||
$val = (implode(',', (colorStringToArray(GETPOST('DOLIPROJECT_PERFECT_TIME_SPENT_COLOR'), array())))); | ||
if ($val == '') { | ||
dolibarr_del_const($db, 'DOLIPROJECT_PERFECT_TIME_SPENT_COLOR', $conf->entity); | ||
} else { | ||
dolibarr_set_const($db, 'DOLIPROJECT_PERFECT_TIME_SPENT_COLOR', $val, 'chaine', 0, '', $conf->entity); | ||
} | ||
} | ||
|
||
/* | ||
* View | ||
*/ | ||
|
||
$form = new Form($db); | ||
$formother = new FormOther($db); | ||
if ( ! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } | ||
|
||
$page_name = "DoliprojectAbout"; | ||
llxHeader('', $langs->trans($page_name)); | ||
|
||
// Subheader | ||
$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>'; | ||
|
||
print load_fiche_titre($langs->trans($page_name), $linkback, 'object_doliproject@doliproject'); | ||
|
||
// Configuration header | ||
$head = doliprojectAdminPrepareHead(); | ||
dol_fiche_head($head, 'projecttasks', '', -1, 'doliproject@doliproject'); | ||
dol_get_fiche_head($head, 'projecttasks', '', -1, 'doliproject@doliproject'); | ||
|
||
// Project | ||
print load_fiche_titre($langs->transnoentities("HRProject"), '', ''); | ||
|
||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '" name="project_form">'; | ||
print '<input type="hidden" name="token" value="' . newToken() . '">'; | ||
print '<input type="hidden" name="action" value="update">'; | ||
print '<table class="noborder centpercent editmode">'; | ||
print '<tr class="liste_titre">'; | ||
print '<td>' . $langs->transnoentities("Name") . '</td>'; | ||
print '<td>' . $langs->transnoentities("SelectProject") . '</td>'; | ||
print '<td>' . $langs->transnoentities("Action") . '</td>'; | ||
print '</tr>'; | ||
|
||
if ( ! empty($conf->projet->enabled)) { | ||
$langs->load("projects"); | ||
print '<tr class="oddeven"><td><label for="TSProject">' . $langs->transnoentities("HRProject") . '</label></td><td>'; | ||
$numprojet = $formproject->select_projects(0, $conf->global->DOLIPROJECT_HR_PROJECT, 'HRProject', 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 'maxwidth500'); | ||
print ' <a href="' . DOL_URL_ROOT . '/projet/card.php?&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle" title="' . $langs->transnoentities("AddProject") . '"></span></a>'; | ||
print '<td><input type="submit" class="button" name="save" value="' . $langs->transnoentities("Save") . '">'; | ||
print '</td></tr>'; | ||
} | ||
|
||
print '</table>'; | ||
print '</form>'; | ||
|
||
//Time spent | ||
print load_fiche_titre($langs->transnoentities("TimeSpent"), '', ''); | ||
|
||
print '<table class="noborder centpercent editmode">'; | ||
|
||
print '<tr class="liste_titre">'; | ||
print '<td>' . $langs->transnoentities("Parameters") . '</td>'; | ||
print '<td class="center">' . $langs->transnoentities("Status") . '</td>'; | ||
print '<td class="center">' . $langs->transnoentities("Action") . '</td>'; | ||
print '<td class="center">' . $langs->transnoentities("ShortInfo") . '</td>'; | ||
print '</tr>'; | ||
|
||
print '<tr class="oddeven"><td>' . $langs->transnoentities("SpendMoreTimeThanPlanned") . '</td>'; | ||
print '<td class="center">'; | ||
print ajax_constantonoff('DOLIPROJECT_SPEND_MORE_TIME_THAN_PLANNED'); | ||
print '</td>'; | ||
print '<td class="center">'; | ||
print ''; | ||
print '</td>'; | ||
print '<td class="center">'; | ||
print $form->textwithpicto('', $langs->transnoentities("SpendMoreTimeThanPlannedHelp"), 1, 'help'); | ||
print '</td>'; | ||
print '</tr>'; | ||
|
||
print '</table>'; | ||
|
||
//Theme dasboard time spent | ||
print load_fiche_titre($langs->transnoentities("ThemeDashboardTimeSpent"), '', ''); | ||
|
||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '" name="color_form">'; | ||
print '<input type="hidden" name="token" value="' . newToken() . '">'; | ||
print '<input type="hidden" name="action" value="updateThemeColor">'; | ||
print '<table class="noborder centpercent editmode">'; | ||
|
||
print '<tr class="liste_titre">'; | ||
print '<td>' . $langs->transnoentities("Parameters") . '</td>'; | ||
print '<td class="center">' . $langs->transnoentities("Value") . '</td>'; | ||
print '</tr>'; | ||
|
||
print '<tr class="oddeven">'; | ||
print '<td>'.$langs->trans("ExceededTimeSpentColor").'</td>'; | ||
print '<td>'; | ||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->DOLIPROJECT_EXCEEDED_TIME_SPENT_COLOR) ? $conf->global->DOLIPROJECT_EXCEEDED_TIME_SPENT_COLOR : ''), array()), ''), 'DOLIPROJECT_EXCEEDED_TIME_SPENT_COLOR', '', 1, '', '', 'doliprojectexceededtimespentcolor'); | ||
print '<span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>#FF0000</strong>'; | ||
print '</td>'; | ||
print '</tr>'; | ||
|
||
print '<tr class="oddeven">'; | ||
print '<td>'.$langs->trans("NotExceededTimeSpentColor").'</td>'; | ||
print '<td>'; | ||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->DOLIPROJECT_NOT_EXCEEDED_TIME_SPENT_COLOR) ? $conf->global->DOLIPROJECT_NOT_EXCEEDED_TIME_SPENT_COLOR : ''), array()), ''), 'DOLIPROJECT_NOT_EXCEEDED_TIME_SPENT_COLOR', '', 1, '', '', 'doliprojectnotexceededtimespentcolor'); | ||
print '<span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>#FFA500</strong>'; | ||
print '</td>'; | ||
print '</tr>'; | ||
|
||
print '<tr class="oddeven">'; | ||
print '<td>'.$langs->trans("PerfectTimeSpentColor").'</td>'; | ||
print '<td>'; | ||
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->DOLIPROJECT_PERFECT_TIME_SPENT_COLOR) ? $conf->global->DOLIPROJECT_PERFECT_TIME_SPENT_COLOR : ''), array()), ''), 'DOLIPROJECT_PERFECT_TIME_SPENT_COLOR', '', 1, '', '', 'doliprojectperfecttimespentcolor'); | ||
print '<span class="nowraponall opacitymedium">'.$langs->trans("Default").'</span>: <strong>#008000</strong>'; | ||
print '</td>'; | ||
print '</tr>'; | ||
|
||
print '</table>'; | ||
|
||
print '<div class="center">'; | ||
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">'; | ||
print '</div>'; | ||
|
||
print '</form>'; | ||
|
||
// Page end | ||
llxFooter(); | ||
$db->close(); |
Oops, something went wrong.