dolibarr 18.0.6
adherentcard_view.tpl.php
1<?php
2/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2012-2022 Philippe Grand <philippe.grand@atoo-net.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19// Protection to avoid direct call of template
20if (empty($conf) || !is_object($conf)) {
21 print "Error, template page can't be called as URL";
22 exit;
23}
24
25
26$contact = $GLOBALS['objcanvas']->control->object;
27
28echo "<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->\n";
29echo $this->control->tpl['showhead'];
30
31dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
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("Company"); ?></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("Morphy"); ?></td>
65 <td colspan="3"><?php echo $this->control->tpl['select_morphy']; ?></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['state']; ?></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</tr>
99
100<tr>
101 <td><?php echo $langs->trans("EMail"); ?></td>
102 <td><?php echo $this->control->tpl['email']; ?></td>
103</tr>
104
105<tr>
106 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
107 <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
108</tr>
109
110<tr>
111 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
112 <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
113</tr>
114
115<tr>
116 <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
117 <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
118</tr>
119
120</table>
121
122<?php echo $this->control->tpl['showend'];
123
124if (empty($user->socid)) {
125 echo '<div class="tabsAction">';
126
127 if ($user->hasRight('adherent', 'creer')) {
128 echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
129 }
130
131 if (!$this->control->tpl['user_id'] && $user->hasRight('user', 'user', 'creer')) {
132 echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
133 }
134
135 if ($user->hasRight('adherent', 'supprimer')) {
136 print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas, 'delete', $user->hasRight('adherent', 'supprimer'));
137 }
138
139 echo '</div><br>';
140}
141
142echo $this->control->tpl['actionstodo'];
143
144echo $this->control->tpl['actionsdone'];
145
146echo "<!-- END PHP TEMPLATE -->\n";
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formated error messages to output (Used to show messages on html output).