Пример #1
0
	function _get_requests() {
		$application = array();
		$members = new Membership();
		if ($members->get_requests()) {
			foreach ($members->all as $key => $applicant) {
				$application[] = array(
					$applicant->team->name,
					$applicant->is_leader,
					array(
						'display' => 'buttoner',
						'href' => site_url('/admin/members/accept_application/' . $applicant->team->id),
						'text' => _('Accept'),
						'plug' => _('Do you really want to join this team?')
					),
					array(
						'display' => 'buttoner',
						'href' => site_url('/admin/members/reject_application/' . $applicant->team->id),
						'text' => _('Reject'),
						'plug' => _('Do you really want to reject the request to join this team?')
					)
				);
			}

			$list = tabler($application, TRUE, FALSE);
			$data = array('application' => $list, 'section' => _('Pending requests'));
			$this->viewdata['main_content_view'] .= $this->load->view("admin/dashboard/applicants", $data, TRUE);
		}
	}