$nav.=" <span id=\"month_name\">".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"daytextshort"); $nav.=" </span>\n"; $nav.="<a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day."&region=".$region.$param."\">".img_next($langs->trans("Next"))."</a>\n"; $picto='calendarday'; } // Must be after the nav definition $param.='&year='.$year.'&month='.$month.($day?'&day='.$day:''); //print 'x'.$param; $head = calendars_prepare_head(''); dol_fiche_head($head, 'card', $langs->trans('Events'), 0, $picto); print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid); dol_fiche_end(); // Add link to show birthdays $newparam=$param; // newparam is for birthday links $newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam); if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1'; $link='<a href="'.$_SERVER['PHP_SELF']; $link.='?'.$newparam; $link.='">'; if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents"); else $link.=$langs->trans("AgendaHideBirthdayEvents"); $link.='</a>';
$tabactive = 'cardmonth'; } if ($action == 'show_week') { $tabactive = 'cardweek'; } if ($action == 'show_day') { $tabactive = 'cardday'; } if ($action == 'show_list') { $tabactive = 'cardlist'; } if ($action == 'show_peruser') { $tabactive = 'cardperuser'; } $paramnoaction = preg_replace('/action=[a-z_]+/', '', $param); $head = calendars_prepare_head($paramnoaction); dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup); dol_fiche_end(); $showextcals = $listofextcals; // Legend if ($conf->use_javascript_ajax) { $s = ''; $s .= '<script type="text/javascript">' . "\n"; $s .= 'jQuery(document).ready(function () {' . "\n"; $s .= 'jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });' . "\n"; $s .= 'jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });' . "\n"; $s .= 'jQuery(".family_birthday").toggle();' . "\n"; if ($action == "show_week" || $action == "show_month" || empty($action)) { $s .= 'jQuery( "td.sortable" ).sortable({connectWith: ".sortable",placeholder: "ui-state-highlight",items: "div:not(.unsortable)", receive: function( event, ui ) {'; $s .= 'var frm=jQuery("#move_event");frm.attr("action",ui.item.find("a.cal_event").attr("href")).children("#newdate").val(jQuery(event.target).closest("div").attr("id"));frm.submit();}});' . "\n";
$sql .= $db->plimit($limit + 1, $offset); //print $sql; dol_syslog("comm/action/listactions.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { $actionstatic = new ActionComm($db); $societestatic = new Societe($db); $num = $db->num_rows($resql); /*$title=$langs->trans("DoneAndToDoActions"); if ($status == 'done') $title=$langs->trans("DoneActions"); if ($status == 'todo') $title=$langs->trans("ToDoActions"); */ $title = $langs->trans("ListOfEvents"); $newtitle = $langs->trans($title); $tabactive = 'cardlist'; $head = calendars_prepare_head($param); dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup); dol_fiche_end(); // Add link to show birthdays $link = ''; /* if (empty($conf->use_javascript_ajax)) { $newparam=$param; // newparam is for birthday links $newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$newparam); if (! preg_match('/showbirthday=/i',$newparam)) $newparam.='&showbirthday=1'; $link='<a href="'.$_SERVER['PHP_SELF']; $link.='?'.$newparam; $link.='">'; if (empty($showbirthday)) $link.=$langs->trans("AgendaShowBirthdayEvents");