Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
6263e90d
Commit
6263e90d
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
More info on contact popup
parent
87e07a30
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/contact/class/contact.class.php
+5
-0
5 additions, 0 deletions
htdocs/contact/class/contact.class.php
htdocs/core/lib/company.lib.php
+15
-3
15 additions, 3 deletions
htdocs/core/lib/company.lib.php
htdocs/core/lib/functions.lib.php
+2
-0
2 additions, 0 deletions
htdocs/core/lib/functions.lib.php
with
22 additions
and
3 deletions
htdocs/contact/class/contact.class.php
+
5
−
0
View file @
6263e90d
...
...
@@ -918,6 +918,11 @@ class Contact extends CommonObject
$result
=
''
;
$label
=
'<u>'
.
$langs
->
trans
(
"ShowContact"
)
.
'</u>'
;
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"Name"
)
.
':</b> '
.
$this
->
getFullName
(
$langs
);
//if ($this->cibility_id) $label.= '<br><b>' . $langs->trans("Civility") . ':</b> '.$this->civility_id; // TODO Translate cibilty_id code
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"Poste"
)
.
':</b> '
.
$this
->
poste
;
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"EMail"
)
.
':</b> '
.
$this
->
email
;
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"Phone"
)
.
':</b> '
.
join
(
', '
,
array
(
$this
->
phone_pro
,
$this
->
phone_mobile
,
$this
->
phone_perso
));
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"Address"
)
.
':</b> '
.
dol_format_address
(
$this
,
1
,
' '
,
$langs
);
$link
=
'<a href="'
.
DOL_URL_ROOT
.
'/contact/card.php?id='
.
$this
->
id
.
$moreparam
.
'" title="'
.
dol_escape_htmltag
(
$label
,
1
)
.
'" class="classfortooltip">'
;
$linkend
=
'</a>'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/lib/company.lib.php
+
15
−
3
View file @
6263e90d
...
...
@@ -666,7 +666,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print
"</tr>"
;
$sql
=
"SELECT p.rowid, p.lastname, p.firstname, p.fk_pays as country_id, p.poste, p.phone, p.phone_mobile, p.phone_perso, p.fax, p.email, p.skype, p.statut "
;
$sql
=
"SELECT p.rowid, p.lastname, p.firstname, p.fk_pays as country_id,
p.civility,
p.poste, p.phone
as phone_pro
, p.phone_mobile, p.phone_perso, p.fax, p.email, p.skype, p.statut "
;
$sql
.
=
", p.civility as civility_id, p.address, p.zip, p.town"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"socpeople as p"
;
$sql
.
=
" WHERE p.fk_soc = "
.
$object
->
id
;
...
...
@@ -676,6 +676,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
dol_syslog
(
'core/lib/company.lib.php :: show_contacts'
,
LOG_DEBUG
);
$result
=
$db
->
query
(
$sql
);
if
(
!
$result
)
dol_print_error
(
$db
);
$num
=
$db
->
num_rows
(
$result
);
$var
=
true
;
...
...
@@ -695,6 +697,14 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
$contactstatic
->
lastname
=
$obj
->
lastname
;
$contactstatic
->
firstname
=
$obj
->
firstname
;
$contactstatic
->
civility_id
=
$obj
->
civility_id
;
$contactstatic
->
poste
=
$obj
->
poste
;
$contactstatic
->
address
=
$obj
->
address
;
$contactstatic
->
zip
=
$obj
->
zip
;
$contactstatic
->
town
=
$obj
->
town
;
$contactstatic
->
phone_pro
=
$obj
->
phone_pro
;
$contactstatic
->
phone_mobile
=
$obj
->
phone_mobile
;
$contactstatic
->
phone_perso
=
$obj
->
phone_perso
;
$contactstatic
->
email
=
$obj
->
email
;
print
$contactstatic
->
getNomUrl
(
1
,
''
,
0
,
'&backtopage='
.
urlencode
(
$backtopage
));
print
'</td><td>'
;
if
(
$obj
->
poste
)
print
$obj
->
poste
;
...
...
@@ -719,11 +729,13 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print
'</a> '
;
}
if
(
$coords
)
{
print
dol_print_address
(
$coords
,
'address_contact_'
.
$obj
->
rowid
,
'contact'
,
$obj
->
rowid
);
$outdone
++
;
}
if
(
$obj
->
phone
||
$obj
->
phone_mobile
||
$obj
->
phone_perso
)
print
(
$outdone
?
'<br>'
:
''
);
if
(
$obj
->
phone
)
{
print
dol_print_phone
(
$obj
->
phone
,
$country_code
[
'code'
],
$obj
->
rowid
,
$object
->
id
,
'AC_TEL'
,
' '
,
'phone'
);
$outdone
++
;
}
if
(
$obj
->
phone_pro
||
$obj
->
phone_mobile
||
$obj
->
phone_perso
||
$obj
->
fax
)
print
(
$outdone
?
'<br>'
:
''
);
if
(
$obj
->
phone_pro
)
{
print
dol_print_phone
(
$obj
->
phone_pro
,
$country_code
[
'code'
],
$obj
->
rowid
,
$object
->
id
,
'AC_TEL'
,
' '
,
'phone'
);
$outdone
++
;
}
if
(
$obj
->
phone_mobile
)
{
print
dol_print_phone
(
$obj
->
phone_mobile
,
$country_code
[
'code'
],
$obj
->
rowid
,
$object
->
id
,
'AC_TEL'
,
' '
,
'phone'
);
$outdone
++
;
}
if
(
$obj
->
phone_perso
)
{
print
dol_print_phone
(
$obj
->
phone_perso
,
$country_code
[
'code'
],
$obj
->
rowid
,
$object
->
id
,
'AC_TEL'
,
' '
,
'phone'
);
$outdone
++
;
}
if
(
$obj
->
fax
)
{
print
dol_print_phone
(
$obj
->
fax
,
$country_code
[
'code'
],
$obj
->
rowid
,
$object
->
id
,
'AC_FAX'
,
' '
,
'fax'
);
$outdone
++
;
}
print
'<div style="clear: both;"></div>'
;
$outdone
=
0
;
if
(
$obj
->
email
)
print
dol_print_email
(
$obj
->
email
,
$obj
->
rowid
,
$object
->
id
,
'AC_EMAIL'
,
0
,
0
,
1
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/lib/functions.lib.php
+
2
−
0
View file @
6263e90d
...
...
@@ -877,6 +877,7 @@ function dol_bc($var,$moreclass='')
* @param string $sep Separator to use to build string
* @param Translate $outputlangs Object lang that contains language for text translation.
* @return string Formated string
* @see dol_print_address
*/
function
dol_format_address
(
$object
,
$withcountry
=
0
,
$sep
=
"
\n
"
,
$outputlangs
=
''
)
{
...
...
@@ -1604,6 +1605,7 @@ function dol_user_country()
* @param int $mode thirdparty|contact|member|other
* @param int $id Id of object
* @return void
* @see dol_format_address
*/
function
dol_print_address
(
$address
,
$htmlid
,
$mode
,
$id
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment