27require
'../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/cactioncomm.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
33if (isModEnabled(
'project')) {
34 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
47$langs->load(
"commercial");
52$hookmanager->initHooks(array(
'actioncard',
'globalcard'));
55if ($user->socid > 0) {
57 $socid = $user->socid;
60$result =
restrictedArea($user,
'agenda', $id,
'actioncomm&societe',
'myactions|allactions',
'fk_soc',
'id');
61if ($user->socid && $socid) {
65$usercancreate = $user->hasRight(
'agenda',
'allactions',
'create') || ((
$object->authorid == $user->id ||
$object->userownerid == $user->id) && $user->hasRight(
'agenda',
'myactions',
'create'));
74$help_url =
'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda|DE:Modul_Terminplanung';
75llxHeader(
'', $langs->trans(
"Agenda"), $help_url);
85$linkback =
'<a href="'.DOL_URL_ROOT.
'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
86$linkback .=
img_picto($langs->trans(
"BackToList"),
'object_calendarlist',
'class="pictoactionview pictofixedwidth"');
87$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"BackToList").
'</span>';
90$linkback .=
'<li class="noborder litext">';
92$linkback .=
img_picto($langs->trans(
"ViewCal"),
'object_calendar',
'class="pictoactionview pictofixedwidth"');
93$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewCal").
'</span>';
96$linkback .=
'<li class="noborder litext">';
98$linkback .=
img_picto($langs->trans(
"ViewWeek"),
'object_calendarweek',
'class="pictoactionview pictofixedwidth"');
99$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewWeek").
'</span>';
102$linkback .=
'<li class="noborder litext">';
104$linkback .=
img_picto($langs->trans(
"ViewDay"),
'object_calendarday',
'class="pictoactionview pictofixedwidth"');
105$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewDay").
'</span>';
108$linkback .=
'<li class="noborder litext">';
110$linkback .=
img_picto($langs->trans(
"ViewPerUser"),
'object_calendarperuser',
'class="pictoactionview pictofixedwidth"');
111$linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewPerUser").
'</span>';
115$parameters = array();
116$reshook = $hookmanager->executeHooks(
'addCalendarView', $parameters, $object, $action);
117if (empty($reshook)) {
118 $linkback .= $hookmanager->resPrint;
119} elseif ($reshook > 1) {
120 $linkback = $hookmanager->resPrint;
123$morehtmlref =
'<div class="refidno">';
125if (isModEnabled(
'project')) {
126 $langs->load(
"projects");
129 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
130 if ($action !=
'classify') {
131 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.
newToken().
'&id='.
$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
133 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid,
$object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
135 if (!empty(
$object->fk_project)) {
137 $proj->fetch(
$object->fk_project);
138 $morehtmlref .= $proj->getNomUrl(1);
140 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
145$morehtmlref .=
'</div>';
147dol_banner_tab($object,
'id', $linkback, ($user->socid ? 0 : 1),
'id',
'ref', $morehtmlref);
149print
'<div class="underbanner clearboth"></div>';
153print
'<table width="100%"><tr><td>';
155print
'</td></tr></table>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage agenda events (actions)
Class to manage projects.
dol_print_object_info($object, $usetable=0)
Show information on an object TODO Move this into html.formother.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify 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.