public function cancel(\System\Template\Renderer $ren, $drop) { $this->canceled = true; $this->save(); $current_user = $ren->response()->request()->user(); if ($this->id_user != $current_user->id) { $notice = \Impro\User\Notice::for_user($this->user, array("generated_by" => 'team_attendance', "redirect" => $drop ? $ren->url('team_attendance', array($this->training->team)) : $ren->url('team_training', array($this->training->team, $this->training)), "author" => $current_user, "team" => $this->training->team, "text" => stprintf($ren->trans('training_cancel_mail'), array("link_user" => \Impro\User::link($ren), "link_team" => $this->training->team->to_html_link($ren, true), "tg_date" => $ren->format_date($this->training->start, 'human'))))); } return $this; }
public function to_html_member(\System\Template\Renderer $ren) { return div('team_user', array(\Impro\User::avatar($ren, $this->user, 50, 50), div('team_member_info', array(div('name', array(\Impro\User::link($ren, $this->user))), div('roles', implode(', ', $this->get_roles($ren))))))); }
public function send_request(\System\User $user, \System\Template\Renderer $ren, \System\Http\Request $request) { return \Impro\User\Request::for_user($user, array("text" => stprintf($ren->locales()->trans('intra_team_member_add_text'), array("link_team" => $this->to_html_link($ren), "link_user" => \Impro\User::link($ren, $request->user()))), "id_author" => $request->user()->id, "id_team" => $this->id, "callback" => 'JoinTeam', "redirect_yes" => $ren->uri('team', array($this)), "allow_maybe" => false))->mail($ren); }