Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop_dropdown_bookmark

This commit is contained in:
John Botella 2019-09-30 17:13:54 +02:00
commit 61c8e8ec0c
78 changed files with 1295 additions and 112 deletions

View File

@ -50,7 +50,7 @@ $hookmanager->initHooks(array('accountancyindex'));
llxHeader('', $langs->trans("AccountancyArea"));
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'accountancy');
//dol_fiche_head();
$step = 0;

View File

@ -52,7 +52,7 @@ $staticmember=new Adherent($db);
$statictype=new AdherentType($db);
$subscriptionstatic=new Subscription($db);
print load_fiche_titre($langs->trans("MembersArea"));
print load_fiche_titre($langs->trans("MembersArea"), '', 'members');
$Adherents=array();
$AdherentsAValider=array();

View File

@ -419,7 +419,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
$topicmail="Information";
$modelmail="member";
@ -956,7 +956,7 @@ print "</table>\n";
print "</div>";
print '</form>';
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1);
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 1);
// End of page
llxFooter();

View File

@ -262,7 +262,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
$topicmail="Information";
$modelmail="subscription";

View File

@ -248,7 +248,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
$moreforfilter = '';

View File

@ -45,7 +45,6 @@ llxHeader('', $langs->trans("Setup"), $wikihelp);
print load_fiche_titre($langs->trans("SetupArea"), '', 'tools');
if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
{
$conf->global->MAIN_MOTD_SETUPPAGE=preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', $conf->global->MAIN_MOTD_SETUPPAGE);

View File

@ -237,7 +237,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
$moreforfilter = '';

View File

@ -85,7 +85,7 @@ $newcardbutton='';
$newcardbutton.= dolGetButtonTitle($langs->trans('NewBookmark'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer));
print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton);
print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'generic', 0, $newcardbutton);
$sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,";
$sql.= " u.login, u.lastname, u.firstname";

View File

@ -109,6 +109,7 @@ if ($dateselect > 0)
}
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS;
$tmp=str_replace(' ', '', $tmp); // FIX 7533
$tmparray=explode('-', $tmp);
$begin_h = GETPOST('begin_h', 'int')!=''?GETPOST('begin_h', 'int'):($tmparray[0] != '' ? $tmparray[0] : 9);
$end_h = GETPOST('end_h', 'int')?GETPOST('end_h', 'int'):($tmparray[1] != '' ? $tmparray[1] : 18);
@ -117,6 +118,7 @@ if ($end_h < 1 || $end_h > 24) $end_h = 18;
if ($end_h <= $begin_h) $end_h = $begin_h + 1;
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS;
$tmp=str_replace(' ', '', $tmp); // FIX 7533
$tmparray=explode('-', $tmp);
$begin_d = GETPOST('begin_d', 'int')?GETPOST('begin_d', 'int'):($tmparray[0] != '' ? $tmparray[0] : 1);
$end_d = GETPOST('end_d', 'int')?GETPOST('end_d', 'int'):($tmparray[1] != '' ? $tmparray[1] : 5);

View File

@ -86,6 +86,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
$hookmanager->initHooks(array('thirdpartycomm','globalcard'));
/*
* Actions
*/

View File

@ -79,7 +79,7 @@ if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFourn
llxHeader("", $langs->trans("CommercialArea"));
print load_fiche_titre($langs->trans("CommercialArea"), '', 'title_commercial.png');
print load_fiche_titre($langs->trans("CommercialArea"), '', 'commercial');
print '<div class="fichecenter"><div class="fichethirdleft">';

View File

@ -742,7 +742,7 @@ if ($action == 'create')
// Print mail form
print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'title_generic');
print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'generic');
dol_fiche_head();
@ -1117,7 +1117,7 @@ else
$htmltext.='</i>';
// Print mail content
print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto('<span class="hideonsmartphone">'.$langs->trans("AvailableVariables").'</span>', $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic');
print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto('<span class="hideonsmartphone">'.$langs->trans("AvailableVariables").'</span>', $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'generic');
dol_fiche_head('', '', '', -1);
@ -1262,7 +1262,7 @@ else
$htmltext.='</i>';
// Print mail content
print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic');
print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'generic');
dol_fiche_head(null, '', '', -1);

View File

@ -250,7 +250,7 @@ if ($object->fetch($id) >= 0)
// Show email selectors
if ($allowaddtarget && $user->rights->mailing->creer)
{
print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'title_generic');
print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'generic');
//print '<table class="noborder" width="100%">';
print '<div class="tagtable centpercent liste_titre_bydiv borderbottom" id="tablelines">';
@ -453,7 +453,7 @@ if ($object->fetch($id) >= 0)
if ($allowaddtarget) {
$cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'<a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition">'.$langs->trans("TargetsReset").'</a>';
}
print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit);
print '</form>';

View File

@ -173,7 +173,7 @@ if ($result)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'title_generic.png', 0, $newcardbutton);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'generic', 0, $newcardbutton);
$moreforfilter = '';

View File

@ -462,7 +462,7 @@ if ($resql)
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail="SendPropalRef";
$modelmail="proposal_send";

View File

@ -80,7 +80,7 @@ if ($mode == 'supplier')
llxHeader('', $title);
print load_fiche_titre($title, '', 'title_commercial.png');
print load_fiche_titre($title, '', 'commercial');
dol_mkdir($dir);

View File

@ -1485,7 +1485,7 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
// Mode creation
if ($action == 'create' && $usercancreate)
{
print load_fiche_titre($langs->trans('CreateOrder'), '', 'title_commercial.png');
print load_fiche_titre($langs->trans('CreateOrder'), '', 'commercial');
$soc = new Societe($db);
if ($socid > 0)

View File

@ -464,7 +464,7 @@ if ($resql)
print '<input type="hidden" name="socid" value="'.$socid.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail="SendOrderRef";
$modelmail="order_send";

View File

@ -79,7 +79,7 @@ if ($mode == 'supplier')
llxHeader('', $title);
print load_fiche_titre($title, '', 'title_commercial.png');
print load_fiche_titre($title, '', 'commercial');
dol_mkdir($dir);

View File

@ -87,7 +87,7 @@ $thirdpartystatic = new Societe($db);
llxHeader("", $langs->trans("AccountancyTreasuryArea"));
print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'title_accountancy.png');
print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'invoicing');
print '<div class="fichecenter"><div class="fichethirdleft">';

View File

@ -122,7 +122,7 @@ if ($result)
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit);
print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
$moreforfilter='';

View File

@ -140,7 +140,7 @@ else
$newcardbutton = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/index.php">'.$langs->trans("Back").'</a>';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';

View File

@ -131,7 +131,7 @@ if ($result)
print"\n<!-- debut table -->\n";
print '<form action="'.$_SERVER["PHP_SELF"].'" method="GET">';
print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit);
$moreforfilter='';

View File

@ -1112,7 +1112,7 @@ if ($result > 0)
// Create
if ($action == 'create')
{
print load_fiche_titre($langs->trans('AddContract'), '', 'title_commercial.png');
print load_fiche_titre($langs->trans('AddContract'), '', 'commercial');
$soc = new Societe($db);
if ($socid>0) $soc->fetch($socid);

View File

@ -70,7 +70,7 @@ $now = dol_now();
llxHeader();
print load_fiche_titre($langs->trans("ContractsArea"), '', 'title_commercial.png');
print load_fiche_titre($langs->trans("ContractsArea"), '', 'commercial');
//print '<table border="0" width="100%" class="notopnoleftnoright">';

View File

@ -380,7 +380,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, $newcardbutton, '', $limit);
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail="SendContractRef";
$modelmail="contract";

