dolibarr  7.0.0-beta
contactcard_view.tpl.php
1 <?php
2 /* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.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 <http://www.gnu.org/licenses/>.
16  */
17 
18 // Protection to avoid direct call of template
19 if (empty($conf) || ! is_object($conf))
20 {
21  print "Error, template page can't be called as URL";
22  exit;
23 }
24 
25 
26 $contact = $GLOBALS['objcanvas']->control->object;
27 ?>
28 
29 <!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->
30 <?php echo $this->control->tpl['showhead']; ?>
31 
32 <?php
33 dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
34 ?>
35 
36 <?php if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?>
37 <?php if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
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("IM"); ?></td>
115  <td colspan="3"><?php echo $this->control->tpl['jabberid']; ?></td>
116 </tr>
117 
118 <tr>
119  <td><?php echo $langs->trans("ContactVisibility"); ?></td>
120  <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
121 </tr>
122 
123 <tr>
124  <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
125  <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
126 </tr>
127 
128 <?php foreach ($this->control->tpl['contact_element'] as $element) { ?>
129 <tr>
130  <td><?php echo $element['linked_element_label']; ?></td>
131  <td colspan="3"><?php echo $element['linked_element_value']; ?></td>
132 </tr>
133 <?php } ?>
134 
135 <tr>
136  <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
137  <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
138 </tr>
139 
140 </table>
141 
142 <?php echo $this->control->tpl['showend']; ?>
143 
144 <?php if (empty($user->societe_id)) { ?>
145 <div class="tabsAction">
146 
147 <?php if ($user->rights->societe->contact->creer) { ?>
148 <a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&amp;action=edit&amp;canvas='.$canvas; ?>"><?php echo $langs->trans('Modify'); ?></a>
149 <?php } ?>
150 
151 <?php if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { ?>
152 <a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&amp;action=create_user&amp;canvas='.$canvas; ?>"><?php echo $langs->trans("CreateDolibarrLogin"); ?></a>
153 <?php } ?>
154 
155 <?php if ($user->rights->societe->contact->supprimer) { ?>
156 <a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&amp;action=delete&amp;canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
157 <?php } ?>
158 
159 </div><br>
160 <?php }
161 
162 echo $this->control->tpl['actionstodo'];
163 
164 echo $this->control->tpl['actionsdone'];
165 ?>
166 
167 <!-- END PHP TEMPLATE -->
dol_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
Print formated error messages to output (Used to show messages on html output).
print
Draft customers invoices.
Definition: index.php:91