diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 298ceb886b93f152159e9ba22b2d91182cb6d6b6..6a7ae2cefbe206e21f0555db67c26971966aecfd 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -79,6 +79,7 @@ class Mailing extends CommonObject $this->statuts[2] = 'MailingStatusSentPartialy'; $this->statuts[3] = 'MailingStatusSentCompletely'; + $this->statut_dest[0] = 'MailingStatusNotSent'; $this->statut_dest[-1] = 'MailingStatusError'; $this->statut_dest[1] = 'MailingStatusSent'; $this->statut_dest[2] = 'MailingStatusRead'; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 66474afea8e9462e7e06d387f2505e4e5a6f0376..7542782f6e7c419ab519921509988da068258a80 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -45,6 +45,19 @@ $sall=GETPOST("sall","alpha"); $sref=GETPOST("sref","alpha"); $filteremail=GETPOST('filteremail','alpha'); +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('mailinglist')); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('mailing'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'm.titre'=>'Ref', +); + /* @@ -107,6 +120,7 @@ if ($result) if (! $filteremail) print_liste_field_titre($langs->trans("DateLastSend"),$_SERVER["PHP_SELF"],"m.date_envoi",$param,"",'align="center"',$sortfield,$sortorder); else print_liste_field_titre($langs->trans("DateSending"),$_SERVER["PHP_SELF"],"mc.date_envoi",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],($filteremail?"mc.statut":"m.statut"),$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre('', $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); print "</tr>\n"; print '<tr class="liste_titre">'; @@ -120,8 +134,11 @@ if ($result) print '<td class="liste_titre"> </td>'; if (! $filteremail) print '<td class="liste_titre"> </td>'; print '<td class="liste_titre"> </td>'; - print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; - print "</td>"; + print '<td class="liste_titre"> </td>'; + print '<td class="liste_titre" align="right">'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '</td>'; print "</tr>\n"; $var=True; @@ -172,6 +189,7 @@ if ($result) print $email->LibStatut($obj->statut,5); } print '</td>'; + print '<td></td>'; print "</tr>\n"; $i++; } diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php index 9ddd05f7faaf6a3b2ddd57a323622939a07f3637..4c447e5583a8c3fb753c87a791d4f0dcc0460b55 100644 --- a/htdocs/core/lib/emailing.lib.php +++ b/htdocs/core/lib/emailing.lib.php @@ -43,7 +43,9 @@ function emailing_prepare_head(Mailing $object) { $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id; $head[$h][1] = $langs->trans("MailRecipients"); + if ($object->nbemail > 0) $head[$h][1].= ' <span class="badge">'.$object->nbemail.'</span>'; $head[$h][2] = 'targets'; + $h++; if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR)) diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 23607c444a701b8ecf84bd55c0961e3aff5934d0..c17cf9f8757fca9c6ca168ee63500b7954c014f7 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -388,10 +388,10 @@ if ($result) print '<td class="liste_titre" align="right">'; $formsupplier_proposal->selectSupplierProposalStatus($viewstatut,1); print '</td>'; - + // Check boxes print '<td class="liste_titre" align="right">'; - print '<input type="image" name="button_search" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; - print '<input type="image" name="button_removefilter" class="liste_titre" src="'.img_picto($langs->trans("RemoveFilter"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; print '</td>'; print "</tr>\n"; @@ -475,7 +475,15 @@ if ($result) print '<td align="right">'.$objectstatic->LibStatut($obj->fk_statut,5)."</td>\n"; - print '<td> </td>'; + // Action column + print '<td class="nowrap" align="center">'; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected=0; + if (in_array($obj->rowid, $arrayofselected)) $selected=1; + print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>'; + } + print '</td>'; print "</tr>\n";