View File

@ -336,7 +336,7 @@ if ($mode == "0") $title=$langs->trans("ListOfInactiveServices"); // Must use ==
if ($mode == "4" && $filter != "expired") $title=$langs->trans("ListOfRunningServices");
if ($mode == "4" && $filter == "expired") $title=$langs->trans("ListOfExpiredServices");
if ($mode == "5") $title=$langs->trans("ListOfClosedServices");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, '', '', $limit);
if ($sall)
{

View File

@ -69,22 +69,22 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
*/
public function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
$langs->loadLangs(array("boxes", "sendings"));
global $conf, $user, $langs;
$langs->loadLangs(array("boxes", "sendings", "orders"));
$this->max = $max;
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
$supplierorderstatic=new CommandeFournisseur($db);
$supplierorderstatic=new CommandeFournisseur($this->db);
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
$thirdpartytmp = new Fournisseur($db);
$thirdpartytmp = new Fournisseur($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleSupplierOrdersAwaitingReception", $max));
if ($user->rights->fournisseur->commande->lire)
{
$sql = "SELECT s.nom as name, s.rowid as socid,";
$sql.= " s.code_client, s.code_fournisseur,";
$sql.= " s.code_client, s.code_fournisseur, s.email,";
$sql.= " s.logo,";
$sql.= " c.rowid, c.ref, c.tms, c.date_commande, c.date_livraison, ";
$sql.= " c.total_ht,";
@ -102,19 +102,19 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
if ($user->socid) $sql.= " AND s.rowid = ".$user->socid;
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_commande DESC, c.ref DESC ";
else $sql.= " ORDER BY c.date_livraison ASC, c.fk_statut ASC ";
$sql.= $db->plimit($max, 0);
$sql.= $this->db->plimit($max, 0);
$result = $db->query($sql);
$result = $this->db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$num = $this->db->num_rows($result);
$line = 0;
while ($line < $num) {
$objp = $db->fetch_object($result);
$date=$db->jdate($objp->date_commande);
$date_livraison=$db->jdate($objp->date_livraison);
$datem=$db->jdate($objp->tms);
$objp = $this->db->fetch_object($result);
$date=$this->db->jdate($objp->date_commande);
$date_livraison=$this->db->jdate($objp->date_livraison);
$datem=$this->db->jdate($objp->tms);
$supplierorderstatic->date_livraison = $date_livraison;
$supplierorderstatic->statut = $objp->fk_statut;
@ -124,6 +124,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$thirdpartytmp->id = $objp->socid;
$thirdpartytmp->name = $objp->name;
$thirdpartytmp->email = $objp->email;
$thirdpartytmp->fournisseur = 1;
$thirdpartytmp->code_fournisseur = $objp->code_fournisseur;
$thirdpartytmp->logo = $objp->logo;
@ -165,12 +166,12 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
'text' => $langs->trans("NoSupplierOrder"),
);
$db->free($result);
$this->db->free($result);
} else {
$this->info_box_contents[0][] = array(
'td' => '',
'maxlength'=>500,
'text' => ($db->error().' sql='.$sql),
'text' => ($this->db->error().' sql='.$sql),
);
}
}

View File

@ -129,7 +129,7 @@ class CMailFile
* @param string $css Css option
* @param string $trackid Tracking string (contains type and id of related element)
* @param string $moreinheader More in header. $moreinheader must contains the "\r\n" (TODO not supported for other MAIL_SEND_MODE different than 'phpmail' and 'smtps' for the moment)
* @param string $sendcontext 'standard', 'emailing', ... (used to define with sending mode and parameters to use)
* @param string $sendcontext 'standard', 'emailing', ... (used to define which sending mode and parameters to use)
* @param string $replyto Reply-to email (will be set to same value than From by default if not provided)
*/
public function __construct($subject, $to, $from, $msg, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = 0, $errors_to = '', $css = '', $trackid = '', $moreinheader = '', $sendcontext = 'standard', $replyto = '')

View File

@ -6588,10 +6588,19 @@ abstract class CommonObject
$out .= '<td class="';
//$out .= "titlefield";
//if (GETPOST('action', 'none') == 'create') $out.='create';
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
$out .= '">';
if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
else $out .= $labeltoshow;
// BUG #11554 : For public page, use red dot for required fields, instead of bold label
$context = isset($params["context"]) ? $params["context"] : "none";
if ($context=="public") { // Public page : red dot instead of bold ble characters
$out .= '">';
if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
else $out .= $labeltoshow;
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= '&nbsp;<font color="red">*</font>';
} else {
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
$out .= '">';
if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
else $out .= $labeltoshow;
}
$out .= '</td>';
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';

View File

@ -1555,7 +1555,7 @@ class ExtraFields
{
$param_list=array_keys($param['options']); // $param_list='ObjectName:classPath'
$showempty=(($required && $default != '')?0:1);
$out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty);
$out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss);
}
elseif ($type == 'password')
{

View File

@ -7509,7 +7509,7 @@ class Form
*/
public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0)
{
$out.=$this->showFilterButtons();
$out=$this->showFilterButtons();
if ($addcheckuncheckall)
{
$out.=$this->showCheckAddButtons($cssclass, $calljsfunction);

View File

@ -541,7 +541,12 @@ class Notify
'',
'',
0,
-1
-1,
'',
'',
'',
'',
'notification'
);
if ($mailfile->sendfile())
@ -769,7 +774,12 @@ class Notify
'',
'',
0,
1
1,
'',
'',
'',
'',
'notification'
);
if ($mailfile->sendfile())

View File

