Merge branch 'NEW_contact_project_tab' of github.com:atm-quentin/dolibarr into NEW_contact_project_tab
This commit is contained in:
commit
137371cae5
@ -40,7 +40,7 @@ $hookmanager->initHooks(array('projectcontact'));
|
|||||||
|
|
||||||
$parameters = array('id' => $id);
|
$parameters = array('id' => $id);
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,24 +50,24 @@ if($reshook < 0) {
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if($id) {
|
if ($id) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
|
||||||
|
|
||||||
$object = new Contact($db);
|
$object = new Contact($db);
|
||||||
|
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if(empty($object->thirdparty)) {
|
if (empty($object->thirdparty)) {
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
}
|
}
|
||||||
$socid = $object->thirdparty->id;
|
$socid = $object->thirdparty->id;
|
||||||
$title = $langs->trans("Projects");
|
$title = $langs->trans("Projects");
|
||||||
if(! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
|
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
|
||||||
$title = $object->name." - ".$title;
|
$title = $object->name." - ".$title;
|
||||||
}
|
}
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
if(! empty($conf->notification->enabled)) {
|
if (! empty($conf->notification->enabled)) {
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
}
|
}
|
||||||
$head = contact_prepare_head($object);
|
$head = contact_prepare_head($object);
|
||||||
@ -77,14 +77,13 @@ if($id) {
|
|||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref = '<div class="refidno">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
if(empty($conf->global->SOCIETE_DISABLE_CONTACTS) && !empty($socid)) {
|
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS) && !empty($socid)) {
|
||||||
$object->thirdparty->fetch($socid);
|
$object->thirdparty->fetch($socid);
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= $langs->trans('ThirdParty').' : ';
|
$morehtmlref .= $langs->trans('ThirdParty').' : ';
|
||||||
if($object->thirdparty->id > 0) {
|
if ($object->thirdparty->id > 0) {
|
||||||
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'contact');
|
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'contact');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$morehtmlref .= $langs->trans("ContactNotLinkedToCompany");
|
$morehtmlref .= $langs->trans("ContactNotLinkedToCompany");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,7 +96,7 @@ if($id) {
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent tableforfield">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("UserTitle").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("UserTitle").'</td><td>';
|
||||||
print $object->getCivilityLabel();
|
print $object->getCivilityLabel();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -201,7 +201,6 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("ContactType").'</td>';
|
|
||||||
print '<td class="center">'.$langs->trans("DateStart").'</td>';
|
print '<td class="center">'.$langs->trans("DateStart").'</td>';
|
||||||
print '<td class="center">'.$langs->trans("DateEnd").'</td>';
|
print '<td class="center">'.$langs->trans("DateEnd").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("OpportunityAmountShort").'</td>';
|
print '<td class="right">'.$langs->trans("OpportunityAmountShort").'</td>';
|
||||||
@ -234,7 +233,6 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $
|
|||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.$obj->title.'</td>';
|
print '<td>'.$obj->title.'</td>';
|
||||||
print '<td>'.$obj->libelle.'</td>';
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
|
print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
|
||||||
// Date end
|
// Date end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user