adherentcard_view.tpl.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. ?>
  26. <!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->
  27. <?php echo $this->control->tpl['showhead']; ?>
  28. <?php
  29. dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
  30. ?>
  31. <?php if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?>
  32. <?php if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
  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. <?php if (empty($user->societe_id)) { ?>
  101. <div class="tabsAction">
  102. <?php if ($user->rights->adherent->creer) { ?>
  103. <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>
  104. <?php } ?>
  105. <?php if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { ?>
  106. <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>
  107. <?php } ?>
  108. <?php if ($user->rights->adherent->supprimer) { ?>
  109. <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>
  110. <?php } ?>
  111. </div><br>
  112. <?php }
  113. echo $this->control->tpl['actionstodo'];
  114. echo $this->control->tpl['actionsdone'];
  115. ?>
  116. <!-- END PHP TEMPLATE -->