Move all output into template
This commit is contained in:
parent
1a365a69c8
commit
00a25e77c7
@ -89,7 +89,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
*/
|
||||
function assign_values($action='')
|
||||
{
|
||||
global $langs, $user;
|
||||
global $conf, $db, $langs, $user;
|
||||
global $form;
|
||||
|
||||
parent::assign_values($action);
|
||||
@ -111,6 +111,13 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
}
|
||||
}
|
||||
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($this->object->fk_soc);
|
||||
|
||||
$this->tpl['actionstodo']=show_actions_todo($conf,$langs,$db,$objsoc,$this->control->object);
|
||||
|
||||
$this->tpl['actionsdone']=show_actions_done($conf,$langs,$db,$objsoc,$this->control->object);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -149,6 +149,11 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
||||
<?php } ?>
|
||||
|
||||
</div><br>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
|
||||
echo $this->control->tpl['actionstodo'];
|
||||
|
||||
echo $this->control->tpl['actionsdone'];
|
||||
?>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
@ -320,26 +320,10 @@ if (! empty($objcanvas->template_dir))
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fetch object
|
||||
$result=$objcanvas->fetch($id);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Assign values
|
||||
$objcanvas->assign_values('view');
|
||||
|
||||
// Display canvas
|
||||
$objcanvas->display_canvas('view');
|
||||
|
||||
print show_actions_todo($conf,$langs,$db,$objsoc,$objcanvas->control->object);
|
||||
|
||||
print show_actions_done($conf,$langs,$db,$objsoc,$objcanvas->control->object);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_htmloutput_errors($objcanvas->error,$objcanvas->errors);
|
||||
}
|
||||
$result=$objcanvas->fetch($id); // Reload object
|
||||
$objcanvas->assign_values('view'); // Assign values
|
||||
$objcanvas->display_canvas('view'); // Show template
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user