Debug v14
This commit is contained in:
parent
1e7a778ecc
commit
e01c5313a7
@ -460,8 +460,10 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr>';
|
||||
|
||||
// Description
|
||||
print '<tr><td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>'.nl2br($object->description).'</td></tr>';
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>'.dol_htmlentitiesbr($object->description).'</td></tr>';
|
||||
|
||||
$calcproductsunique = $object->nb_different_products();
|
||||
$calcproducts = $object->nb_products();
|
||||
|
||||
@ -57,6 +57,38 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
$morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu;
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.img_picto('', 'project').' '.$langs->trans('Project').' ';
|
||||
if ($usercancreate) {
|
||||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : ';
|
||||
}
|
||||
if ($action == 'classify') {
|
||||
$projectid = $object->fk_project;
|
||||
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$morehtmlref .= $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref .= '</form>';
|
||||
} else {
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||
}
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">';
|
||||
$morehtmlref .= $proj->ref;
|
||||
$morehtmlref .= '</a>';
|
||||
} else {
|
||||
$morehtmlref .= '';
|
||||
}
|
||||
}
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
$shownav = 1;
|
||||
|
||||
@ -623,6 +623,38 @@ if ($resql) {
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
$morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu;
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$langs->load("projects");
|
||||
$morehtmlref .= '<br>'.img_picto('', 'project').' '.$langs->trans('Project').' ';
|
||||
if ($usercancreate && 1 == 2) {
|
||||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : ';
|
||||
}
|
||||
if ($action == 'classify') {
|
||||
$projectid = $object->fk_project;
|
||||
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$morehtmlref .= $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref .= '</form>';
|
||||
} else {
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||
}
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">';
|
||||
$morehtmlref .= $proj->ref;
|
||||
$morehtmlref .= '</a>';
|
||||
} else {
|
||||
$morehtmlref .= '';
|
||||
}
|
||||
}
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
$shownav = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user