@ -3017,7 +3017,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
'jabber','skype','twitter','facebook','linkedin',
'chevron-left','chevron-right','chevron-down','chevron-top'
'chevron-left','chevron-right','chevron-down','chevron-top',
'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'project', 'hrm', 'members', 'ticket', 'generic'
)
)) {
$fa='fa';
@ -3027,7 +3028,36 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
if ($pictowithoutext == 'setup') {
$fakey = 'fa-cog';
$fasize = '1.4em';
}
elseif ($pictowithoutext == 'companies') {
$fakey = 'fa-building';
}
elseif ($pictowithoutext == 'products') {
$fakey = 'fa-box-open';
}
elseif ($pictowithoutext == 'commercial') {
$fakey = 'fa-user-tie';
}
elseif ($pictowithoutext == 'invoicing') {
$fakey = 'fa-file-invoice';
}
elseif ($pictowithoutext == 'accountancy') {
$fakey = 'fa-coins';
}
elseif ($pictowithoutext == 'project') {
$fakey = 'fa-project-diagram';
}
elseif ($pictowithoutext == 'hrm') {
$fakey = 'fa-umbrella-beach';
}
elseif ($pictowithoutext == 'members') {
$fakey = 'fa-user-friends';
}
elseif ($pictowithoutext == 'ticket') {
$fakey = 'fa-sticky-note';
}
elseif ($pictowithoutext == 'generic') {
$fakey = 'fa-folder-open';
}
elseif ($pictowithoutext == 'switch_off') {
$fakey = 'fa-toggle-off';
@ -4073,7 +4103,7 @@ function print_titre($title)
* @return void
* @deprecated Use print load_fiche_titre instead
*/
function print_fiche_titre($title, $mesg = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '')
function print_fiche_titre($title, $mesg = '', $picto = 'generic', $pictoisfullpath = 0, $id = '')
{
print load_fiche_titre($title, $mesg, $picto, $pictoisfullpath, $id);
}
@ -4091,13 +4121,13 @@ function print_fiche_titre($title, $mesg = '', $picto = 'title_generic.png', $pi
* @return string
* @see print_barre_liste()
*/
function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '')
function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '')
{
global $conf;
$return='';
if ($picto == 'setup') $picto='title_generic.png';
if ($picto == 'setup') $picto='generic';
$return.= "\n";
$return.= '<table '.($id?'id="'.$id.'" ':'').'class="centpercent notopnoleftnoright'.($morecssontable?' '.$morecssontable:'').'" style="margin-bottom: 6px;"><tr>'; // maring bottom must be same than into print_barre_list
@ -4139,7 +4169,7 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.p
* @param int $hidenavigation Force to hide all navigation tools
* @return void
*/
function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0)
function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'generic', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0)
{
global $conf,$langs;
@ -4148,7 +4178,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
$totalnboflines=abs($totalnboflines);
if ($picto == 'setup') $picto='title_setup.png';
if (($conf->browser->name == 'ie') && $picto=='title_generic.png') $picto='title.gif';
if (($conf->browser->name == 'ie') && $picto=='generic') $picto='title.gif';
if ($limit < 0) $limit = $conf->liste_limit;
if ($savlimit != 0 && (($num > $limit) || ($num == -1) || ($limit == 0)))
{

View File

@ -108,7 +108,21 @@ function ticket_prepare_head($object)
// History
$head[$h][0] = DOL_URL_ROOT.'/ticket/agenda.php?track_id=' . $object->track_id;
$ticketViewType = "messaging";
if(empty($_SESSION['ticket-view-type'])){
$_SESSION['ticket-view-type'] = $ticketViewType;
}
else{
$ticketViewType = $_SESSION['ticket-view-type'];
}
if($ticketViewType == "messaging"){
$head[$h][0] = DOL_URL_ROOT.'/ticket/messaging.php?track_id=' . $object->track_id;
}
else{
// $ticketViewType == "list"
$head[$h][0] = DOL_URL_ROOT.'/ticket/agenda.php?track_id=' . $object->track_id;
}
$head[$h][1] = $langs->trans('Events');
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
{
@ -187,3 +201,600 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
print '<div class="ticketlargemargin">';
}
/**
* Show html area with actions for ticket messaging.
* Note: Global parameter $param must be defined.
*
* @param Conf $conf Object conf
* @param Translate $langs Object langs
* @param DoliDB $db Object db
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object
* @param Contact $objcon Filter on object contact to filter events on a contact
* @param int $noprint Return string but does not output it
* @param string $actioncode Filter on actioncode
* @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all).
* @param array $filters Filter on other fields
* @param string $sortfield Sort field
* @param string $sortorder Sort order
* @return string|void Return html part or void if noprint is 1
*/
function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC')
{
global $user, $conf;
global $form;
global $param, $massactionbutton;
dol_include_once('/comm/action/class/actioncomm.class.php');
// Check parameters
if (! is_object($filterobj) && ! is_object($objcon)) dol_print_error('', 'BadParameter');
$out='';
$histo=array();
$numaction = 0 ;
$now=dol_now('tzuser');
// Open DSI -- Fix order by -- Begin
$sortfield_list = explode(',', $sortfield);
$sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent');
$sortfield_new_list = array();
foreach ($sortfield_list as $sortfield_value) {
$sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)];
}
$sortfield_new = implode(',', $sortfield_new_list);
if (! empty($conf->agenda->enabled))
{
// Recherche histo sur actioncomm
if (is_object($objcon) && $objcon->id > 0) {
$sql = "SELECT DISTINCT a.id, a.label as label,";
}
else
{
$sql = "SELECT a.id, a.label as label,";
}
$sql.= " a.datep as dp,";
$sql.= " a.note as message,";
$sql.= " a.datep2 as dp2,";
$sql.= " a.percent as percent, 'action' as type,";
$sql.= " a.fk_element, a.elementtype,";
$sql.= " a.fk_contact,";
$sql.= " c.code as acode, c.libelle as alabel, c.picto as apicto,";
$sql.= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname";
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= ", sp.lastname, sp.firstname";
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", m.lastname, m.firstname";
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", o.ref";
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", o.ref";
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql.= ", o.ref";
elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql.= ", o.ref";
elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql.= ", o.ref";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id";
$force_filter_contact = false;
if (is_object($objcon) && $objcon->id > 0) {
$force_filter_contact = true;
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm";
$sql.= " AND r.element_type = '" . $db->escape($objcon->table_element) . "' AND r.fk_element = " . $objcon->id;
}
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') {
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er";
$sql.= " ON er.resource_type = 'dolresource'";
$sql.= " AND er.element_id = a.id";
$sql.= " AND er.resource_id = ".$filterobj->id;
}
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o";
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql.= ", ".MAIN_DB_PREFIX."product as o";
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql.= ", ".MAIN_DB_PREFIX."ticket as o";
elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql.= ", ".MAIN_DB_PREFIX."bom_bom as o";
elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql.= ", ".MAIN_DB_PREFIX."contrat as o";
$sql.= " WHERE a.entity IN (".getEntity('agenda').")";
if ($force_filter_contact === false) {
if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id;
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent')
{
$sql.= " AND a.fk_element = m.rowid AND a.elementtype = 'member'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur')
{
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
elseif (is_object($filterobj) && get_class($filterobj) == 'Product')
{
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'product'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket')
{
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
elseif (is_object($filterobj) && get_class($filterobj) == 'BOM')
{
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat')
{
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
}
// Condition on actioncode
if (! empty($actioncode))
{
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
if ($actioncode == 'AC_NON_AUTO') $sql.= " AND c.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'";
else
{
if ($actioncode == 'AC_OTH') $sql.= " AND c.type != 'systemauto'";
elseif ($actioncode == 'AC_OTH_AUTO') $sql.= " AND c.type = 'systemauto'";
}
}
else
{
if ($actioncode == 'AC_NON_AUTO') $sql.= " AND c.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'";
else $sql.= " AND c.code = '".$db->escape($actioncode)."'";
}
}
if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']);
}
// Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing.
if (! empty($conf->mailing->enabled) && ! empty($objcon->email)
&& (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING'))
{
$langs->load("mails");
$sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type";
$sql2.= ", '' as fk_element, '' as elementtype, '' as contact_id";
$sql2.= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto";
$sql2.= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2.= ", '' as lastname, '' as firstname";
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2.= ", '' as lastname, '' as firstname";
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2.= ", '' as ref";
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2.= ", '' as ref";
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2.= ", '' as ref";
$sql2.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u";
$sql2.= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email.
$sql2.= " AND mc.statut = 1";
$sql2.= " AND u.rowid = m.fk_user_valid";
$sql2.= " AND mc.fk_mailing=m.rowid";
}
if (!empty($sql) && !empty($sql2)) {
$sql = $sql . " UNION " . $sql2;
} elseif (empty($sql) && !empty($sql2)) {
$sql = $sql2;
}
//TODO Add limit in nb of results
$sql.= $db->order($sortfield_new, $sortorder);
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
{
$i = 0 ;
$num = $db->num_rows($resql);
while ($i < $num)
{
$obj = $db->fetch_object($resql);
if ($obj->type == 'action') {
$contactaction = new ActionComm($db);
$contactaction->id=$obj->id;
$result = $contactaction->fetchResources();
if ($result<0) {
dol_print_error($db);
setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors');
}
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
//elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
$tododone='';
if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone='todo';
$histo[$numaction]=array(
'type'=>$obj->type,
'tododone'=>$tododone,
'id'=>$obj->id,
'datestart'=>$db->jdate($obj->dp),
'dateend'=>$db->jdate($obj->dp2),
'note'=>$obj->label,
'message'=>$obj->message,
'percent'=>$obj->percent,
'userid'=>$obj->user_id,
'login'=>$obj->user_login,
'userfirstname'=>$obj->user_firstname,
'userlastname'=>$obj->user_lastname,
'userphoto'=>$obj->user_photo,
'contact_id'=>$obj->fk_contact,
'socpeopleassigned' => $contactaction->socpeopleassigned,
'lastname'=>$obj->lastname,
'firstname'=>$obj->firstname,
'fk_element'=>$obj->fk_element,
'elementtype'=>$obj->elementtype,
// Type of event
'acode'=>$obj->acode,
'alabel'=>$obj->alabel,
'libelle'=>$obj->alabel, // deprecated
'apicto'=>$obj->apicto
);
} else {
$histo[$numaction]=array(
'type'=>$obj->type,
'tododone'=>'done',
'id'=>$obj->id,
'datestart'=>$db->jdate($obj->dp),
'dateend'=>$db->jdate($obj->dp2),
'note'=>$obj->label,
'message'=>$obj->message,
'percent'=>$obj->percent,
'acode'=>$obj->acode,
'userid'=>$obj->user_id,
'login'=>$obj->user_login,
'userfirstname'=>$obj->user_firstname,
'userlastname'=>$obj->user_lastname,
'userphoto'=>$obj->user_photo
);
}
$numaction++;
$i++;
}
}
else
{
dol_print_error($db);
}
if (! empty($conf->agenda->enabled) || (! empty($conf->mailing->enabled) && ! empty($objcon->email)))
{
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
$formactions=new FormActions($db);
$actionstatic=new ActionComm($db);
$userstatic=new User($db);
$contactstatic = new Contact($db);
$userGetNomUrlCache = array();
$out.='<div class="filters-container" >';
$out.='<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
if ($objcon && get_class($objcon) == 'Contact' &&
(is_null($filterobj) || get_class($filterobj) == 'Societe'))
{
$out.='<input type="hidden" name="id" value="'.$objcon->id.'" />';
}
else
{
$out.='<input type="hidden" name="id" value="'.$filterobj->id.'" />';
}
if ($filterobj && get_class($filterobj) == 'Societe') $out.='<input type="hidden" name="socid" value="'.$filterobj->id.'" />';
$out.="\n";
$out.='<div class="div-table-responsive-no-min">';
$out.='<table class="noborder" width="100%">';
$out.='<tr class="liste_titre">';
$out.='<td class="liste_titre"><strong>'.$langs->trans("Search").' : </strong></td>';
if ($donetodo)
{
$out.='<td class="liste_titre"></td>';
}
$out.='<td class="liste_titre">'.$langs->trans("Type").' ';
$out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1, 0, 0, 1);
$out.='</td>';
$out.='<td class="liste_titre maxwidth100onsmartphone">';
$out.=$langs->trans("Label").' ';
$out.='<input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'">';
$out.='</td>';
$out.='<td class="liste_titre" align="middle">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
$out.=$searchpicto;
$out.='</td>';
$out.='</tr>';
$out.='</table>';
$out.='</form>';
$out.='</div>';
$out.="\n";
$out.='<ul class="timeline">';
if ($donetodo)
{
$tmp='';
if (get_class($filterobj) == 'Societe') $tmp.='<a href="'.DOL_URL_ROOT.'/comm/action/list.php?socid='.$filterobj->id.'&amp;status=done">';
$tmp.=($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : '');
$tmp.=($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : '');
$tmp.=($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : '');
//$out.=$langs->trans("ActionsToDoShort").' / '.$langs->trans("ActionsDoneShort");
if (get_class($filterobj) == 'Societe') $tmp.='</a>';
$out.=getTitleFieldOfList($tmp);
}
//require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
//$caction=new CActionComm($db);
//$arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), '', 1);
$actualCycleDate = false;
foreach ($histo as $key=>$value)
{
$actionstatic->fetch($histo[$key]['id']); // TODO Do we need this, we already have a lot of data of line into $histo
$actionstatic->type_picto=$histo[$key]['apicto'];
$actionstatic->type_code=$histo[$key]['acode'];
$url = DOL_URL_ROOT.'/comm/action/card.php?id='.$histo[$key]['id'];
$tmpa=dol_getdate($histo[$key]['datestart'], false);
if($actualCycleDate !== $tmpa['year'].'-'.$tmpa['yday']){
$actualCycleDate = $tmpa['year'].'-'.$tmpa['yday'];
$out.='<!-- timeline time label -->';
$out.='<li class="time-label">';
$out.='<span class="timeline-badge-date">';
$out.= dol_print_date($histo[$key]['datestart'], 'daytext', 'tzserver', $langs);
$out.='</span>';
$out.='</li>';
$out.='<!-- /.timeline-label -->';
}
$out.='<!-- timeline item -->'."\n";
$out.='<li class="timeline-code-'.strtolower($actionstatic->code).'">';
$out.='<!-- timeline icon -->'."\n";
$iconClass = 'fa fa-comments';
$img_picto = '';
$colorClass = '';
$pictoTitle = '';
if ($histo[$key]['percent']==-1) {
$colorClass = 'timeline-icon-not-applicble';
$pictoTitle = $langs->trans('StatusNotApplicable');
}
elseif ($histo[$key]['percent']==0) {
$colorClass = 'timeline-icon-todo';
$pictoTitle = $langs->trans('StatusActionToDo') . ' (0%)';
}
elseif ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100){
$colorClass = 'timeline-icon-in-progress';
$pictoTitle = $langs->trans('StatusActionInProcess').' ('.$histo[$key]['percent'].'%)';
}
elseif ($histo[$key]['percent'] >= 100){
$colorClass = 'timeline-icon-done';
$pictoTitle = $langs->trans('StatusActionDone').' (100%)';
}
if($actionstatic->code == 'AC_TICKET_CREATE'){
$iconClass = 'fa fa-ticket';
}
elseif($actionstatic->code == 'AC_TICKET_MODIFY'){
$iconClass = 'fa fa-pencil';
}
elseif($actionstatic->code == 'TICKET_MSG'){
$iconClass = 'fa fa-comments';
}
elseif($actionstatic->code == 'TICKET_MSG_PRIVATE'){
$iconClass = 'fa fa-mask';
}
elseif (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
if ($actionstatic->type_picto) $img_picto = img_picto('', $actionstatic->type_picto);
else {
if ($actionstatic->type_code == 'AC_RDV') $iconClass = 'fa fa-handshake';
elseif ($actionstatic->type_code == 'AC_TEL') $iconClass = 'fa fa-phone';
elseif ($actionstatic->type_code == 'AC_FAX') $iconClass = 'fa fa-fax';
elseif ($actionstatic->type_code == 'AC_EMAIL') $iconClass = 'fa fa-envelope';
elseif ($actionstatic->type_code == 'AC_INT') $iconClass = 'fa fa-shipping-fast';
elseif ($actionstatic->type_code == 'AC_OTH_AUTO') $iconClass = 'fa fa-robot';
elseif (! preg_match('/_AUTO/', $actionstatic->type_code)) $iconClass = 'fa fa-robot';
}
}
$out.='<i class="'.$iconClass .' '.$colorClass.'" title="'.$pictoTitle .'">'.$img_picto.'</i>'."\n";
$out.='<div class="timeline-item">'."\n";
$out.='<span class="timeline-header-action">';
if (isset($histo[$key]['type']) && $histo[$key]['type']=='mailing') {
$out.='<a class="timeline-btn" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' ';
$out.=$histo[$key]['id'];
$out.='</a> ';
} else {
$out.=$actionstatic->getNomUrl(1, -1).' ';
}
// if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id)
// {
// $out.='<a href="'.$url.'" class="timeline-btn" title="'.$langs->trans('Show').'" ><i class="fa fa-calendar" ></i>'.$langs->trans('Show').'</a>';
// }
if ($user->rights->agenda->allactions->create ||
(($actionstatic->authorid == $user->id || $actionstatic->userownerid == $user->id) && $user->rights->agenda->myactions->create))
{
$out.='<a class="timeline-btn" href="' . DOL_MAIN_URL_ROOT. '/comm/action/card.php?action=edit&id='.$actionstatic->id.'"><i class="fa fa-pencil" title="'.$langs->trans("Modify").'" ></i></a>';
}
$out.='</span>';
// Date
$out.='<span class="time"><i class="fa fa-clock-o"></i> ';
$out.=dol_print_date($histo[$key]['datestart'], 'dayhour');
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart'])
{
$tmpa=dol_getdate($histo[$key]['datestart'], true);
$tmpb=dol_getdate($histo[$key]['dateend'], true);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out.='-'.dol_print_date($histo[$key]['dateend'], 'hour');
else $out.='-'.dol_print_date($histo[$key]['dateend'], 'dayhour');
}
$late=0;
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late=1;
if ($histo[$key]['percent'] == 0 && ! $histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late=1;
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) $late=1;
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && ! $histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late=1;
if ($late) $out.=img_warning($langs->trans("Late")).' ';
$out.="</span>\n";
// Ref
$out.='<h3 class="timeline-header">';
// Author of event
$out.='<span class="messaging-author">';
if ($histo[$key]['userid'] > 0)
{
if(!isset($userGetNomUrlCache[$histo[$key]['userid']])){ // is in cache ?
$userstatic->fetch($histo[$key]['userid']);
$userGetNomUrlCache[$histo[$key]['userid']] = $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', '');
}
$out.= $userGetNomUrlCache[$histo[$key]['userid']];
}
$out.='</span>';
// Title
$out .= ' <span class="messaging-title">';
if($actionstatic->code == 'TICKET_MSG') {
$out .= $langs->trans('TicketNewMessage');
}
elseif($actionstatic->code == 'TICKET_MSG_PRIVATE') {
$out .= $langs->trans('TicketNewMessage').' <em>('.$langs->trans('Private').')</em>';
}else{
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
$transcode = $langs->trans("Action" . $histo[$key]['acode']);
$libelle = ($transcode != "Action" . $histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
$libelle = $histo[$key]['note'];
$actionstatic->id = $histo[$key]['id'];
$out .= dol_trunc($libelle, 120);
}
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
$out .= '<a href="' . DOL_URL_ROOT . '/comm/mailing/card.php?id=' . $histo[$key]['id'] . '">' . img_object($langs->trans("ShowEMailing"), "email") . ' ';
$transcode = $langs->trans("Action" . $histo[$key]['acode']);
$libelle = ($transcode != "Action" . $histo[$key]['acode'] ? $transcode : 'Send mass mailing');
$out .= dol_trunc($libelle, 120);
}
}
$out .= '</span>';
$out.='</h3>';
if (! empty($histo[$key]['message'])
&& $actionstatic->code != 'AC_TICKET_CREATE'
&& $actionstatic->code != 'AC_TICKET_MODIFY'
)
{
$out.='<div class="timeline-body">';
$out.=$histo[$key]['message'];
$out.='</div>';
}
// Timeline footer
$footer = '';
// Contact for this action
if (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
$contactList = '';
foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) {
$contact = new Contact($db);
$result = $contact->fetch($cid);
if ($result < 0)
dol_print_error($db, $contact->error);
if ($result > 0) {
$contactList.= !empty($contactList)?', ':'';
$contactList .= $contact->getNomUrl(1);
if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') {
if (! empty($contact->phone_pro))
$contactList .= '(' . dol_print_phone($contact->phone_pro) . ')';
}
}
}
$footer .= $langs->trans('ActionOnContact').' : '.$contactList;
}
elseif (empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0)
{
$contact = new Contact($db);
$result = $contact->fetch($histo[$key]['contact_id']);
if ($result < 0)
dol_print_error($db, $contact->error);
if ($result > 0) {
$footer .= $contact->getNomUrl(1);
if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') {
if (! empty($contact->phone_pro))
$footer .= '(' . dol_print_phone($contact->phone_pro) . ')';
}
}
}
if(!empty($footer)){
$out.='<div class="timeline-footer">'.$footer.'</div>';
}
$out.='</div>'."\n"; // end timeline-item
$out.='</li>';
$out.='<!-- END timeline item -->';
$i++;
}
$out.="</ul>\n";
}
if ($noprint) return $out;
else print $out;
}

