Qual: Fix architecture problem with canvas
This commit is contained in:
parent
d72f417868
commit
c311bf5f2c
@ -320,14 +320,24 @@ if (! empty($objcanvas->template_dir))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result=$objcanvas->fetch($id); // Reload object
|
// Fetch object
|
||||||
$objcanvas->assign_values('view'); // Assign values
|
$result=$objcanvas->fetch($id);
|
||||||
$objcanvas->display_canvas('view'); // Show template
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
// Assign values
|
||||||
|
$objcanvas->assign_values('view');
|
||||||
|
|
||||||
// TODO Move this also into template
|
// Display canvas
|
||||||
print show_actions_todo($conf,$langs,$db,$objsoc,$objcanvas->control->object);
|
$objcanvas->display_canvas('view');
|
||||||
|
|
||||||
print show_actions_done($conf,$langs,$db,$objsoc,$objcanvas->control->object);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -397,42 +397,54 @@ if (! empty($objcanvas->template_dir))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result=$objcanvas->fetch($socid); // Relaod object
|
// Fetch object
|
||||||
$objcanvas->assign_values('view'); // Assign values
|
$result=$objcanvas->fetch($socid);
|
||||||
$objcanvas->display_canvas('view'); // Show template
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
// Assign values
|
||||||
|
$objcanvas->assign_values('view');
|
||||||
|
|
||||||
// TODO Move this also into template
|
// Display canvas
|
||||||
print '<table width="100%"><tr><td valign="top" width="50%">';
|
$objcanvas->display_canvas('view');
|
||||||
print '<a name="builddoc"></a>'; // ancre
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Documents generes
|
|
||||||
*/
|
|
||||||
$filedir=$conf->societe->dir_output.'/'.$socid;
|
|
||||||
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
|
|
||||||
$genallowed=$user->rights->societe->creer;
|
|
||||||
$delallowed=$user->rights->societe->supprimer;
|
|
||||||
|
|
||||||
$var=true;
|
print '<table width="100%"><tr><td valign="top" width="50%">';
|
||||||
|
print '<a name="builddoc"></a>'; // ancre
|
||||||
|
|
||||||
$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
|
/*
|
||||||
|
* Documents generes
|
||||||
|
*/
|
||||||
|
$filedir=$conf->societe->dir_output.'/'.$socid;
|
||||||
|
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
|
||||||
|
$genallowed=$user->rights->societe->creer;
|
||||||
|
$delallowed=$user->rights->societe->supprimer;
|
||||||
|
|
||||||
print '</td>';
|
$var=true;
|
||||||
print '<td></td>';
|
|
||||||
print '</tr>';
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '<br>';
|
$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
|
||||||
|
|
||||||
// Subsidiaries list
|
print '</td>';
|
||||||
$result=show_subsidiaries($conf,$langs,$db,$objcanvas->control->object);
|
print '<td></td>';
|
||||||
|
print '</tr>';
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
// Contacts list
|
print '<br>';
|
||||||
$result=show_contacts($conf,$langs,$db,$objcanvas->control->object);
|
|
||||||
|
|
||||||
// Projects list
|
// Subsidiaries list
|
||||||
$result=show_projects($conf,$langs,$db,$objcanvas->control->object);
|
$result=show_subsidiaries($conf,$langs,$db,$objcanvas->control->object);
|
||||||
|
|
||||||
|
// Contacts list
|
||||||
|
$result=show_contacts($conf,$langs,$db,$objcanvas->control->object);
|
||||||
|
|
||||||
|
// Projects list
|
||||||
|
$result=show_projects($conf,$langs,$db,$objcanvas->control->object);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_htmloutput_errors($objcanvas->error,$objcanvas->errors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user