25 include_once DOL_DOCUMENT_ROOT.
'/adherents/canvas/actions_adherentcard_common.class.php';
42 public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
45 $this->dirmodule = $dirmodule;
46 $this->targetmodule = $targetmodule;
47 $this->canvas = $canvas;
63 if ($action ==
'view') {
64 $out .= (!empty($conf->global->ADHERENT_ADDRESSES_MANAGEMENT) ? $langs->trans(
"Adherent") : $langs->trans(
"ContactAddress"));
66 if ($action ==
'edit') {
67 $out .= (!empty($conf->global->ADHERENT_ADDRESSES_MANAGEMENT) ? $langs->trans(
"EditAdherent") : $langs->trans(
"EditAdherentAddress"));
69 if ($action ==
'create') {
70 $out .= (!empty($conf->global->ADHERENT_ADDRESSES_MANAGEMENT) ? $langs->trans(
"NewAdherent") : $langs->trans(
"NewAdherentAddress"));
87 global $limit, $offset, $sortfield, $sortorder;
88 global $conf, $db, $langs, $user;
93 parent::assign_values($action, $id);
95 $this->tpl[
'title'] = $this->
getTitle($action);
96 $this->tpl[
'error'] = $this->error;
97 $this->tpl[
'errors'] = $this->errors;
99 if ($action ==
'view') {
108 $objsoc->fetch($this->object->socid);
110 $this->tpl[
'actionstodo'] =
show_actions_todo($conf, $langs, $db, $objsoc, $this->
object, 1);
112 $this->tpl[
'actionsdone'] =
show_actions_done($conf, $langs, $db, $objsoc, $this->
object, 1);
115 if ($action ==
'delete' && $user->rights->adherent->supprimer) {
116 $this->tpl[
'action_delete'] =
$form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".$this->object->id, $langs->trans(
"DeleteAdherent"), $langs->trans(
"ConfirmDeleteAdherent"),
"confirm_delete",
'', 0, 1);
120 if ($action ==
'list') {
121 $this->
LoadListDatas($limit, $offset, $sortfield, $sortorder);
139 global $conf, $langs;
143 $this->list_datas = array();