View File

@ -43,7 +43,7 @@ llxHeader("", $langs->trans("Tools"), "");
$text=$langs->trans("Tools");
print load_fiche_titre($text);
print load_fiche_titre($text, '', 'generic');
// Show description of content
print '<div class="justify">'.$langs->trans("ToolsDesc").'</div><br><br>';

View File

@ -41,7 +41,8 @@ $parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
print $object->showOptionals($extrafields, 'edit');
$params = isset($tpl_context) ? array('context' => $tpl_context) : array(); // BUG #11554 : Add context in params
print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params
}
?>

View File

@ -41,7 +41,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
{
// for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid')
$morecss='';
if ($typeofextrafield == 'sellist') $morecss='maxwidth200';
if (in_array($typeofextrafield, array('link', 'sellist'))) $morecss='maxwidth200';
echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
}
print '</td>';

View File

@ -154,7 +154,7 @@ if ($resql)
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton);
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton);
if ($search_all)
{

View File

@ -473,7 +473,7 @@ if ($resql)
$newcardbutton.= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expensereport/card.php?action=create');
}
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
}
$topicmail="SendExpenseReport";

View File

@ -248,7 +248,7 @@ $today = dol_mktime(
* Create mode
*/
if ($action == 'create') {
print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png');
print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'commercial');
$object = new Fichinter($db); // Source invoice
//$object = new Managementfichinter($db); // Source invoice
@ -439,7 +439,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
else
dol_print_error('', "Error, no invoice ".$object->id);
} elseif ($action == 'selsocforcreatefrommodel') {
print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png');
print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'commercial');
dol_fiche_head('');
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
@ -810,7 +810,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
'',
$num,
'',
'title_commercial.png'
'commercial'
);
print $langs->trans("ToCreateAPredefinedInterventional").'<br><br>';

