示例#1
0
 /**
  * Shows non-archived experiments without a leader.
  */
 public function without_leader()
 {
     create_experiment_table();
     $data['ajax_source'] = 'experiment/table_without_leader/';
     $data['page_title'] = lang('experiments');
     $this->load->view('templates/header', $data);
     $this->authenticate->authenticate_redirect('templates/list_view', $data, UserRole::Admin);
     $this->load->view('templates/footer');
 }
示例#2
0
		<th><?php 
echo lang('preferredlanguage');
?>
</th>
		<td><?php 
echo lang(user_language($user));
?>
</td>
	</tr>
</table>

<!-- Experiments -->
<?php 
if (is_admin()) {
    echo heading(lang('experiments'), 3);
    create_experiment_table('experiments');
    $experiments['id'] = 'experiments';
    $experiments['ajax_source'] = 'experiment/table_by_user/' . $user->id;
    echo $this->load->view('templates/list_view', $experiments);
}
?>

<!-- Comments -->
<?php 
echo heading(lang('comments'), 3);
create_comment_table('comments');
$comments['id'] = 'comments';
$comments['ajax_source'] = 'comment/table_by_user/' . $user->id;
echo $this->load->view('templates/list_view', $comments);
?>
示例#3
0
 /** Specifies the content for the caller interface view. */
 public function leader_interface($user_id)
 {
     if (!correct_user($user_id)) {
         return;
     }
     $user = $this->userModel->get_user_by_id($user_id);
     $experiments = $this->leaderModel->get_experiments_by_leader($user_id);
     $nr_experiments = count($experiments);
     $conf_part = $nr_experiments ? count($this->participationModel->get_confirmed_participations($experiments)) : 0;
     $conf_url = array('url' => 'participation', 'title' => sprintf(lang('part_action'), $conf_part));
     create_experiment_table();
     $data['ajax_source'] = 'experiment/table/0/0/' . $user_id;
     $data['page_title'] = sprintf(lang('welcome'), $user->username);
     $data['page_info'] = sprintf(lang('info_leader'), $nr_experiments);
     $data['action_urls'] = array($conf_url);
     $this->load->view('templates/header', $data);
     $this->authenticate->authenticate_redirect('templates/list_view', $data, UserRole::Leader);
     $this->load->view('templates/footer');
 }