Merge remote-tracking branch 'Upstream/develop' into develop-favorite
This commit is contained in:
commit
dad9a54959
@ -5,6 +5,7 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Add number of active notification into tab title (like we do for notes and documents)
|
||||
- New: Can add product into category from category card.
|
||||
- New: PDF event report show project and status of event.
|
||||
- New: Can filter on status on interventions.
|
||||
|
||||
@ -241,13 +241,20 @@ if (empty($reshook))
|
||||
$result = $object->delete();
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/contact/list.php');
|
||||
exit;
|
||||
if ($backtopage)
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/contact/list.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
setEventMessage($object->errors,'errors');
|
||||
setEventMessage($object->error,$object->errors,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,7 +367,7 @@ else
|
||||
{
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1082,27 +1089,27 @@ else
|
||||
{
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a>';
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a>';
|
||||
}
|
||||
|
||||
if (! $object->user_id && $user->rights->user->user->creer)
|
||||
{
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
}
|
||||
|
||||
if ($user->rights->societe->contact->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
print '<a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete'.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
// Activer
|
||||
if ($object->statut == 0 && $user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a>';
|
||||
}
|
||||
// Desactiver
|
||||
if ($object->statut == 1 && $user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a>';
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -877,20 +877,21 @@ class Contact extends CommonObject
|
||||
* @param int $withpicto Include picto with link
|
||||
* @param string $option Where the link point to
|
||||
* @param int $maxlen Max length of
|
||||
* @param string $moreparam Add more param into URL
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='',$maxlen=0)
|
||||
function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($option == 'xxx')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
|
||||
@ -474,14 +474,14 @@ class FormFile
|
||||
// Model
|
||||
if (! empty($modellist))
|
||||
{
|
||||
$out.= '<th align="center" class="formdoc liste_titre">';
|
||||
$out.= '<th align="center" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||
$out.= '<span class="hideonsmartphone">'.$langs->trans('Model').' </span>';
|
||||
if (is_array($modellist) && count($modellist) == 1) // If there is only one element
|
||||
{
|
||||
$arraykeys=array_keys($modellist);
|
||||
$modelselected=$arraykeys[0];
|
||||
}
|
||||
$out.= $form->selectarray('model',$modellist,$modelselected,$showempty,0,0);
|
||||
$out.= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', '');
|
||||
$out.= '</th>';
|
||||
}
|
||||
else
|
||||
@ -492,7 +492,7 @@ class FormFile
|
||||
}
|
||||
|
||||
// Language code (if multilang)
|
||||
$out.= '<th align="center" class="formdoc liste_titre">';
|
||||
$out.= '<th align="center" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||
if (($allowgenifempty || (is_array($modellist) && count($modellist) > 0)) && $conf->global->MAIN_MULTILANGS && ! $forcenomultilang && (! empty($modellist) || $showempty))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
@ -508,7 +508,7 @@ class FormFile
|
||||
|
||||
// Button
|
||||
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
||||
$out.= '<th align="center" colspan="'.($addcolumforpicto?'2':'1').'" class="formdocbutton liste_titre">';
|
||||
$out.= '<th align="center" colspan="'.($addcolumforpicto?'2':'1').'" class="formdocbutton liste_titre maxwidthonsmartphone">';
|
||||
$genbutton = '<input class="button" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"';
|
||||
$genbutton.= ' type="submit" value="'.$buttonlabel.'"';
|
||||
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $genbutton.= ' disabled="disabled"';
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
function societe_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $db, $langs, $conf, $user;
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
@ -109,8 +109,29 @@ function societe_prepare_head($object)
|
||||
// Notifications
|
||||
if (! empty($conf->notification->enabled))
|
||||
{
|
||||
$nbNote = 0;
|
||||
$sql = "SELECT COUNT(n.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
|
||||
$sql.= " WHERE fk_soc = ".$object->id;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$nbNote=$obj->nb;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Notifications");
|
||||
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||
$head[$h][2] = 'notify';
|
||||
$h++;
|
||||
}
|
||||
@ -676,7 +697,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$contactstatic->lastname = $obj->lastname;
|
||||
$contactstatic->firstname = $obj->firstname;
|
||||
$contactstatic->civility_id = $obj->civility_id;
|
||||
print $contactstatic->getNomUrl(1);
|
||||
print $contactstatic->getNomUrl(1,'',0,'&backtopage='.urlencode($backtopage));
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$obj->poste.'</td>';
|
||||
|
||||
@ -681,7 +681,7 @@ ViewPrivateNote=View notes
|
||||
XMoreLines=%s line(s) hidden
|
||||
PublicUrl=Public URL
|
||||
AddBox=Add box
|
||||
|
||||
SelectElementAndClickRefresh=Select an element and click Refresh
|
||||
# Week day
|
||||
Monday=Monday
|
||||
Tuesday=Tuesday
|
||||
|
||||
@ -2157,7 +2157,7 @@ else
|
||||
|
||||
if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC))
|
||||
{
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
print '<a name="builddoc"></a>'; // ancre
|
||||
|
||||
/*
|
||||
@ -2172,7 +2172,7 @@ else
|
||||
|
||||
$somethingshown=$formfile->show_documents('company',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang);
|
||||
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
print '</div></div></div>';
|
||||
|
||||
@ -1692,7 +1692,7 @@ table.noborder, table.formdoc, div.noborder {
|
||||
border-right-style: solid;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: #CCCCCC;
|
||||
border-left-color: #B0B0B0;
|
||||
border-left-style: solid;
|
||||
|
||||
border-bottom-width: 1px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user