View File

@ -327,7 +327,7 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail="Information";
$modelmail="intervention";

View File

@ -65,7 +65,7 @@ $dir=$conf->ficheinter->dir_temp;
llxHeader('', $title);
print load_fiche_titre($title, '', 'title_commercial.png');
print load_fiche_titre($title, '', 'commercial');
dol_mkdir($dir);

View File

@ -649,7 +649,7 @@ if ($resql)
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail="SendOrderRef";
$modelmail="order_supplier_send";

View File

@ -77,7 +77,7 @@ $childids[]=$user->id;
llxHeader('', $langs->trans('HRMArea'));
print load_fiche_titre($langs->trans("HRMArea"), '', 'title_hrm.png');
print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm');
if (! empty($setupcompanynotcomplete))

View File

@ -80,7 +80,7 @@ llxHeader('', $title);
$resultboxes=FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'title_home');
print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'home');
if (! empty($conf->global->MAIN_MOTD))
{

View File

@ -4,6 +4,7 @@ LatestBOMModified=Latest %s Bills of materials modified
BillOfMaterials=Bill of Material
BOMsSetup=Setup of module BOM
ListOfBOMs=List of bills of material - BOM
ListOfManufacturingOrders=List of Manufacturing Orders
NewBOM=New bill of material
ProductBOMHelp=Product to create with this BOM
BOMsNumberingModules=BOM numbering templates
@ -16,4 +17,8 @@ ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the produc
DeleteBillOfMaterials=Delete Bill Of Materials
ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material?
MenuMRP=Manufacturing Orders
NewMO=New Manufacturing Order
NewMO=New Manufacturing Order
QtyToProduce=Qty to produce
DateStartPlannedMo=Date start planned
DateEndPlannedMo=Date end planned
KeepEmptyForAsap=Empty means 'As Soon As Possible'

View File

@ -137,6 +137,10 @@ NoUnreadTicketsFound=No unread ticket found
TicketViewAllTickets=View all tickets
TicketViewNonClosedOnly=View only open tickets
TicketStatByStatus=Tickets by status
OrderByDateAsc=Sort by ascending date
OrderByDateDesc=Sort by descending date
MessagingViewType=Show as messaging list
MessageListViewType=Show as table list
#
# Ticket card

View File

@ -190,7 +190,7 @@ if ($action == 'create')
dol_fiche_head(array(), '');
print '<table class="border centpercent">'."\n";
print '<table class="border centpercent tableforfieldcreate">'."\n";
// Common attributes
include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';

View File

@ -245,7 +245,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton='';
$newcardbutton.= dolGetButtonTitle($langs->trans('NewSurvey'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/opensurvey/wizard/index.php', '', $user->rights->opensurvey->write);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
// Add code for pre mass action (confirmation or email presend form)
$topicmail="SendOpenSurveyRef";

View File

@ -77,7 +77,7 @@ if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enable
llxHeader("", $langs->trans("ProductsAndServices"), $helpurl);
$linkback="";
print load_fiche_titre($transAreaType, $linkback, 'title_products.png');
print load_fiche_titre($transAreaType, $linkback, 'products');
print '<div class="fichecenter"><div class="fichethirdleft">';

View File

@ -184,7 +184,7 @@ if ($result)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($langs->trans("ListOfWarehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'generic', 0, $newcardbutton, '', $limit);
if ($sall)
{

View File

@ -728,7 +728,7 @@ if ($resql)
if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">';
if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit);
else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit);
if ($sall)
{

View File

@ -706,7 +706,7 @@ if ($resql)
if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">';
if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit);
else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit);
if ($sall)
{

View File

@ -438,7 +438,7 @@ $head[1][1] = $langs->trans("ReplenishmentOrders");
$head[1][2] = 'replenishorders';
print load_fiche_titre($langs->trans('Replenishment'), '', 'title_generic.png');
print load_fiche_titre($langs->trans('Replenishment'), '', 'generic');
dol_fiche_head($head, 'replenish', '', -1, '');

View File

@ -93,7 +93,7 @@ $texte = $langs->trans('ReplenishmentOrders');
llxHeader('', $texte, $helpurl, '');
print load_fiche_titre($langs->trans('Replenishment'), '', 'title_generic.png');
print load_fiche_titre($langs->trans('Replenishment'), '', 'generic');
$head = array();
$head[0][0] = DOL_URL_ROOT.'/product/stock/replenish.php';

View File

@ -53,7 +53,7 @@ if (empty($conf) || ! is_object($conf)) {
</script>';
print load_fiche_titre($langs->trans("StockCorrection"), '', 'title_generic.png');
print load_fiche_titre($langs->trans("StockCorrection"), '', 'generic');
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">'."\n";

View File

@ -53,7 +53,7 @@ if (empty($conf) || ! is_object($conf)) {
}
}
print load_fiche_titre($langs->trans("StockTransfer"), '', 'title_generic.png');
print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic');
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">'."\n";

View File

@ -236,8 +236,8 @@ $linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-
$linktolist = dolGetButtonTitle($langs->trans('GoToListOfTasks'), '', 'fa fa-tasks paddingleft', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id);
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktolist.' &nbsp; '.$linktocreatetask, 'title_generic.png');
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktolist.' &nbsp; '.$linktocreatetask, 'generic');
// Get list of tasks in tasksarray and taskarrayfiltered

View File

@ -88,7 +88,7 @@ $morehtml.='</SELECT>';
$morehtml.='<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
$morehtml.='</form>';
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml);
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
// Show description of content
print '<div class="opacitymedium">';

View File

@ -671,8 +671,8 @@ elseif ($id > 0 || ! empty($ref))
$title=$langs->trans("ListOfTasks");
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-calendar-minus-o paddingleft', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1');
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktotasks.' &nbsp; '.$linktocreatetask, 'title_generic.png');
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktotasks.' &nbsp; '.$linktocreatetask, 'generic');
// Get list of tasks in tasksarray and taskarrayfiltered
// We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him).

