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

This commit is contained in:
Laurent Destailleur 2016-05-13 20:39:44 +02:00
commit ae16e6cdca
4 changed files with 75 additions and 10 deletions

View File

@ -49,6 +49,9 @@ $search_zip=GETPOST("search_zip");
$search_town=GETPOST("search_town");
$search_state=GETPOST("search_state");
$search_country=GETPOST("search_country");
$search_phone=GETPOST("search_phone");
$search_phone_perso=GETPOST("search_phone_perso");
$search_phone_mobile=GETPOST("search_phone_mobile");
$type=GETPOST("type");
$search_email=GETPOST("search_email");
$search_categ = GETPOST("search_categ",'int');
@ -104,6 +107,9 @@ $arrayfields=array(
'd.address'=>array('label'=>$langs->trans("Address"), 'checked'=>0),
'd.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0),
'd.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0),
'd.phone'=>array('label'=>$langs->trans("Phone"), 'checked'=>0),
'd.phone_perso'=>array('label'=>$langs->trans("PhonePerso"), 'checked'=>0),
'd.phone_mobile'=>array('label'=>$langs->trans("PhoneMobile"), 'checked'=>0),
'state.nom'=>array('label'=>$langs->trans("State"), 'checked'=>0),
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
/*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0),
@ -151,6 +157,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_town="";
$search_state="";
$search_country='';
$search_phone='';
$search_phone_perso='';
$search_phone_mobile='';
$search_morphy="";
$search_categ="";
$catid="";
@ -290,6 +299,9 @@ if ($resql)
if ($search_zip != '') $param.= "&search_zip=".urlencode($search_zip);
if ($search_state != '') $param.= "&search_state=".urlencode($search_state);
if ($search_country != '') $param.= "&search_country=".urlencode($search_country);
if ($search_phone != '') $param.= "&search_phone=".urlencode($search_phone);
if ($search_phone_perso != '') $param.= "&search_phone_perso=".urlencode($search_phone_perso);
if ($search_phone_mobile != '') $param.= "&search_phone_mobile=".urlencode($search_phone_mobile);
if ($filter) $param.="&filter=".urlencode($filter);
if ($type > 0) $param.="&type=".urlencode($type);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
@ -347,7 +359,7 @@ if ($resql)
print '<tr class="liste_titre">';
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
{
print '<td width="5" align="center">&nbsp;</td>';
print '<td colspan="1" align="center">'.$langs->trans("NumberingShort").'</td>';
}
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder);
@ -361,6 +373,9 @@ if ($resql)
if (! empty($arrayfields['d.town']['checked'])) print_liste_field_titre($arrayfields['d.town']['label'],$_SERVER["PHP_SELF"],'d.town','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.phone']['checked'])) print_liste_field_titre($arrayfields['d.phone']['label'],$_SERVER["PHP_SELF"],'d.phone','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.phone_perso']['checked'])) print_liste_field_titre($arrayfields['d.phone_perso']['label'],$_SERVER["PHP_SELF"],'d.phone_perso','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['d.phone_mobile']['label'],$_SERVER["PHP_SELF"],'d.phone_mobile','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.email']['checked'])) print_liste_field_titre($arrayfields['d.email']['label'],$_SERVER["PHP_SELF"],'d.email','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titre($arrayfields['d.datefin']['label'],$_SERVER["PHP_SELF"],'d.datefin','',$param,'align="center"',$sortfield,$sortorder);
// Extra fields
@ -388,6 +403,12 @@ if ($resql)
// Line for filters fields
print '<tr class="liste_titre">';
// Line numbering
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
{
print '<td class="liste_titre">&nbsp;</td>';
}
// Ref
if (! empty($arrayfields['d.ref']['checked']))
{
@ -464,6 +485,24 @@ if ($resql)
print $form->select_country($search_country,'search_country','',0,'maxwidth100');
print '</td>';
}
// Phone pro
if (! empty($arrayfields['d.phone']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_phone" value="'.$search_phone.'" size="5"></td>';
}
// Phone perso
if (! empty($arrayfields['d.phone_perso']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_phone_perso" value="'.$search_phone_perso.'" size="5"></td>';
}
// Phone mobile
if (! empty($arrayfields['d.phone_mobile']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_phone_mobile" value="'.$search_phone_mobile.'" size="5"></td>';
}
// Email
if (! empty($arrayfields['d.email']['checked']))
{
@ -619,14 +658,6 @@ if ($resql)
print $obj->address;
print '</td>';
}
// Town
if (! empty($arrayfields['d.town']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->town;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Zip
if (! empty($arrayfields['d.zip']['checked']))
{
@ -635,6 +666,14 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Town
if (! empty($arrayfields['d.town']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->town;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// State
if (! empty($arrayfields['state.nom']['checked']))
{
@ -650,6 +689,30 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Phone pro
if (! empty($arrayfields['d.phone']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->phone;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Phone perso
if (! empty($arrayfields['d.phone_perso']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->phone_perso;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Phone mobile
if (! empty($arrayfields['d.phone_mobile']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->phone_mobile;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// EMail
if (! empty($arrayfields['d.email']['checked']))
{

View File

@ -438,6 +438,7 @@ ALTER TABLE llx_resource ADD COLUMN extraparams varchar(255);
ALTER TABLE llx_element_resources ADD COLUMN duree real; -- total duration of using ressource
UPDATE llx_element_resources SET resource_type = 'dolresource' WHERE resource_type = 'resource';
CREATE TABLE llx_advtargetemailing
(

View File

@ -1,6 +1,7 @@
# Dolibarr language file - Source file is en_US - other
SecurityCode=Security code
Calendar=Calendar
NumberingShort=N°
Tools=Tools
ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.<br><br>Those tools can be reached from menu on the side.
Birthday=Birthday

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
*/
class Dolresource extends CommonObject
{
var $element='resource'; //!< Id that identify managed objects
var $element='dolresource'; //!< Id that identify managed objects
var $table_element='resource'; //!< Name of table without prefix where object is stored
var $resource_id;