Works on contact canvas in relation to the thirdparty canvas module
This commit is contained in:
parent
cb61e196cc
commit
6305c6c8fa
@ -126,4 +126,22 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if (! $user->societe_id) { ?>
|
||||||
|
<div class="tabsAction">
|
||||||
|
|
||||||
|
<?php if ($user->rights->societe->contact->creer) { ?>
|
||||||
|
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas; ?>"><?php echo $langs->trans('Modify'); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { ?>
|
||||||
|
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas; ?>"><?php echo $langs->trans("CreateDolibarrLogin"); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($user->rights->societe->contact->supprimer) { ?>
|
||||||
|
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div><br>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -359,29 +359,6 @@ if (! empty($canvas))
|
|||||||
// Display canvas
|
// Display canvas
|
||||||
$objcanvas->display_canvas();
|
$objcanvas->display_canvas();
|
||||||
|
|
||||||
// Barre d'actions
|
|
||||||
if (! $user->societe_id)
|
|
||||||
{
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->rights->societe->contact->creer)
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="fiche.php?id='.$id.'&action=edit&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! $objcanvas->control->object->user_id && $user->rights->user->user->creer)
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="fiche.php?id='.$id.'&action=create_user&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->societe->contact->supprimer)
|
|
||||||
{
|
|
||||||
print '<a class="butActionDelete" href="fiche.php?id='.$id.'&action=delete&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</div><br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
print show_actions_todo($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);
|
print show_actions_done($conf,$langs,$db,$objsoc,$objcanvas->control->object);
|
||||||
|
|||||||
@ -241,4 +241,20 @@ function CheckVAT(a) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tabsAction">
|
||||||
|
<?php if ($user->rights->societe->creer) { ?>
|
||||||
|
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas; ?>"><?php echo $langs->trans("Modify"); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($user->rights->societe->contact->creer) { ?>
|
||||||
|
<a class="butAction" href="<?php echo DOL_URL_ROOT.'/contact/fiche.php?socid='.$this->control->tpl['id'].'&action=create&canvas='.$canvas; ?>"><?php echo $langs->trans("AddContact"); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($user->rights->societe->supprimer) { ?>
|
||||||
|
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -470,32 +470,6 @@ if (! empty($canvas))
|
|||||||
// Display canvas
|
// Display canvas
|
||||||
$soccanvas->display_canvas();
|
$soccanvas->display_canvas();
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
if ($_GET["action"] == '')
|
|
||||||
{
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->rights->societe->creer)
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?socid='.$socid.'&action=edit&canvas='.$canvas.'">'.$langs->trans("Modify").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->societe->contact->creer)
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid.'&action=create&canvas='.$canvas.'">'.$langs->trans("AddContact").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->societe->supprimer)
|
|
||||||
{
|
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?socid='.$socid.'&action=delete&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
print '<br>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td valign="top" width="50%">';
|
print '<table width="100%"><tr><td valign="top" width="50%">';
|
||||||
print '<a name="builddoc"></a>'; // ancre
|
print '<a name="builddoc"></a>'; // ancre
|
||||||
@ -513,8 +487,7 @@ if (! empty($canvas))
|
|||||||
$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$soccanvas->control->object->default_lang);
|
$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$soccanvas->control->object->default_lang);
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td></td>';
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user