View File

@ -941,7 +941,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$title=$langs->trans("ListTaskTimeUserProject");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $linktocreatetime, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit);
}
else
{
@ -949,7 +949,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$title=$langs->trans("ListTaskTimeForTask");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, $linktocreatetime, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit);
}
$i = 0;

View File

@ -645,6 +645,7 @@ print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="ph
// Public
print '<tr><td>'.$langs->trans("Public").'</td><td><input type="checkbox" name="public"></td></tr>'."\n";
// Other attributes
$tpl_context = 'public'; //BUG #11554 : define templae context to public
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
// Comments
print '<tr>';

View File

@ -226,7 +226,7 @@ if ($action == 'create' || $object->fetch($id) > 0)
{
if ($action == 'create')
{
print load_fiche_titre($title, '', 'title_generic');
print load_fiche_titre($title, '', 'generic');
dol_fiche_head('');
}
else

View File

@ -199,7 +199,7 @@ if($ret == -1) {
$newcardbutton.= dolGetButtonTitle($langs->trans('MenuResourceAdd'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/resource/card.php?action=create');
}
print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit);
print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
}
$moreforfilter = '';

View File

@ -1513,7 +1513,7 @@ else
print '<td>'.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1);
// Note: If user has no right to "see all thirdparties", we for selection of sale representative to him, so after creation he can see the record.
// Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record.
$selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : (empty($user->rights->societe->client->voir)?array($user->id):array())));
print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%");
print '</td></tr>';

View File

@ -55,7 +55,7 @@ $helpurl='EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Terceros';
llxHeader("", $langs->trans("ThirdParties"), $helpurl);
$linkback='';
print load_fiche_titre($transAreaType, $linkback, 'title_companies.png');
print load_fiche_titre($transAreaType, $linkback, 'companies');
//print '<table border="0" width="100%" class="notopnoleftnoright">';

View File

@ -403,7 +403,7 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail="SendSupplierProposalRef";
$modelmail="supplier_proposal_send";

View File

@ -60,6 +60,19 @@ span.butAction, span.butActionDelete {
/* text-align: center; New button are on right of screen */
cursor: pointer;
}
.tableforfieldcreate a.butActionNew>span.fa-plus-circle, a.butActionNew>span.fa-plus-circle:hover,
span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover,
a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover {
font-size: 1em;
padding-left: 0px;
}
a.butActionNew>span.fa-plus-circle, a.butActionNew>span.fa-plus-circle:hover,
span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover,
a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover,
@ -68,7 +81,10 @@ a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover,
span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover,
a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover,
span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover {
padding-<?php echo $left; ?>: 6px; font-size: 1.5em; border: none; box-shadow: none; webkit-box-shadow: none;
padding-<?php echo $left; ?>: 6px;
font-size: 1.5em;
border: none;
box-shadow: none; webkit-box-shadow: none;
}
.butAction:hover {
@ -208,7 +224,9 @@ TITLE BUTTON
display: block;
}
div.pagination li:first-child a.btnTitle{
margin-left: 10px;
}

