Merge pull request #17639 from bb2a/look_feel_user_author_list
look and feel : Author in lists
This commit is contained in:
commit
f4f7f9f84a
@ -471,7 +471,7 @@ $sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date
|
||||
$sql .= ' p.note_public, p.note_private,';
|
||||
$sql .= ' p.fk_cond_reglement,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,';
|
||||
$sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
|
||||
$sql .= ' u.login';
|
||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
||||
if (!$user->rights->societe->client->voir && !$socid) {
|
||||
$sql .= ", sc.fk_soc, sc.fk_user";
|
||||
}
|
||||
@ -1701,12 +1701,23 @@ if ($resql) {
|
||||
|
||||
$userstatic->id = $obj->fk_user_author;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->email = $obj->email;
|
||||
$userstatic->statut = $obj->statut;
|
||||
$userstatic->entity = $obj->entity;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->office_phone = $obj->office_phone;
|
||||
$userstatic->office_fax = $obj->office_fax;
|
||||
$userstatic->user_mobile = $obj->user_mobile;
|
||||
$userstatic->job = $obj->job;
|
||||
$userstatic->gender = $obj->gender;
|
||||
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print '<td class="center nowraponall">';
|
||||
print '<td>';
|
||||
if ($userstatic->id) {
|
||||
print $userstatic->getLoginUrl(1);
|
||||
print $userstatic->getNomUrl(-1);
|
||||
}
|
||||
print "</td>\n";
|
||||
if (!$i) {
|
||||
@ -1738,7 +1749,9 @@ if ($resql) {
|
||||
$userstatic->entity = $val['entity'];
|
||||
$userstatic->photo = $val['photo'];
|
||||
$userstatic->login = $val['login'];
|
||||
$userstatic->phone = $val['phone'];
|
||||
$userstatic->office_phone = $val['office_phone'];
|
||||
$userstatic->office_fax = $val['office_fax'];
|
||||
$userstatic->user_mobile = $val['user_mobile'];
|
||||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
//print '<div class="float">':
|
||||
|
||||
@ -425,10 +425,10 @@ $sql .= ' c.rowid, c.ref, c.total_ht, c.total_tva, c.total_ttc, c.ref_client, c.
|
||||
$sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva as multicurrency_total_vat, c.multicurrency_total_ttc,';
|
||||
$sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
|
||||
$sql .= ' c.date_creation as date_creation, c.tms as date_update, c.date_cloture as date_cloture,';
|
||||
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
|
||||
$sql .= " u.login,";
|
||||
$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method';
|
||||
$sql .= ' ,c.fk_input_reason';
|
||||
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender,';
|
||||
$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method,';
|
||||
$sql .= ' c.fk_input_reason';
|
||||
if ($search_categ_cus) {
|
||||
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||
}
|
||||
@ -1676,12 +1676,23 @@ if ($resql) {
|
||||
|
||||
$userstatic->id = $obj->fk_user_author;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->email = $obj->email;
|
||||
$userstatic->statut = $obj->statut;
|
||||
$userstatic->entity = $obj->entity;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->office_phone = $obj->office_phone;
|
||||
$userstatic->office_fax = $obj->office_fax;
|
||||
$userstatic->user_mobile = $obj->user_mobile;
|
||||
$userstatic->job = $obj->job;
|
||||
$userstatic->gender = $obj->gender;
|
||||
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print '<td align="center">';
|
||||
print '<td>';
|
||||
if ($userstatic->id) {
|
||||
print $userstatic->getLoginUrl(1);
|
||||
print $userstatic->getNomUrl(-1);
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
|
||||
@ -482,11 +482,11 @@ $sql .= ' f.paye as paye, f.fk_statut, f.close_code,';
|
||||
$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,';
|
||||
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= " country.code as country_code,";
|
||||
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
|
||||
$sql .= " u.login";
|
||||
$sql .= ' typent.code as typent_code,';
|
||||
$sql .= ' state.code_departement as state_code, state.nom as state_name,';
|
||||
$sql .= ' country.code as country_code,';
|
||||
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
||||
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
|
||||
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
|
||||
if (!$sall) {
|
||||
@ -1884,13 +1884,25 @@ if ($resql) {
|
||||
$totalarray['val']['f.total_ttc'] += $obj->total_ttc;
|
||||
}
|
||||
|
||||
$userstatic->id = $obj->fk_user_author;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->email = $obj->email;
|
||||
$userstatic->statut = $obj->statut;
|
||||
$userstatic->entity = $obj->entity;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->office_phone = $obj->office_phone;
|
||||
$userstatic->office_fax = $obj->office_fax;
|
||||
$userstatic->user_mobile = $obj->user_mobile;
|
||||
$userstatic->job = $obj->job;
|
||||
$userstatic->gender = $obj->gender;
|
||||
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
$userstatic->id = $obj->fk_user_author;
|
||||
$userstatic->login = $obj->login;
|
||||
print '<td class="center tdoverflowmax100">';
|
||||
print '<td>';
|
||||
if ($userstatic->id) {
|
||||
print $userstatic->getLoginUrl(1);
|
||||
print $userstatic->getNomUrl(-1);
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
|
||||
@ -1051,7 +1051,9 @@ while ($i < min($num, $limit)) {
|
||||
$userstatic->entity = $val['entity'];
|
||||
$userstatic->photo = $val['photo'];
|
||||
$userstatic->login = $val['login'];
|
||||
$userstatic->phone = $val['phone'];
|
||||
$userstatic->office_phone = $val['office_phone'];
|
||||
$userstatic->office_fax = $val['office_fax'];
|
||||
$userstatic->user_mobile = $val['user_mobile'];
|
||||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user