Look: Change in look of agenda module
This commit is contained in:
parent
f24ec66c81
commit
a85e3077d2
@ -30,9 +30,9 @@ require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
$filtera = isset($_REQUEST["userasked"])?$_REQUEST["userasked"]:'';
|
||||
$filtert = isset($_REQUEST["usertodo"])?$_REQUEST["usertodo"]:'';
|
||||
$filterd = isset($_REQUEST["userdone"])?$_REQUEST["userdone"]:'';
|
||||
$filtera = isset($_REQUEST["userasked"])?$_REQUEST["userasked"]:(isset($_REQUEST["filtera"])?$_REQUEST["filtera"]:'');
|
||||
$filtert = isset($_REQUEST["usertodo"])?$_REQUEST["usertodo"]:(isset($_REQUEST["filtert"])?$_REQUEST["filtert"]:'');
|
||||
$filterd = isset($_REQUEST["userdone"])?$_REQUEST["userdone"]:(isset($_REQUEST["filterd"])?$_REQUEST["filterd"]:'');
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortfield=$_GET["sortfield"];
|
||||
@ -65,6 +65,17 @@ $month=isset($_GET["month"])?$_GET["month"]:date("m");
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
if (! empty($_POST["viewlist"]))
|
||||
{
|
||||
$param='';
|
||||
foreach($_POST as $key => $val)
|
||||
{
|
||||
$param.='&'.$key.'='.urlencode($val);
|
||||
}
|
||||
//print $param;
|
||||
header("Location: ".DOL_URL_ROOT.'/comm/action/listactions.php?'.$param);
|
||||
exit;
|
||||
}
|
||||
if ($_GET["action"] == 'builddoc')
|
||||
{
|
||||
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
|
||||
@ -112,7 +123,12 @@ $nav.=" <span id=\"month_name\">".dolibarr_print_date(dolibarr_mktime(0,0,0,$mon
|
||||
$nav.=" $year";
|
||||
$nav.=" </span>\n";
|
||||
$nav.="<a href=\"?year=".$next_year."&month=".$next_month."&region=".$region.$param."\">".img_next($langs->trans("Next"))."</a>\n";
|
||||
print_fiche_titre($langs->trans("Calendar"),$nav,'');
|
||||
|
||||
$title=$langs->trans("DoneAndToDoActions");
|
||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||
|
||||
print_fiche_titre($title,$nav,'');
|
||||
|
||||
// Filters
|
||||
if ($canedit)
|
||||
@ -129,7 +145,10 @@ if ($canedit)
|
||||
print $form->select_users($filtera,'userasked',1,'',!$canedit);
|
||||
print '</td>';
|
||||
print '<td rowspan="3" align="center" valign="middle">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Search").'" '.($canedit?'':'disabled="true"') .'>';
|
||||
print img_picto($langs->trans("ViewList"),'object_list').' <input type="submit" class="button" name="viewlist" value="'.$langs->trans("ViewList").'" '.($canedit?'':'disabled="true"') .'>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'" '.($canedit?'':'disabled="true"') .'>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -33,9 +33,9 @@ require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
$langs->load("companies");
|
||||
$langs->load("agenda");
|
||||
|
||||
$filtera = isset($_REQUEST["userasked"])?$_REQUEST["userasked"]:'';
|
||||
$filtert = isset($_REQUEST["usertodo"])?$_REQUEST["usertodo"]:'';
|
||||
$filterd = isset($_REQUEST["userdone"])?$_REQUEST["userdone"]:'';
|
||||
$filtera = isset($_REQUEST["userasked"])?$_REQUEST["userasked"]:(isset($_REQUEST["filtera"])?$_REQUEST["filtera"]:'');
|
||||
$filtert = isset($_REQUEST["usertodo"])?$_REQUEST["usertodo"]:(isset($_REQUEST["filtert"])?$_REQUEST["filtert"]:'');
|
||||
$filterd = isset($_REQUEST["userdone"])?$_REQUEST["userdone"]:(isset($_REQUEST["filterd"])?$_REQUEST["filterd"]:'');
|
||||
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:$_POST["socid"];
|
||||
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
|
||||
@ -76,14 +76,30 @@ if (! $sortfield)
|
||||
}
|
||||
|
||||
|
||||
llxHeader();
|
||||
$form=new Form($db);
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
if (! empty($_POST["viewcal"]))
|
||||
{
|
||||
$param='';
|
||||
foreach($_POST as $key => $val)
|
||||
{
|
||||
$param.='&'.$key.'='.urlencode($val);
|
||||
}
|
||||
//print $param;
|
||||
header("Location: ".DOL_URL_ROOT.'/comm/action/index.php?'.$param);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Affichage liste des actions
|
||||
*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
$form=new Form($db);
|
||||
|
||||
$sql = "SELECT s.nom as societe, s.rowid as socid, s.client,";
|
||||
$sql.= " a.id, ".$db->pdate("a.datep")." as dp, ".$db->pdate("a.datep2")." as dp2,";
|
||||
$sql.= " ".$db->pdate("a.datea")." as da, ".$db->pdate("a.datea2")." as da2,";
|
||||
@ -139,9 +155,11 @@ if ($resql)
|
||||
$societestatic=new Societe($db);
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
$title="DoneAndToDoActions";
|
||||
if ($status == 'done') $title="DoneActions";
|
||||
if ($status == 'todo') $title="ToDoActions";
|
||||
|
||||
$title=$langs->trans("DoneAndToDoActions");
|
||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||
|
||||
$param="&status=".$status;
|
||||
|
||||
if ($socid)
|
||||
@ -149,7 +167,7 @@ if ($resql)
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch($socid);
|
||||
|
||||
print_barre_liste($langs->trans($title."For",$societe->nom), $page, $_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,'',$num);
|
||||
print_barre_liste($langs->trans($title).' '.$langs->trans("For").' '.$societe->nom, $page, $_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,'',$num);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -172,7 +190,10 @@ if ($resql)
|
||||
print $form->select_users($filtera,'userasked',1,'',!$canedit);
|
||||
print '</td>';
|
||||
print '<td rowspan="3" align="center" valign="middle">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Search").'" '.($canedit?'':'disabled="true"') .'>';
|
||||
print img_picto($langs->trans("ViewList"),'object_list').' <input type="submit" class="button" name="viewlist" value="'.$langs->trans("ViewList").'" '.($canedit?'':'disabled="true"') .'>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar').' <input type="submit" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'" '.($canedit?'':'disabled="true"') .'>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -35,44 +35,35 @@ function llxHeader($head = "", $urlp = "")
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
$langs->load("commercial");
|
||||
|
||||
|
||||
$langs->load("agenda");
|
||||
|
||||
// Calendar
|
||||
$menu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->myactions->read);
|
||||
|
||||
// Actions
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
|
||||
// Events
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read);
|
||||
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->commercial->enabled) {
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled) {
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
|
||||
}
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
$langs->load("agenda");
|
||||
|
||||
// Actions
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
// List
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Calendar
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->allactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Reports
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
@ -35,42 +35,35 @@ function llxHeader($head = "", $urlp = "")
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
$langs->load("commercial");
|
||||
$langs->load("agenda");
|
||||
|
||||
// Calendar
|
||||
$menu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->myactions->read);
|
||||
|
||||
// Actions
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
|
||||
// Events
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read);
|
||||
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->commercial->enabled) {
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled) {
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
|
||||
}
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
$langs->load("agenda");
|
||||
|
||||
// Actions
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
// List
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Calendar
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->allactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Reports
|
||||
$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
@ -348,188 +348,15 @@ if ($socid > 0)
|
||||
|
||||
print "<br>";
|
||||
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
*
|
||||
*/
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="10"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right"> </td></tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.login, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql .= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
$sql .= " AND c.id=a.fk_action AND a.percent < 100";
|
||||
$sql .= " ORDER BY a.datep DESC, a.id DESC";
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$obj = $db->fetch_object($result);
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td width="30" align="center">'.strftime("%Y",$obj->dp)."</td>\n";
|
||||
$oldyear = strftime("%Y",$obj->dp);
|
||||
|
||||
print '<td width="30" align="center">' .strftime("%b",$obj->dp)."</td>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->dp);
|
||||
|
||||
print '<td width="20">'.strftime("%d",$obj->dp)."</td>\n";
|
||||
print '<td width="30">'.strftime("%H:%M",$obj->dp)."</td>\n";
|
||||
if (date("U",$obj->dp) < time())
|
||||
{
|
||||
print "<td>".img_warning("Late")."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
// Status/Percent
|
||||
print '<td width="30"> </td>';
|
||||
|
||||
if ($obj->propalrowid)
|
||||
{
|
||||
print '<td><a href="propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowAction"),"task");
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print $libelle;
|
||||
print '</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$actionstatic->code=$obj->acode;
|
||||
$actionstatic->libelle=$obj->libelle;
|
||||
$actionstatic->id=$obj->id;
|
||||
print '<td>'.$actionstatic->getNomUrl(1,16).'</td>';
|
||||
}
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
|
||||
// Contact pour cette action
|
||||
if ($obj->fk_contact) {
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->fk_contact);
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->getFullName($langs).'</a></td>';
|
||||
} else {
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
print '<td width="80" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a></td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
} else {
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
/*
|
||||
* Listes des actions effectuées
|
||||
*/
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="12"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsDone").'</a></td></tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
$sql.= " ".$db->pdate("a.datea")." as da,";
|
||||
$sql.= " a.propalrowid, a.fk_user_author, a.fk_contact, a.percent,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
$sql.= " u.login, u.rowid ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||
$sql .= " WHERE a.fk_soc = ".$societe->id;
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
$sql .= " AND c.id=a.fk_action AND a.percent = 100";
|
||||
$sql .= " ORDER BY a.datea DESC, a.id DESC";
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$obj = $db->fetch_object($result);
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td width="30" align="center">'.strftime("%Y",$obj->da)."</td>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
|
||||
print '<td width="30" align="center">'.strftime("%b",$obj->da)."</td>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
|
||||
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
|
||||
print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
|
||||
|
||||
// Espace
|
||||
print '<td> </td>';
|
||||
|
||||
// Action
|
||||
print '<td>';
|
||||
$actionstatic->code=$obj->acode;
|
||||
$actionstatic->libelle=$obj->libelle;
|
||||
$actionstatic->id=$obj->id;
|
||||
print '<td>'.$actionstatic->getNomUrl(1,16).'</td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
if ($conf->propal->enabled && $obj->propalrowid)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowPropal"),"propal");
|
||||
print $langs->trans("Propal");
|
||||
print '</a>';
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Libellé
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
|
||||
// Contact pour cette action
|
||||
if ($obj->fk_contact)
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->fk_contact);
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->getFullName($langs).'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
print '<td width="80" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
*/
|
||||
show_actions_todo($conf,$langs,$db,$societe);
|
||||
|
||||
/*
|
||||
* Listes des actions effectuees
|
||||
*/
|
||||
show_actions_done($conf,$langs,$db,$societe);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -708,20 +708,28 @@ class MenuLeft {
|
||||
$langs->load("agenda");
|
||||
|
||||
// Actions
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
// List
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
|
||||
// Calendar
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Reports
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -671,7 +671,6 @@ class MenuLeft {
|
||||
/*
|
||||
* Menu AGENDA
|
||||
*/
|
||||
/*
|
||||
if ($mainmenu == 'agenda')
|
||||
{
|
||||
// Actions
|
||||
@ -680,20 +679,30 @@ class MenuLeft {
|
||||
$langs->load("agenda");
|
||||
|
||||
// Actions
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
// List
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Calendar
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
if ($user->rights->agenda->allactions->read)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
|
||||
}
|
||||
// Reports
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Menu PROJETS
|
||||
|
||||
@ -15,13 +15,12 @@
|
||||
* 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.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/menus/barre_top/rodolphe.php
|
||||
\brief Gestionnaire par d<EFBFBD>faut du menu du haut
|
||||
\version $Id$
|
||||
|
||||
\remarks La construction d'un gestionnaire pour le menu du haut est simple:
|
||||
\remarks Toutes les entrees de menu e faire apparaitre dans la barre du haut
|
||||
@ -56,7 +55,6 @@ class MenuTop {
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;
|
||||
|
||||
if (! session_id()) {
|
||||
@ -324,6 +322,7 @@ class MenuTop {
|
||||
$url.="&idmenu=".$tabMenu[$i]['rowid'];
|
||||
// Define idsel
|
||||
if (! empty($_GET["idmenu"]) && $tabMenu[$i]['rowid'] == $_GET["idmenu"]) $idsel='id="sel" ';
|
||||
elseif (! empty($_GET["mainmenu"]) && $_GET["mainmenu"] == $tabMenu[$i]['mainmenu']) $idsel='id="sel" ';
|
||||
else $idsel='';
|
||||
print '<td class="tmenu"><a class="tmenu" '.$idsel.'href="'.$url.'"'.($this->atarget?" target=$this->atarget":"").'>'.$tabMenu[$i]['titre'].'</a></td>';
|
||||
}
|
||||
|
||||
@ -19,3 +19,5 @@ ActionsToDoBy=Actions affected to
|
||||
ActionsDoneBy=Actions done by
|
||||
AllMyActions=All my actions/tasks
|
||||
AllActions=Toutes les actions/tasks
|
||||
ViewList=View list
|
||||
ViewCal=View calendar
|
||||
|
||||
@ -18,4 +18,6 @@ ActionsAskedBy=Actions enregistr
|
||||
ActionsToDoBy=Actions affectées à
|
||||
ActionsDoneBy=Actions réalisées par
|
||||
AllMyActions=Toutes mes actions/taches
|
||||
AllActions=Toutes les actions/taches
|
||||
AllActions=Toutes les actions/taches
|
||||
ViewList=Voir liste
|
||||
ViewCal=Voir calendrier
|
||||
@ -236,14 +236,14 @@ function show_actions_todo($conf,$langs,$db,$objsoc)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
$actionstatic=new ActionComm($db);
|
||||
$userstatic=new User($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic=new User($db);
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
print_titre($langs->trans("ActionsOnCompany"));
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="11"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$objsoc->id.'&status=todo">'.$langs->trans("ActionsToDoShort").'</a></td><td align="right"> </td>';
|
||||
print '<td colspan="11"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$objsoc->id.'&status=todo">'.$langs->trans("ActionsToDoShort").'</a></td><td align="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
@ -373,7 +373,7 @@ function show_actions_done($conf,$langs,$db,$objsoc)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="12"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$objsoc->id.'&status=done">'.$langs->trans("ActionsDoneShort").'</a></td>';
|
||||
print '<td colspan="12"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$objsoc->id.'&status=done">'.$langs->trans("ActionsDoneShort").'</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
|
||||
BIN
htdocs/theme/auguria/img/object_list.png
Normal file
BIN
htdocs/theme/auguria/img/object_list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
BIN
htdocs/theme/bluelagoon/img/object_list.png
Normal file
BIN
htdocs/theme/bluelagoon/img/object_list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
BIN
htdocs/theme/dev/img/object_list.png
Normal file
BIN
htdocs/theme/dev/img/object_list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
BIN
htdocs/theme/eldy/img/object_list.png
Normal file
BIN
htdocs/theme/eldy/img/object_list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
BIN
htdocs/theme/freelug/img/object_list.png
Normal file
BIN
htdocs/theme/freelug/img/object_list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
BIN
htdocs/theme/yellow/img/object_list.png
Normal file
BIN
htdocs/theme/yellow/img/object_list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
Loading…
Reference in New Issue
Block a user