Skip to content
Snippets Groups Projects
Commit 00a25e77 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Move all output into template

parent 1a365a69
No related branches found
No related tags found
No related merge requests found
......@@ -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 -->
\ No newline at end of file
......@@ -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
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment