Fix: Navigation arrows were missing
This commit is contained in:
parent
763eb8f32c
commit
9ed46d9892
@ -220,7 +220,7 @@ class Fichinter extends CommonObject
|
|||||||
$sql.= " f.tms as datem,";
|
$sql.= " f.tms as datem,";
|
||||||
$sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams";
|
$sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
||||||
if ($ref) $sql.= " WHERE f.ref='".$ref."'";
|
if ($ref) $sql.= " WHERE f.ref='".$this->db->escape($ref)."'";
|
||||||
else $sql.= " WHERE f.rowid=".$rowid;
|
else $sql.= " WHERE f.rowid=".$rowid;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||||
|
|||||||
@ -34,6 +34,7 @@ $langs->load("sendings");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -41,6 +42,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
|||||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||||
|
|
||||||
$object = new Fichinter($db);
|
$object = new Fichinter($db);
|
||||||
|
$result = $object->fetch($id,$ref);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -49,8 +51,6 @@ $object = new Fichinter($db);
|
|||||||
|
|
||||||
if ($action == 'addcontact' && $user->rights->ficheinter->creer)
|
if ($action == 'addcontact' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
|
||||||
|
|
||||||
if ($result > 0 && $id > 0)
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$result = $object->add_contact(GETPOST('contactid','int'), GETPOST('type','int'), GETPOST('source','alpha'));
|
$result = $object->add_contact(GETPOST('contactid','int'), GETPOST('type','int'), GETPOST('source','alpha'));
|
||||||
@ -78,20 +78,12 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer)
|
|||||||
// bascule du statut d'un contact
|
// bascule du statut d'un contact
|
||||||
else if ($action == 'swapstatut' && $user->rights->ficheinter->creer)
|
else if ($action == 'swapstatut' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
|
||||||
{
|
|
||||||
$result=$object->swapContactStatus(GETPOST('ligne','int'));
|
$result=$object->swapContactStatus(GETPOST('ligne','int'));
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Efface un contact
|
// Efface un contact
|
||||||
else if ($action == 'deletecontact' && $user->rights->ficheinter->creer)
|
else if ($action == 'deletecontact' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->delete_contact(GETPOST('lineid','int'));
|
$result = $object->delete_contact(GETPOST('lineid','int'));
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@ -109,26 +101,19 @@ else if ($action == 'deletecontact' && $user->rights->ficheinter->creer)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
$contactstatic=new Contact($db);
|
$contactstatic=new Contact($db);
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
/* *************************************************************************** */
|
|
||||||
/* */
|
// Mode vue et edition
|
||||||
/* Mode vue et edition */
|
|
||||||
/* */
|
|
||||||
/* *************************************************************************** */
|
|
||||||
dol_htmloutput_mesg($mesg);
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
if ($id > 0)
|
|
||||||
{
|
{
|
||||||
if ($object->fetch($id) > 0)
|
|
||||||
{
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($object->socid);
|
$soc->fetch($object->socid);
|
||||||
|
|
||||||
@ -144,7 +129,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
print $object->ref;
|
print $form->showrefnav($object,'ref','',1,'ref','ref');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
@ -161,11 +146,6 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Contacts lines
|
// Contacts lines
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "ErrorRecordNotFound";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ $langs->load("companies");
|
|||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -59,7 +60,7 @@ if (! $sortfield) $sortfield="name";
|
|||||||
|
|
||||||
|
|
||||||
$object = new Fichinter($db);
|
$object = new Fichinter($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id, $ref);
|
||||||
|
|
||||||
$upload_dir = $conf->ficheinter->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->ficheinter->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||||
$modulepart='fichinter';
|
$modulepart='fichinter';
|
||||||
@ -155,7 +156,9 @@ if ($object->id)
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'.$object->ref.'</td></tr>';
|
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
|
||||||
|
print $form->showrefnav($object,'ref','',1,'ref','ref');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Societe
|
// Societe
|
||||||
print "<tr><td>".$langs->trans("Company")."</td><td>".$object->client->getNomUrl(1)."</td></tr>";
|
print "<tr><td>".$langs->trans("Company")."</td><td>".$object->client->getNomUrl(1)."</td></tr>";
|
||||||
|
|||||||
@ -227,7 +227,7 @@ else if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
|||||||
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,7 @@ $langs->load('companies');
|
|||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -37,41 +38,38 @@ if ($user->societe_id) $socid=$user->societe_id;
|
|||||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||||
|
|
||||||
$object = new Fichinter($db);
|
$object = new Fichinter($db);
|
||||||
|
$object->fetch($id,$ref);
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/*
|
||||||
/* Actions */
|
* Actions
|
||||||
/******************************************************************************/
|
*/
|
||||||
|
|
||||||
if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote' && $user->rights->ficheinter->creer)
|
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/*
|
||||||
/* Affichage fiche */
|
* View
|
||||||
/******************************************************************************/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
if ($mesg) print $mesg;
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
if ($object->fetch($id))
|
|
||||||
{
|
|
||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
if ($societe->fetch($object->socid))
|
if ($societe->fetch($object->socid))
|
||||||
{
|
{
|
||||||
@ -80,7 +78,9 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'.$object->ref.'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||||
|
print $form->showrefnav($object,'ref','',1,'ref','ref');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
||||||
@ -93,7 +93,6 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user