adherentcard_view.tpl.php 4.6 KB

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