Commit 3b0e1ef6 authored by Bate's avatar Bate
Browse files

Planning2

parent aa5e6228
......@@ -103,10 +103,8 @@ class planningv extends stdcontents
*/
function planningv ( $titre, $db, $id_planning, $start, $end, $site, $force_single_column = false, $show_admin = false, $days_per_row = 7)
{
if($GLOBALS["taiste"])
$realtopdir = $topdir."/taiste";
else
$realtopdir = $topdir;
global $wwwtopdir;
setlocale(LC_ALL, "fr_FR.UTF8");
$this->title=false;
$this->days_per_row = $days_per_row;
......@@ -319,19 +317,19 @@ class planningv extends stdcontents
$count++;
if($gap_data[0] == $site->user->id || $site->user->is_in_group_id($this->planning->admin_group)
|| $site->user->is_in_group("gestion_ae"))
$cell_buffer .= ($count==1?"":", ")."<a href=\"".$realtopdir."/planning2.php?action=remove_from_gap&user_gap_id=$gap_data[2]&id_planning=".$this->planning->id."\">".$gap_data[1]."</a>";
$cell_buffer .= ($count==1?"":", ")."<a href=\"".$wwwtopdir."/planning2.php?action=remove_from_gap&user_gap_id=$gap_data[2]&id_planning=".$this->planning->id."\">".$gap_data[1]."</a>";
else
$cell_buffer .= ($count==1?"":", ").$gap_data[1];
}
if($count < $gap_count)
{
$cell_buffer .= ($count?" et ":"")."<a class=\"pl2_link\" href=\"".$realtopdir."/planning2.php?action=add_to_gap&gap_id=$gap_id&id_planning=".$this->planning->id."\"><span>".($gap_count - $count)."&nbsp;personne".(($gap_count - $count)>=2?"s":"")."</span></a>";
$cell_buffer .= ($count?" et ":"")."<a class=\"pl2_link\" href=\"".$wwwtopdir."/planning2.php?action=add_to_gap&gap_id=$gap_id&id_planning=".$this->planning->id."\"><span>".($gap_count - $count)."&nbsp;personne".(($gap_count - $count)>=2?"s":"")."</span></a>";
}
if($show_admin && ( $site->user->is_in_group_id($this->planning->admin_group)
|| $site->user->is_in_group("gestion_ae")))
{
$cell_buffer .= " <a href=\"".$realtopdir."/planning2.php?view=del_gap&id_gap=$gap_id&id_planning=".$this->planning->id."\">Supprimer</a>";
$cell_buffer .= " <a href=\"".$wwwtopdir."/planning2.php?view=del_gap&id_gap=$gap_id&id_planning=".$this->planning->id."\">Supprimer</a>";
}
$cell_buffer .= "</div>";
$totalCount += $count;
......@@ -348,19 +346,19 @@ class planningv extends stdcontents
$count++;
if($gap_data[0] == $site->user->id || $site->user->is_in_group_id($this->planning->admin_group)
|| $site->user->is_in_group("gestion_ae"))
$cell_buffer .= ($count==1?"Continué: ":", ")."<a href=\"".$realtopdir."/planning2.php?action=remove_from_gap&user_gap_id=$gap_data[2]&id_planning=".$this->planning->id."\">".$gap_data[1]."</a>";
$cell_buffer .= ($count==1?"Continué: ":", ")."<a href=\"".$wwwtopdir."/planning2.php?action=remove_from_gap&user_gap_id=$gap_data[2]&id_planning=".$this->planning->id."\">".$gap_data[1]."</a>";
else
$cell_buffer .= ($count==1?"Continué: ":", ").$gap_data[1];
}
if($count < $gap_count)
{
$cell_buffer .= ($count?" et ":"")."<a class=\"pl2_link\" href=\"".$realtopdir."/planning2.php?action=add_to_gap&gap_id=$gap_id&id_planning=".$this->planning->id."\">".($gap_count - $count)."&nbsp;personne".(($gap_count - $count)>=2?"s":"")."</a>";
$cell_buffer .= ($count?" et ":"")."<a class=\"pl2_link\" href=\"".$wwwtopdir."/planning2.php?action=add_to_gap&gap_id=$gap_id&id_planning=".$this->planning->id."\">".($gap_count - $count)."&nbsp;personne".(($gap_count - $count)>=2?"s":"")."</a>";
}
if($show_admin && ( $site->user->is_in_group_id($this->planning->admin_group)
|| $site->user->is_in_group("gestion_ae")))
{
$cell_buffer .= " <a href=\"".$realtopdir."/planning2.php?view=del_gap&id_gap=$gap_id&id_planning=".$this->planning->id."\">Supprimer</a>";
$cell_buffer .= " <a href=\"".$wwwtopdir."/planning2.php?view=del_gap&id_gap=$gap_id&id_planning=".$this->planning->id."\">Supprimer</a>";
}
$cell_buffer .= "</div>";
$totalCount += $count;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment