Remove DataMapper snippet from project controller
This commit is contained in:
@@ -76,22 +76,19 @@ class Projects extends CI_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
$projects = new Project();
|
$projects = $this->project->getAll();
|
||||||
$projects->where('id', 'c5ca461679712e6e6f24784a79b5511199da1a35')->get();
|
|
||||||
|
$tpl['projects'] = $projects;
|
||||||
//$tpl['notice'][] = print_r($projects->all, true);
|
|
||||||
$tpl['projects'] = $projects->all;
|
|
||||||
$this->load->view('project/list', $tpl);
|
$this->load->view('project/list', $tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detail($prj_id) {
|
public function detail($prj_id) {
|
||||||
$project = $this->project->getById($prj_id);
|
$project = $this->project->getById($prj_id);
|
||||||
$trials = $this->trial->getByProjectId($prj_id);
|
$trials = $this->trial->getByProjectId($prj_id);
|
||||||
foreach($trials as $trial) {
|
|
||||||
$jobsDone = $this->job->getJobsByTrial($trial_id, $status='done');
|
|
||||||
}
|
|
||||||
$tpl['project'] = $project;
|
$tpl['project'] = $project;
|
||||||
$tpl['trials'] = $trials;
|
$tpl['trials'] = $trials;
|
||||||
|
$tpl['jobsDone'] = null;
|
||||||
$this->load->view('project/detail', $tpl);
|
$this->load->view('project/detail', $tpl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user