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='')
|
function assign_values($action='')
|
||||||
{
|
{
|
||||||
global $langs, $user;
|
global $conf, $db, $langs, $user;
|
||||||
global $form;
|
global $form;
|
||||||
|
|
||||||
parent::assign_values($action);
|
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);
|
$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 } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</div><br>
|
</div><br>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
|
echo $this->control->tpl['actionstodo'];
|
||||||
|
|
||||||
|
echo $this->control->tpl['actionsdone'];
|
||||||
|
?>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -320,26 +320,10 @@ if (! empty($objcanvas->template_dir))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Fetch object
|
$result=$objcanvas->fetch($id); // Reload object
|
||||||
$result=$objcanvas->fetch($id);
|
$objcanvas->assign_values('view'); // Assign values
|
||||||
if ($result > 0)
|
$objcanvas->display_canvas('view'); // Show template
|
||||||
{
|
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user