26require
'../../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/cactioncomm.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
32if (isModEnabled(
'project')) {
33 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
38$langs->load(
"commercial");
43$hookmanager->initHooks(array(
'actioncard',
'globalcard'));
46if ($user->socid > 0) {
48 $socid = $user->socid;
51$result =
restrictedArea($user,
'agenda', $id,
'actioncomm&societe',
'myactions|allactions',
'fk_soc',
'id');
52if ($user->socid && $socid) {
56$usercancreate = $user->hasRight(
'agenda',
'allactions',
'create') || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->hasRight(
'agenda',
'myactions',
'create'));
65$help_url =
'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda|DE:Modul_Terminplanung';
66llxHeader(
'', $langs->trans(
"Agenda"), $help_url);
70$object->info($object->id);
76$linkback =
'<a href="'.DOL_URL_ROOT.
'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
77$linkback .=
img_picto($langs->trans(
"BackToList"),
'object_calendarlist',
'class="pictoactionview pictofixedwidth"');
78$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"BackToList").
'</span>';
81$linkback .=
'<li class="noborder litext">';
82$linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?mode=show_month&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">';
83$linkback .=
img_picto($langs->trans(
"ViewCal"),
'object_calendar',
'class="pictoactionview pictofixedwidth"');
84$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewCal").
'</span>';
87$linkback .=
'<li class="noborder litext">';
88$linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?mode=show_week&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">';
89$linkback .=
img_picto($langs->trans(
"ViewWeek"),
'object_calendarweek',
'class="pictoactionview pictofixedwidth"');
90$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewWeek").
'</span>';
93$linkback .=
'<li class="noborder litext">';
94$linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?mode=show_day&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">';
95$linkback .=
img_picto($langs->trans(
"ViewDay"),
'object_calendarday',
'class="pictoactionview pictofixedwidth"');
96$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewDay").
'</span>';
99$linkback .=
'<li class="noborder litext">';
100$linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/peruser.php?mode=show_peruser&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">';
101$linkback .=
img_picto($langs->trans(
"ViewPerUser"),
'object_calendarperuser',
'class="pictoactionview pictofixedwidth"');
102$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewPerUser").
'</span>';
106$parameters = array();
107$reshook = $hookmanager->executeHooks(
'addCalendarView', $parameters, $object, $action);
108if (empty($reshook)) {
109 $linkback .= $hookmanager->resPrint;
110} elseif ($reshook > 1) {
111 $linkback = $hookmanager->resPrint;
114$morehtmlref =
'<div class="refidno">';
116if (isModEnabled(
'project')) {
117 $langs->load(
"projects");
120 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
121 if ($action !=
'classify') {
122 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.newToken().
'&id='.$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
124 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->socid, $object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
126 if (!empty($object->fk_project)) {
128 $proj->fetch($object->fk_project);
129 $morehtmlref .= $proj->getNomUrl(1);
131 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
136$morehtmlref .=
'</div>';
138dol_banner_tab($object,
'id', $linkback, ($user->socid ? 0 : 1),
'id',
'ref', $morehtmlref);
140print
'<div class="underbanner clearboth"></div>';
144print
'<table width="100%"><tr><td>';
146print
'</td></tr></table>';
actions_prepare_head($object)
Prepare array with list of tabs.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage agenda events (actions)
Class to manage projects.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.