dolibarr 20.0.2
contactcard_view.tpl.php
1<?php
2/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18// Protection to avoid direct call of template
19if (empty($conf) || !is_object($conf)) {
20 print "Error, template page can't be called as URL";
21 exit(1);
22}
23
24
25$contact = $GLOBALS['objcanvas']->control->object;
26
27print "<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->\n";
28echo $this->control->tpl['showhead'];
29
30dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
31
32if (!empty($this->control->tpl['action_create_user'])) {
33 echo $this->control->tpl['action_create_user'];
34}
35if (!empty($this->control->tpl['action_delete'])) {
36 echo $this->control->tpl['action_delete'];
37} ?>
38
39<table class="border allwidth">
40
41<tr>
42 <td width="20%"><?php echo $langs->trans("Ref"); ?></td>
43 <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
44</tr>
45
46<tr>
47 <td width="20%"><?php echo $langs->trans("Lastname"); ?></td>
48 <td width="30%"><?php echo $this->control->tpl['name']; ?></td>
49 <td width="25%"><?php echo $langs->trans("Firstname"); ?></td>
50 <td width="25%"><?php echo $this->control->tpl['firstname']; ?></td>
51</tr>
52
53<tr>
54 <td><?php echo $langs->trans("ThirdParty"); ?></td>
55 <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
56</tr>
57
58<tr>
59 <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
60 <td colspan="3"><?php echo $this->control->tpl['civility']; ?></td>
61</tr>
62
63<tr>
64 <td><?php echo $langs->trans("PostOrFunction"); ?></td>
65 <td colspan="3"><?php echo $this->control->tpl['poste']; ?></td>
66</tr>
67
68<tr>
69 <td><?php echo $langs->trans("Address"); ?></td>
70 <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
71</tr>
72
73<tr>
74 <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
75 <td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['town']; ?></td>
76</tr>
77
78<tr>
79 <td><?php echo $langs->trans("Country"); ?></td>
80 <td colspan="3"><?php echo $this->control->tpl['country']; ?></td>
81</tr>
82
83<tr>
84 <td><?php echo $langs->trans('State'); ?></td>
85 <td colspan="3"><?php echo $this->control->tpl['departement']; ?></td>
86</tr>
87
88<tr>
89 <td><?php echo $langs->trans("PhonePro"); ?></td>
90 <td><?php echo $this->control->tpl['phone_pro']; ?></td>
91 <td><?php echo $langs->trans("PhonePerso"); ?></td>
92 <td><?php echo $this->control->tpl['phone_perso']; ?></td>
93</tr>
94
95<tr>
96 <td><?php echo $langs->trans("PhoneMobile"); ?></td>
97 <td><?php echo $this->control->tpl['phone_mobile']; ?></td>
98 <td><?php echo $langs->trans("Fax"); ?></td>
99 <td><?php echo $this->control->tpl['fax']; ?></td>
100</tr>
101
102<tr>
103 <td><?php echo $langs->trans("EMail"); ?></td>
104 <td><?php echo $this->control->tpl['email']; ?></td>
105 <?php if ($this->control->tpl['nb_emailing']) { ?>
106 <td class="nowrap"><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
107 <td><?php echo $this->control->tpl['nb_emailing']; ?></td>
108 <?php } else { ?>
109 <td colspan="2">&nbsp;</td>
110 <?php } ?>
111</tr>
112
113<tr>
114 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
115 <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
116</tr>
117
118<tr>
119 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
120 <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
121</tr>
122
123<?php foreach ($this->control->tpl['contact_element'] as $element) { ?>
124<tr>
125 <td><?php echo $element['linked_element_label']; ?></td>
126 <td colspan="3"><?php echo $element['linked_element_value']; ?></td>
127</tr>
128<?php } ?>
129
130<tr>
131 <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
132 <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
133</tr>
134
135</table>
136
137<?php echo $this->control->tpl['showend'];
138
139if (empty($user->socid)) {
140 print '<div class="tabsAction">';
141 if ($user->hasRight('societe', 'contact', 'creer')) {
142 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
143 }
144
145 if (!$this->control->tpl['user_id'] && $user->hasRight('user', 'user', 'creer')) {
146 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
147 }
148
149 if ($user->hasRight('societe', 'contact', 'supprimer')) {
150 print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
151 }
152
153 print '</div><br>';
154}
155
156echo $this->control->tpl['actionstodo'];
157
158echo $this->control->tpl['actionsdone'];
159
160print "<!-- END PHP TEMPLATE -->\n";
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
treeview li table
No Email.