mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Add gantt diagramm om project module
This commit is contained in:
parent
d2540c7bf4
commit
ad8ab9c7fd
|
|
@ -3,6 +3,7 @@ English Dolibarr ChangeLog
|
|||
***** ChangeLog for 2.9 compared to 2.8 *****
|
||||
|
||||
For users:
|
||||
- New: Add Gant diagramm on project module.
|
||||
- New: Can set a past delay to limit calendar export.
|
||||
- New: Can join files on emailing campaigns.
|
||||
- New: Add statistics on trips and expenses module.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
|
|
@ -63,7 +63,7 @@ if (! empty($_POST["action"]) && $_POST["action"] == 'set')
|
|||
print '<div class="error">'.$langs->trans("ErrorUnknownSyslogConstant",$_POST["facility"]).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($optionlogoutput == "file")
|
||||
{
|
||||
$filelog=$_POST["filename"];
|
||||
|
|
@ -119,7 +119,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|||
print '<input type="hidden" name="action" value="set">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td align="right" colspan="2"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
|
@ -145,7 +145,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|||
print '<input type="hidden" name="action" value="setlevel">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td align="right"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
|
|
|||
|
|
@ -587,69 +587,6 @@ if ($socid > 0)
|
|||
print "</table>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Last linked projects
|
||||
*/
|
||||
// TODO remplacer par une fonction
|
||||
if ($conf->projet->enabled && $user->rights->projet->lire)
|
||||
{
|
||||
print '<table class="noborder" width=100%>';
|
||||
|
||||
$sql = "SELECT p.rowid,p.title,p.ref,p.public, p.dateo as do";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql .= " WHERE p.fk_soc = $objsoc->id";
|
||||
$sql .= " ORDER BY p.dateo DESC";
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
if ($num > 0)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastProjects",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/projet/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllProjects").' ('.$num.')</td></tr></table></td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=true;
|
||||
$i = 0 ;
|
||||
while ($i < $num && $i < $MAXLIST)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$projectstatic->fetch($obj->rowid);
|
||||
|
||||
// To verify role of users
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
if ($user->rights->projet->lire && $userAccess > 0)
|
||||
{
|
||||
$var = !$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
// Ref
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/projet/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.'</a></td>';
|
||||
// Label
|
||||
print '<td>'.$obj->title.'</td>';
|
||||
// Date
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->do),"day").'</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Last linked chronodocs
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -363,69 +363,6 @@ if ($socid > 0)
|
|||
print "</table>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Last linked projects
|
||||
*/
|
||||
// TODO remplacer par une fonction
|
||||
if ($conf->projet->enabled && $user->rights->projet->lire)
|
||||
{
|
||||
print '<table class="noborder" width=100%>';
|
||||
|
||||
$sql = "SELECT p.rowid,p.title,p.ref,p.public, p.dateo as do";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql .= " WHERE p.fk_soc = $societe->id";
|
||||
$sql .= " ORDER BY p.dateo DESC";
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
if ($num > 0)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastProjects",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/projet/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllProjects").' ('.$num.')</td></tr></table></td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=true;
|
||||
$i = 0 ;
|
||||
while ($i < $num && $i < $MAXLIST)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$projectstatic->fetch($obj->rowid);
|
||||
|
||||
// To verify role of users
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
if ($user->rights->projet->lire && $userAccess > 0)
|
||||
{
|
||||
$var = !$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
// Ref
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/projet/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.'</a></td>';
|
||||
// Label
|
||||
print '<td>'.$obj->title.'</td>';
|
||||
// Date
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->do),"day").'</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ Copyright (c) 2009, Shlomy Gantz BlueBrick Inc. All rights reserved.
|
|||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* LDR Modified to replace hard coded values by i18[key]
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -298,24 +301,24 @@ var vVisible = 1;
|
|||
{
|
||||
tmpPer = Math.ceil((this.getEnd() - this.getStart()) / ( 60 * 60 * 1000) );
|
||||
if(tmpPer == 1)
|
||||
vDuration = '1 Hour';
|
||||
vDuration = '1 '+i18n["sHour"];
|
||||
else
|
||||
vDuration = tmpPer + ' Hours';
|
||||
vDuration = tmpPer + ' '+i18n["sHours"];
|
||||
}
|
||||
|
||||
else if (vFormat=='minute')
|
||||
{
|
||||
tmpPer = Math.ceil((this.getEnd() - this.getStart()) / ( 60 * 1000) );
|
||||
if(tmpPer == 1)
|
||||
vDuration = '1 Minute';
|
||||
vDuration = '1 '+i18n["sMinute"];
|
||||
else
|
||||
vDuration = tmpPer + ' Minutes';
|
||||
vDuration = tmpPer + ' '+i18n["sMinutes"];
|
||||
}
|
||||
|
||||
else { //if(vFormat == 'day') {
|
||||
tmpPer = Math.ceil((this.getEnd() - this.getStart()) / (24 * 60 * 60 * 1000) + 1);
|
||||
if(tmpPer == 1) vDuration = '1 Day';
|
||||
else vDuration = tmpPer + ' Days';
|
||||
if(tmpPer == 1) vDuration = '1 '+i18n["sDay"];
|
||||
else vDuration = tmpPer + ' '+i18n["sDays"];
|
||||
}
|
||||
|
||||
//else if(vFormat == 'week') {
|
||||
|
|
@ -481,7 +484,7 @@ var vVisible = 1;
|
|||
* @return {void}
|
||||
*/ this.setVisible = function(pVisible) {vVisible = pVisible; };
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -582,7 +585,9 @@ JSGantt.GanttChart = function(pGanttVar, pDiv, pFormat)
|
|||
var vFormatArr = new Array("day","week","month","quarter");
|
||||
var vQuarterArr = new Array(1,1,1,2,2,2,3,3,3,4,4,4);
|
||||
var vMonthDaysArr = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
|
||||
var vMonthArr = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
|
||||
var vMonthArr = new Array(i18n["January"],i18n["February"],i18n["March"],i18n["April"],i18n["May"],i18n["June"],i18n["July"],i18n["August"],i18n["September"],i18n["October"],i18n["November"],i18n["December"]);
|
||||
|
||||
|
||||
/**
|
||||
* Set current display format (minute/hour/day/week/month/quarter)
|
||||
* Only the first 4 arguments are used, for example:
|
||||
|
|
@ -999,11 +1004,11 @@ Complete-Displays task percent complete</p>
|
|||
' <TD style="BORDER-TOP: #efefef 1px solid; WIDTH: 15px; HEIGHT: 20px"></TD>' +
|
||||
' <TD style="BORDER-TOP: #efefef 1px solid; WIDTH: ' + vNameWidth + 'px; HEIGHT: 20px"><NOBR></NOBR></TD>' ;
|
||||
|
||||
if(vShowRes ==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>Resource</TD>' ;
|
||||
if(vShowDur ==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>Duration</TD>' ;
|
||||
if(vShowComp==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>% Comp.</TD>' ;
|
||||
if(vShowStartDate==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>Start Date</TD>' ;
|
||||
if(vShowEndDate==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>End Date</TD>' ;
|
||||
if(vShowRes ==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>'+i18n["Resource"]+'</TD>' ;
|
||||
if(vShowDur ==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>'+i18n["Duration"]+'</TD>' ;
|
||||
if(vShowComp==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>%</TD>' ;
|
||||
if(vShowStartDate==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>'+i18n["Start_Date"]+'</TD>' ;
|
||||
if(vShowEndDate==1) vLeftTable += ' <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>'+i18n["End_Date"]+'</TD>' ;
|
||||
|
||||
vLeftTable += '</TR>';
|
||||
|
||||
|
|
@ -1063,33 +1068,33 @@ Complete-Displays task percent complete</p>
|
|||
'<TR><TD border=1 colspan=5 align=left style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #efefef 1px solid; height=18px"> Powered by <a href=http://www.jsgantt.com>jsGantt</a> Format:';
|
||||
|
||||
if (vFormatArr.join().indexOf("minute")!=-1) {
|
||||
if (vFormat=='minute') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="minute" checked>Minute';
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("minute",'+vGanttVar+'); VALUE="minute">Minute';
|
||||
if (vFormat=='minute') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="minute" checked>'+i18n["sMinute"];
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("minute",'+vGanttVar+'); VALUE="minute">'+i18n["sMinute"];
|
||||
}
|
||||
|
||||
if (vFormatArr.join().indexOf("hour")!=-1) {
|
||||
if (vFormat=='hour') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="hour" checked>Hour';
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("hour",'+vGanttVar+'); VALUE="hour">Hour';
|
||||
if (vFormat=='hour') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="hour" checked>'+i18n["sHour"];
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("hour",'+vGanttVar+'); VALUE="hour">'+i18n["sHour"];
|
||||
}
|
||||
|
||||
if (vFormatArr.join().indexOf("day")!=-1) {
|
||||
if (vFormat=='day') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="day" checked>Day';
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("day",'+vGanttVar+'); VALUE="day">Day';
|
||||
if (vFormat=='day') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="day" checked>'+i18n["sDay"];
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("day",'+vGanttVar+'); VALUE="day">'+i18n["sDay"];
|
||||
}
|
||||
|
||||
if (vFormatArr.join().indexOf("week")!=-1) {
|
||||
if (vFormat=='week') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="week" checked>Week';
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("week",'+vGanttVar+') VALUE="week">Week';
|
||||
if (vFormat=='week') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="week" checked>'+i18n["sWeek"];
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("week",'+vGanttVar+') VALUE="week">'+i18n["sWeek"];
|
||||
}
|
||||
|
||||
if (vFormatArr.join().indexOf("month")!=-1) {
|
||||
if (vFormat=='month') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="month" checked>Month';
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("month",'+vGanttVar+') VALUE="month">Month';
|
||||
if (vFormat=='month') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="month" checked>'+i18n["sMonth"];
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("month",'+vGanttVar+') VALUE="month">'+i18n["sMonth"];
|
||||
}
|
||||
|
||||
if (vFormatArr.join().indexOf("quarter")!=-1) {
|
||||
if (vFormat=='quarter') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="quarter" checked>Quarter';
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("quarter",'+vGanttVar+') VALUE="quarter">Quarter';
|
||||
if (vFormat=='quarter') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" VALUE="quarter" checked>'+i18n["sQuarter"];
|
||||
else vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat" onclick=JSGantt.changeFormat("quarter",'+vGanttVar+') VALUE="quarter">'+i18n["sQuarter"];
|
||||
}
|
||||
|
||||
// vLeftTable += '<INPUT TYPE=RADIO NAME="other" VALUE="other" style="display:none"> .';
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ function print_left_eldy_menu($db,$menu_array)
|
|||
}
|
||||
|
||||
/*
|
||||
* Menu PROJETS
|
||||
* Menu PROJECTS
|
||||
*/
|
||||
if ($mainmenu == 'project')
|
||||
{
|
||||
|
|
@ -716,19 +716,19 @@ function print_left_eldy_menu($db,$menu_array)
|
|||
$newmenu->add(DOL_URL_ROOT."/projet/fiche.php?leftmenu=projects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/liste.php?leftmenu=projects&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/fiche.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/liste.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->all->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/fiche.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->all->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/liste.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->all->lire);
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/index.php?mode=mine", $langs->trans("MyActivities"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create&mode=mine", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/index.php?mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/list.php?mode=mine", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->all->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/fiche.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer && $user->rights->projet->all->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/tasks/index.php", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->all->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->all->creer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent ?
|
|||
DoNotShowMyTasksOnly=See also tasks i am not affected to
|
||||
ShowMyTasksOnly=View only tasks i am affected to
|
||||
TaskRessourceLinks=Ressources
|
||||
ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Project leader
|
||||
TypeContact_project_external_PROJECTLEADER=Project leader
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ ConfirmDeleteATimeSpent=Êtes-vous sûr de vouloir supprimer ce temps consommé
|
|||
DoNotShowMyTasksOnly=Voir aussi les taches qui ne me sont pas affectées
|
||||
ShowMyTasksOnly=Ne voir que les taches qui me sont affectées
|
||||
TaskRessourceLinks=Affectation ressources
|
||||
ProjectsDedicatedToThisThirdParty=Projets dédiés à ce tiers
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Chef de projet
|
||||
TypeContact_project_external_PROJECTLEADER=Chef de projet
|
||||
|
|
|
|||
|
|
@ -286,6 +286,96 @@ function getFormeJuridiqueLabel($code)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Show html area for list of projects
|
||||
* \param conf Object conf
|
||||
* \param lang Object lang
|
||||
* \param db Database handler
|
||||
* \param objsoc Third party object
|
||||
*/
|
||||
function show_projects($conf,$langs,$db,$objsoc)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$i = -1 ;
|
||||
|
||||
if ($conf->projet->enabled && $user->rights->projet->lire)
|
||||
{
|
||||
$langs->load("projects");
|
||||
|
||||
print "\n";
|
||||
print_titre($langs->trans("ProjectsDedicatedToThisThirdParty"));
|
||||
print "\n".'<table class="noborder" width=100%>';
|
||||
|
||||
$sql = "SELECT p.rowid,p.title,p.ref,p.public, p.dateo as do, p.datee as de";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql .= " WHERE p.fk_soc = ".$objsoc->id;
|
||||
$sql .= " ORDER BY p.dateo DESC";
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("Name").'</td><td align="center">'.$langs->trans("DateStart").'</td><td align="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
|
||||
$i=0;
|
||||
$var=true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$projectstatic->fetch($obj->rowid);
|
||||
|
||||
// To verify role of users
|
||||
$userAccess = $projectstatic->restrictedProjectArea($user,1);
|
||||
|
||||
if ($user->rights->projet->lire && $userAccess > 0)
|
||||
{
|
||||
$var = !$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
// Ref
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/projet/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.'</a></td>';
|
||||
// Label
|
||||
print '<td>'.$obj->title.'</td>';
|
||||
// Date start
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->do),"day").'</td>';
|
||||
// Date end
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->de),"day").'</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="3">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Show html area for list of contacts
|
||||
* \param conf Object conf
|
||||
|
|
@ -298,6 +388,8 @@ function show_contacts($conf,$langs,$db,$objsoc)
|
|||
global $user;
|
||||
global $bc;
|
||||
|
||||
$i=-1;
|
||||
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
if ($conf->clicktodial->enabled)
|
||||
|
|
@ -325,12 +417,13 @@ function show_contacts($conf,$langs,$db,$objsoc)
|
|||
$sql .= " ORDER by p.datec";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
if ($num)
|
||||
{
|
||||
$i=0;
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
|
@ -383,6 +476,8 @@ function show_contacts($conf,$langs,$db,$objsoc)
|
|||
print "\n</table>\n";
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -92,13 +92,10 @@ function project_prepare_head($object)
|
|||
$h++;
|
||||
*/
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Gantt");
|
||||
$head[$h][2] = 'gantt';
|
||||
$h++;
|
||||
}
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Gantt");
|
||||
$head[$h][2] = 'gantt';
|
||||
$h++;
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,14 +30,6 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var g = new JSGantt.GanttChart('g',document.getElementById('GanttChartDIV'), 'day');
|
||||
var booShowRessources = 1;
|
||||
var booShowDurations = 1;
|
||||
var booShowComplete = 1;
|
||||
var barText = "Resource";
|
||||
var graphFormat = "day";
|
||||
|
||||
|
||||
function DisplayHideRessources(boxName) {
|
||||
graphFormat = g.getFormat();
|
||||
if(boxName.checked == true) {
|
||||
|
|
@ -88,11 +80,18 @@ function reloadGraph() {
|
|||
}
|
||||
|
||||
|
||||
var g = new JSGantt.GanttChart('g',document.getElementById('GanttChartDIV'), 'day');
|
||||
var booShowRessources = 1;
|
||||
var booShowDurations = 1;
|
||||
var booShowComplete = 1;
|
||||
var barText = "Resource";
|
||||
var graphFormat = "day";
|
||||
|
||||
g.setDateInputFormat('mm/dd/yyyy'); // Set format of input dates ('mm/dd/yyyy', 'dd/mm/yyyy', 'yyyy-mm-dd')
|
||||
g.setDateDisplayFormat('<?php echo $dateformat; ?>'); // Set format to display dates ('mm/dd/yyyy', 'dd/mm/yyyy', 'yyyy-mm-dd')
|
||||
g.setShowRes(1); // Show/Hide Responsible (0/1)
|
||||
g.setShowDur(1); // Show/Hide Duration (0/1)
|
||||
g.setShowComp(1); // Show/Hide % Complete(0/1)
|
||||
g.setShowRes(1); // Show/Hide Responsible (0/1)
|
||||
g.setShowDur(1); // Show/Hide Duration (0/1)
|
||||
g.setShowComp(1); // Show/Hide % Complete(0/1)
|
||||
g.setShowStartDate(1); // Show/Hide % Complete(0/1)
|
||||
g.setShowEndDate(1); // Show/Hide % Complete(0/1)
|
||||
g.setFormatArr("day","week","month","quarter") // Set format options (up to 4 : "minute","hour","day","week","month","quarter")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* \file htdocs/projet/ganttview.php
|
||||
* \ingroup projet
|
||||
* \brief Gantt diagrame of a project
|
||||
* \brief Gantt diagramm of a project
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
|
@ -40,6 +40,12 @@ $projectid='';
|
|||
$projectid=isset($_REQUEST["id"])?$_REQUEST["id"]:$_POST["id"];
|
||||
|
||||
// Security check
|
||||
if (empty($user->rights->projet->all->lire))
|
||||
{
|
||||
$_GET["mode"]='mine';
|
||||
$_POST["mode"]='mine';
|
||||
$_REQUEST["mode"]='mine';
|
||||
}
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
|
|
@ -64,6 +70,7 @@ $arrayofcss=array(
|
|||
|
||||
$arrayofjs=array(
|
||||
'/includes/jsgantt/jsgantt.js',
|
||||
'/projet/jsgantt_language.js.php?lang='.$langs->defaultlang,
|
||||
'/includes/jquery/jquery.min.js',
|
||||
);
|
||||
|
||||
|
|
|
|||
75
htdocs/projet/jsgantt_language.js.php
Normal file
75
htdocs/projet/jsgantt_language.js.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file htdocs/projet/jsgantt_language.js.php
|
||||
* \brief Fichier de javascript de traduction pour JSGantt
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations
|
||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
|
||||
if (! defined('NOLOGIN')) define('NOLOGIN',1);
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
|
||||
require_once("../main.inc.php");
|
||||
|
||||
// Define css type
|
||||
header('Content-type: text/javascript');
|
||||
|
||||
global $langs;
|
||||
?>
|
||||
var i18n = new Array();
|
||||
i18n["sMinute"]= "<?php echo $langs->transnoentities("Minute") ?>";
|
||||
i18n["sMinutes"]= "<?php echo $langs->transnoentities("Minutes") ?>";
|
||||
i18n["sHour"]= "<?php echo $langs->transnoentities("Hour") ?>";
|
||||
i18n["sHours"]= "<?php echo $langs->transnoentities("Hours") ?>";
|
||||
i18n["sDay"]= "<?php echo $langs->transnoentities("Day") ?>";
|
||||
i18n["sDays"]= "<?php echo $langs->transnoentities("Days") ?>";
|
||||
i18n["sWeek"] = "<?php echo $langs->transnoentities("Week") ?>";
|
||||
i18n["sMonth"] = "<?php echo $langs->transnoentities("Month") ?>";
|
||||
i18n["sQuarter"] = "<?php echo $langs->transnoentities("Quarter") ?>";
|
||||
i18n["View"] = "<?php echo $langs->transnoentities("View") ?>";
|
||||
i18n["Resource"] = "<?php echo $langs->transnoentities("Ressource") ?>";
|
||||
i18n["Duration"] = "<?php echo $langs->transnoentities("Duration") ?>";
|
||||
i18n["Start_Date"] = "<?php echo $langs->transnoentities("DateStart") ?>";
|
||||
i18n["End_Date"] = "<?php echo $langs->transnoentities("DateEnd") ?>";
|
||||
i18n["Date_Format"] = "<?php echo $langs->transnoentities("Format") ?>";
|
||||
i18n["January"] = "<?php echo $langs->transnoentities("January") ?>";
|
||||
i18n["February"] = "<?php echo $langs->transnoentities("February") ?>";
|
||||
i18n["March"] = "<?php echo $langs->transnoentities("March") ?>";
|
||||
i18n["April"] = "<?php echo $langs->transnoentities("April") ?>";
|
||||
i18n["May"] = "<?php echo $langs->transnoentities("May") ?>";
|
||||
i18n["June"] = "<?php echo $langs->transnoentities("June") ?>";
|
||||
i18n["July"] = "<?php echo $langs->transnoentities("July") ?>";
|
||||
i18n["August"] = "<?php echo $langs->transnoentities("August") ?>";
|
||||
i18n["September"] = "<?php echo $langs->transnoentities("Septembre") ?>";
|
||||
i18n["October"] = "<?php echo $langs->transnoentities("October") ?>";
|
||||
i18n["November"] = "<?php echo $langs->transnoentities("November") ?>";
|
||||
i18n["December"] = "<?php echo $langs->transnoentities("December") ?>";
|
||||
i18n["Quarter"] = "<?php echo $langs->transnoentities("Quarter") ?>";
|
||||
|
||||
|
||||
|
|
@ -36,6 +36,12 @@ $projectid='';
|
|||
$projectid=isset($_REQUEST["id"])?$_REQUEST["id"]:$_POST["id"];
|
||||
|
||||
// Security check
|
||||
if (empty($user->rights->projet->all->lire))
|
||||
{
|
||||
$_GET["mode"]='mine';
|
||||
$_POST["mode"]='mine';
|
||||
$_REQUEST["mode"]='mine';
|
||||
}
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
|
|
@ -204,7 +210,6 @@ else
|
|||
$userstatic=new User($db);
|
||||
|
||||
$tab='tasks';
|
||||
//if ($_REQUEST["mode"]=='mine') $tab='mytasks';
|
||||
|
||||
$head=project_prepare_head($project);
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
|
||||
|
|
@ -271,9 +276,13 @@ else
|
|||
print '<table width="100%"><tr><td align="right">';
|
||||
if ($_REQUEST["mode"] == 'mine')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">'.$langs->trans("DoNotShowMyTasksOnly").'</a>';
|
||||
//print ' - ';
|
||||
//print $langs->trans("ShowMyTaskOnly");
|
||||
if ($user->rights->projet->all->lire)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">'.$langs->trans("DoNotShowMyTasksOnly").'</a>';
|
||||
//print ' - ';
|
||||
//print $langs->trans("ShowMyTaskOnly");
|
||||
}
|
||||
//else print '<a href="#">'.$langs->trans("DoNotShowMyTasksOnly").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1500,10 +1500,11 @@ else
|
|||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Contact List
|
||||
*/
|
||||
show_contacts($conf,$langs,$db,$soc);
|
||||
// Contacts list
|
||||
$result=show_contacts($conf,$langs,$db,$soc);
|
||||
|
||||
// Projects list
|
||||
$result=show_projects($conf,$langs,$db,$soc);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user