View File

@ -249,8 +249,9 @@ select.flat, form.flat select {
select:invalid {
color: gray;
}
input:disabled {
background:#ddd;
input:disabled, textarea:disabled, select[disabled='disabled']
{
background:#eee;
}
input.liste_titre {
@ -261,9 +262,6 @@ input.removedfile {
border: 0px !important;
vertical-align: text-bottom;
}
textarea:disabled {
background:#ddd;
}
input[type=file ] { background-color: transparent; border-top: none; border-left: none; border-right: none; box-shadow: none; }
input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; }
input[type=radio] { background-color: transparent; border: none; box-shadow: none; }
@ -5861,3 +5859,4 @@ div.tabsElem a.tab {
include dol_buildpath($path.'/theme/'.$theme.'/dropdown.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/info-box.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/progress.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/timeline.inc.php', 0);

View File

@ -0,0 +1,197 @@
<?php
/*!
Source :
* AdminLTE v2.4.8
* Author: Almsaeed Studio
* Website: Almsaeed Studio <https://adminlte.io>
* License: Open source - MIT
* Please visit http://opensource.org/licenses/MIT for more information
*/
if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
/* <style type="text/css" > */
/*
* Component: Timeline
* -------------------
*/
.timeline {
position: relative;
margin: 0 0 30px 0;
padding: 0;
list-style: none;
}
.timeline:before {
content: '';
position: absolute;
top: 0;
bottom: 0;
width: 4px;
background: #ddd;
left: 31px;
margin: 0;
border-radius: 2px;
}
.timeline > li {
position: relative;
margin-right: 0;
margin-bottom: 15px;
}
.timeline > li:before,
.timeline > li:after {
content: " ";
display: table;
}
.timeline > li:after {
clear: both;
}
.timeline > li > .timeline-item {
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border:1px solid #d2d2d2;
border-radius: 3px;
margin-top: 0;
background: #fff;
color: #444;
margin-left: 60px;
margin-right: 0px;
padding: 0;
position: relative;
}
.timeline > li.timeline-code-ticket_msg_private > .timeline-item {
background: #fffbe5;
border-color: #d0cfc0;
}
.timeline > li > .timeline-item > .time{
color: #6f6f6f;
float: right;
padding: 10px;
font-size: 12px;
}
.timeline > li > .timeline-item > .timeline-header-action{
color: #6f6f6f;
float: right;
padding: 7px;
font-size: 12px;
}
a.timeline-btn:link,
a.timeline-btn:visited,
a.timeline-btn:hover,
a.timeline-btn:active
{
display: inline-block;
margin-bottom: 0;
font-weight: 400;
border-radius: 0;
box-shadow: none;
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
text-align: center;
white-space: nowrap;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
user-select: none;
background-image: none;
text-decoration: none;
background-color: #f4f4f4;
color: #444;
border: 1px solid #ddd;
}
a.timeline-btn:hover
{
background-color: #e7e7e7;
color: #333;
border-color: #adadad;;
}
.timeline > li > .timeline-item > .timeline-header {
margin: 0;
color: #333;
border-bottom: 1px solid #f4f4f4;
padding: 10px;
font-size: 14px;
font-weight: normal;
line-height: 1.1;
}
.timeline > li.timeline-code-ticket_msg_private > .timeline-item > .timeline-header {
border-color: #ecebda;
}
.timeline > li > .timeline-item > .timeline-header > a {
font-weight: 600;
}
.timeline > li > .timeline-item > .timeline-body,
.timeline > li > .timeline-item > .timeline-footer {
padding: 10px;
}
.timeline > li > .fa,
.timeline > li > .glyphicon,
.timeline > li > .ion {
width: 30px;
height: 30px;
font-size: 15px;
line-height: 30px;
position: absolute;
color: #666;
background: #d2d6de;
border-radius: 50%;
text-align: center;
left: 18px;
top: 0;
}
.timeline > .time-label > span {
font-weight: 600;
padding: 5px;
display: inline-block;
background-color: #fff;
border-radius: 4px;
}
.timeline-inverse > li > .timeline-item {
background: #f0f0f0;
border: 1px solid #ddd;
-webkit-box-shadow: none;
box-shadow: none;
}
.timeline-inverse > li > .timeline-item > .timeline-header {
border-bottom-color: #ddd;
}
.timeline-icon-todo,
.timeline-icon-in-progress,
.timeline-icon-done{
color: #fff !important;
}
.timeline-icon-not-applicble{
color: #000;
background-color: #f7f7f7;
}
.timeline-icon-todo{
background-color: #dd4b39 !important;
}
.timeline-icon-in-progress{
background-color: #00c0ef !important;
}
.timeline-icon-done{
background-color: #00a65a !important;
}
.timeline-badge-date{
background-color: #0073b7 !important;
color: #fff !important;
}

View File

@ -468,8 +468,10 @@ select.flat, form.flat select {
opacity: 0;
}
select:invalid { color: gray; }
input:disabled {
background:#f4f4f4;
input:disabled, textarea:disabled, select[disabled='disabled']
{
background:#eee;
}
input.liste_titre {
@ -483,9 +485,7 @@ input.removedfile {
border: 0px !important;
vertical-align: text-bottom;
}
textarea:disabled {
background:#f4f4f4;
}
input[type=file ] { background-color: transparent; border-top: none; border-left: none; border-right: none; box-shadow: none; }
input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; }
input[type=radio] { background-color: transparent; border: none; box-shadow: none; }
@ -5800,6 +5800,7 @@ border-top-right-radius: 6px;
include dol_buildpath($path.'/theme/'.$theme.'/dropdown.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/info-box.inc.php', 0);
include dol_buildpath($path.'/theme/'.$theme.'/progress.inc.php', 0);
include dol_buildpath($path.'/theme/eldy/timeline.inc.php', 0); // actually md use same style as eldy theme

View File

@ -103,6 +103,12 @@ $parameters=array('id'=>$socid);
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if(empty($reshook))
{
// Set view style
$_SESSION['ticket-view-type'] = "list";
}
// Purge search criteria
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers
{
@ -225,7 +231,23 @@ if (!empty($object->id))
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1);
$morehtmlright = '';
$messagingUrl = DOL_URL_ROOT.'/ticket/messaging.php?track_id=' . $object->track_id;
$morehtmlright .= dolGetButtonTitle($langs->trans('MessagingViewType'), '', 'fa fa-comments', $messagingUrl, $id = '', $status = 1);
// Show link to add a message (if read and not closed)
$btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
$url = 'card.php?track_id=' . $object->track_id . '&action=presend_addmessage&mode=init';
$morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-title-button', $btnstatus);
// Show link to add event (if read and not closed)
$btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
$url = dol_buildpath('/comm/action/card.php', 1).'?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"]);
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-calendar-plus', $url, 'add-new-ticket-even-button', $btnstatus);
print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1);
// List of all actions
$filters=array();

View File

@ -1631,6 +1631,9 @@ class Ticket extends CommonObject
$actioncomm=new ActionComm($this->db);
$actioncomm->type_code = 'AC_OTH_AUTO';
$actioncomm->code = 'TICKET_MSG';
if($this->private){
$actioncomm->code = 'TICKET_MSG_PRIVATE';
}
$actioncomm->socid = $this->socid;
$actioncomm->label = $this->subject;
$actioncomm->note_private = $this->message;

View File

@ -77,7 +77,7 @@ $tickesupstatic = new Ticket($db);
llxHeader('', $langs->trans('TicketsIndex'), '');
$linkback='';
print load_fiche_titre($langs->trans('TicketsIndex'), $linkback, 'title_ticket.png');
print load_fiche_titre($langs->trans('TicketsIndex'), $linkback, 'ticket');
$dir = '';

269
htdocs/ticket/messaging.php Normal file
View File

@ -0,0 +1,269 @@
<?php
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/ticket/agenda.php
* \ingroup ticket
* \brief Page with events on ticket
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticket.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticket.lib.php';
require_once DOL_DOCUMENT_ROOT . "/core/lib/company.lib.php";
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
// Load translation files required by the page
$langs->loadLangs(array('companies', 'other', 'ticket'));
// Get parameters
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$track_id = GETPOST('track_id', 'alpha', 3);
$socid = GETPOST('socid', 'int');
$action = GETPOST('action', 'aZ09');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield", "alpha");
$sortorder = GETPOST("sortorder");
$page = GETPOST("page");
$page = is_numeric($page) ? $page : 0;
$page = $page == -1 ? 0 : $page;
if (! $sortfield) $sortfield="a.datep,a.id";
if (! $sortorder) $sortorder="desc";
$offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (GETPOST('actioncode', 'array'))
{
$actioncode=GETPOST('actioncode', 'array', 3);
if (! count($actioncode)) $actioncode='0';
}
else
{
$actioncode=GETPOST("actioncode", "alpha", 3)?GETPOST("actioncode", "alpha", 3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
}
$search_agenda_label=GETPOST('search_agenda_label');
$object = new Ticket($db);
$object->fetch($id, $ref, $track_id);
$extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
if (!$action) {
$action = 'view';
}
// Security check
$id = GETPOST("id", 'int');
$socid=0;
//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement.
$result=restrictedArea($user, 'ticket', $id, '');
if (!$user->rights->ticket->read) {
accessforbidden();
}
// restrict access for externals users
if ($user->societe_id > 0 && ($object->fk_soc != $user->societe_id))
{
accessforbidden();
}
// or for unauthorized internals users
if (!$user->societe_id && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
accessforbidden();
}
/*
* Actions
*/
$parameters=array('id'=>$socid);
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if(empty($reshook))
{
// Set view style
$_SESSION['ticket-view-type'] = "messaging";
}
// Purge search criteria
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers
{
$actioncode='';
$search_agenda_label='';
}
/*
* View
*/
$form = new Form($db);
$userstat = new User($db);
$formticket = new FormTicket($db);
$title=$langs->trans("Ticket").' - '.$object->ref.' '.$object->name;
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/ticketnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref.' '.$object->name.' - '.$langs->trans("Info");
$help_url = 'FR:DocumentationModuleTicket';
llxHeader('', $title, $help_url);
if ($socid > 0) {
$object->fetch_thirdparty();
$head = societe_prepare_head($object->thirdparty);
dol_fiche_head($head, 'ticket', $langs->trans("ThirdParty"), 0, 'company');
dol_banner_tab($object->thirdparty, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
dol_fiche_end();
}
if (!$user->socid && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) {
$object->next_prev_filter = "te.fk_user_assign = '" . $user->id . "'";
} elseif ($user->socid > 0) {
$object->next_prev_filter = "te.fk_soc = '" . $user->socid . "'";
}
$head = ticket_prepare_head($object);
dol_fiche_head($head, 'tabTicketLogs', $langs->trans("Ticket"), 0, 'ticket');
$morehtmlref ='<div class="refidno">';
$morehtmlref.= $object->subject;
// Author
if ($object->fk_user_create > 0) {
$morehtmlref .= '<br>' . $langs->trans("CreatedBy") . ' : ';
$langs->load("users");
$fuser = new User($db);
$fuser->fetch($object->fk_user_create);
$morehtmlref .= $fuser->getNomUrl(0);
}
if (!empty($object->origin_email)) {
$morehtmlref .= '<br>' . $langs->trans("CreatedBy") . ' : ';
$morehtmlref .= $object->origin_email . ' <small>(' . $langs->trans("TicketEmailOriginIssuer") . ')</small>';
}
// Thirdparty
if (! empty($conf->societe->enabled))
{
$morehtmlref.='<br>'.$langs->trans('ThirdParty');
/*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->societe_id && $user->rights->ticket->write) {
$morehtmlref.='<a href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>';
}*/
$morehtmlref.=' : ';
if ($action == 'editcustomer') {
$morehtmlref.=$form->form_thirdparty($url_page_current . '?track_id=' . $object->track_id, $object->socid, 'editcustomer', '', 1, 0, 0, array(), 1);
} else {
$morehtmlref.=$form->form_thirdparty($url_page_current . '?track_id=' . $object->track_id, $object->socid, 'none', '', 1, 0, 0, array(), 1);
}
}
// Project
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project');
if ($user->rights->ticket->write)
{
if ($action != 'classify')
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
$morehtmlref.=' : ';
if ($action == 'classify') {
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
$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="'.$_SESSION['newtoken'].'">';
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1);
$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.=$proj->getNomUrl(1);
} else {
$morehtmlref.='';
}
}
}
$morehtmlref.='</div>';
$linkback = '<a href="' . dol_buildpath('/ticket/list.php', 1) . '"><strong>' . $langs->trans("BackToList") . '</strong></a> ';
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
dol_fiche_end();
print '<br>';
if (!empty($object->id))
{
$param='&id='.$object->id;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
$morehtmlright = '';
if($sortorder === 'desc') {
$sortUrl = $_SERVER["PHP_SELF"] . '?sortfield=a.datep&sortorder=asc' . $param;
$morehtmlright .= dolGetButtonTitle($langs->trans('Date'), $langs->trans('OrderByDateAsc'), 'fa fa-sort-numeric-down', $sortUrl, $id = '', $status = 1);
}
else{
$sortUrl = $_SERVER["PHP_SELF"] . '?sortfield=a.datep&sortorder=desc' . $param;
$morehtmlright .= dolGetButtonTitle($langs->trans('Date'), $langs->trans('OrderByDateDesc'), 'fa fa-sort-numeric-down-alt', $sortUrl, $id = '', $status = 1);
}
$messagingUrl = DOL_URL_ROOT.'/ticket/agenda.php?track_id=' . $object->track_id;
$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-tasks', $messagingUrl, $id = '', $status = 1);
// Show link to add a message (if read and not closed)
$btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
$url = 'card.php?track_id=' . $object->track_id . '&action=presend_addmessage&mode=init';
$morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-title-button', $btnstatus);
// Show link to add event (if read and not closed)
$btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
$url = dol_buildpath('/comm/action/card.php', 1).'?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"]);
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-calendar-plus', $url, 'add-new-ticket-even-button', $btnstatus);
print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1);
// List of all actions
$filters=array();
$filters['search_agenda_label']=$search_agenda_label;
show_ticket_messaging($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
}
// End of page
llxFooter();
$db->close();

View File

@ -156,7 +156,7 @@ if ($resql)
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_generic', 0, $newcardbutton, '', $limit);
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
if ($sall)
{

View File

@ -315,7 +315,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$morehtmlright.= dolGetButtonTitle($langs->trans("HierarchicView"), '', 'fa fa-sitemap paddingleft', DOL_URL_ROOT.'/user/hierarchy.php'.(($search_statut != '' && $search_statut >= 0) ?'?search_statut='.$search_statut:''));
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_generic', 0, $morehtmlright.' '.$newcardbutton, '', $limit);
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'generic', 0, $morehtmlright.' '.$newcardbutton, '', $limit);
if (! empty($catid))
{