dolibarr  13.0.2
adherentcard_view.tpl.php
1 <?php
2 /* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
3  * Copyright (C) 2012 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
20 if (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 
28 echo "<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->\n";
29 echo $this->control->tpl['showhead'];
30 
31 dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
32 if (!empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user'];
33 if (!empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
34 
35 <table class="border allwidth">
36 
37 <tr>
38  <td width="20%"><?php echo $langs->trans("Ref"); ?></td>
39  <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
40 </tr>
41 
42 <tr>
43  <td width="20%"><?php echo $langs->trans("Lastname"); ?></td>
44  <td width="30%"><?php echo $this->control->tpl['name']; ?></td>
45  <td width="25%"><?php echo $langs->trans("Firstname"); ?></td>
46  <td width="25%"><?php echo $this->control->tpl['firstname']; ?></td>
47 </tr>
48 
49 <tr>
50  <td><?php echo $langs->trans("Company"); ?></td>
51  <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
52 </tr>
53 
54 <tr>
55  <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
56  <td colspan="3"><?php echo $this->control->tpl['civility']; ?></td>
57 </tr>
58 
59 <tr>
60  <td><?php echo $langs->trans("Morphy"); ?></td>
61  <td colspan="3"><?php echo $this->control->tpl['select_morphy']; ?></td>
62 </tr>
63 
64 <tr>
65  <td><?php echo $langs->trans("Address"); ?></td>
66  <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
67 </tr>
68 
69 <tr>
70  <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
71  <td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['town']; ?></td>
72 </tr>
73 
74 <tr>
75  <td><?php echo $langs->trans("Country"); ?></td>
76  <td colspan="3"><?php echo $this->control->tpl['country']; ?></td>
77 </tr>
78 
79 <tr>
80  <td><?php echo $langs->trans('State'); ?></td>
81  <td colspan="3"><?php echo $this->control->tpl['state']; ?></td>
82 </tr>
83 
84 <tr>
85  <td><?php echo $langs->trans("PhonePro"); ?></td>
86  <td><?php echo $this->control->tpl['phone_pro']; ?></td>
87  <td><?php echo $langs->trans("PhonePerso"); ?></td>
88  <td><?php echo $this->control->tpl['phone_perso']; ?></td>
89 </tr>
90 
91 <tr>
92  <td><?php echo $langs->trans("PhoneMobile"); ?></td>
93  <td><?php echo $this->control->tpl['phone_mobile']; ?></td>
94 </tr>
95 
96 <tr>
97  <td><?php echo $langs->trans("EMail"); ?></td>
98  <td><?php echo $this->control->tpl['email']; ?></td>
99 </tr>
100 
101 <tr>
102  <td><?php echo $langs->trans("ContactVisibility"); ?></td>
103  <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
104 </tr>
105 
106 <tr>
107  <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
108  <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
109 </tr>
110 
111 <tr>
112  <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
113  <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
114 </tr>
115 
116 </table>
117 
118 <?php echo $this->control->tpl['showend'];
119 
120 if (empty($user->socid)) {
121  echo '<div class="tabsAction">';
122 
123  if ($user->rights->adherent->creer) {
124  echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&amp;action=edit&amp;canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
125  }
126 
127  if (!$this->control->tpl['user_id'] && $user->rights->user->user->creer) {
128  echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&amp;action=create_user&amp;canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
129  }
130 
131  if ($user->rights->adherent->supprimer) {
132  echo '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&amp;action=delete&amp;canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
133  }
134 
135  echo '</div><br>';
136 }
137 
138 echo $this->control->tpl['actionstodo'];
139 
140 echo $this->control->tpl['actionsdone'];
141 
142 echo "<!-- END PHP TEMPLATE -->\n";
print
Draft customers invoices.
Definition: index.php:89
dol_htmloutput_errors($mesgstring= '', $mesgarray=array(), $keepembedded=0)
Print formated error messages to output (Used to show messages on html output).