adherentcard_view.tpl.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. // Protection to avoid direct call of template
  19. if (empty($conf) || !is_object($conf)) {
  20. print "Error, template page can't be called as URL";
  21. exit;
  22. }
  23. $contact = $GLOBALS['objcanvas']->control->object;
  24. echo "<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->\n";
  25. echo $this->control->tpl['showhead'];
  26. dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
  27. if (!empty($this->control->tpl['action_create_user'])) {
  28. echo $this->control->tpl['action_create_user'];
  29. }
  30. if (!empty($this->control->tpl['action_delete'])) {
  31. echo $this->control->tpl['action_delete'];
  32. } ?>
  33. <table class="border allwidth">
  34. <tr>
  35. <td width="20%"><?php echo $langs->trans("Ref"); ?></td>
  36. <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
  37. </tr>
  38. <tr>
  39. <td width="20%"><?php echo $langs->trans("Lastname"); ?></td>
  40. <td width="30%"><?php echo $this->control->tpl['name']; ?></td>
  41. <td width="25%"><?php echo $langs->trans("Firstname"); ?></td>
  42. <td width="25%"><?php echo $this->control->tpl['firstname']; ?></td>
  43. </tr>
  44. <tr>
  45. <td><?php echo $langs->trans("Company"); ?></td>
  46. <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
  47. </tr>
  48. <tr>
  49. <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
  50. <td colspan="3"><?php echo $this->control->tpl['civility']; ?></td>
  51. </tr>
  52. <tr>
  53. <td><?php echo $langs->trans("Morphy"); ?></td>
  54. <td colspan="3"><?php echo $this->control->tpl['select_morphy']; ?></td>
  55. </tr>
  56. <tr>
  57. <td><?php echo $langs->trans("Address"); ?></td>
  58. <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
  59. </tr>
  60. <tr>
  61. <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
  62. <td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['town']; ?></td>
  63. </tr>
  64. <tr>
  65. <td><?php echo $langs->trans("Country"); ?></td>
  66. <td colspan="3"><?php echo $this->control->tpl['country']; ?></td>
  67. </tr>
  68. <tr>
  69. <td><?php echo $langs->trans('State'); ?></td>
  70. <td colspan="3"><?php echo $this->control->tpl['state']; ?></td>
  71. </tr>
  72. <tr>
  73. <td><?php echo $langs->trans("PhonePro"); ?></td>
  74. <td><?php echo $this->control->tpl['phone_pro']; ?></td>
  75. <td><?php echo $langs->trans("PhonePerso"); ?></td>
  76. <td><?php echo $this->control->tpl['phone_perso']; ?></td>
  77. </tr>
  78. <tr>
  79. <td><?php echo $langs->trans("PhoneMobile"); ?></td>
  80. <td><?php echo $this->control->tpl['phone_mobile']; ?></td>
  81. </tr>
  82. <tr>
  83. <td><?php echo $langs->trans("EMail"); ?></td>
  84. <td><?php echo $this->control->tpl['email']; ?></td>
  85. </tr>
  86. <tr>
  87. <td><?php echo $langs->trans("ContactVisibility"); ?></td>
  88. <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
  89. </tr>
  90. <tr>
  91. <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
  92. <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
  93. </tr>
  94. <tr>
  95. <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
  96. <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
  97. </tr>
  98. </table>
  99. <?php echo $this->control->tpl['showend'];
  100. if (empty($user->socid)) {
  101. echo '<div class="tabsAction">';
  102. if ($user->hasRight('adherent', 'creer')) {
  103. echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
  104. }
  105. if (!$this->control->tpl['user_id'] && $user->rights->user->user->creer) {
  106. echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
  107. }
  108. if ($user->rights->adherent->supprimer) {
  109. echo '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
  110. }
  111. echo '</div><br>';
  112. }
  113. echo $this->control->tpl['actionstodo'];
  114. echo $this->control->tpl['actionsdone'];
  115. echo "<!-- END PHP TEMPLATE -->\n";