Extend project and trial management
This commit is contained in:
@@ -201,6 +201,29 @@ $config['parameters/create'] = array(
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rules for creating trials.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
$config['trials/create'] = array(
|
||||||
|
array(
|
||||||
|
'field' => 'name',
|
||||||
|
'label' => _('Trial name'),
|
||||||
|
'rules' => 'required|min_length[3]|max_length[60]|trim',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'field' => 'description',
|
||||||
|
'label' => _('Description'),
|
||||||
|
'rules' => 'required|trim',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'field' => 'program_id',
|
||||||
|
'label' => _('Program'),
|
||||||
|
'rules' => 'required|alpha_numeric|trim',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
/* End of file form_validation.php */
|
/* End of file form_validation.php */
|
||||||
/* Location: ./application/config/form_validation.php */
|
/* Location: ./application/config/form_validation.php */
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 Karsten Heiken <karsten@disposed.de>
|
* Copyright (c) 2011 Karsten Heiken <karsten@disposed.de>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
* in the Software without restriction, including without limitation the rights
|
* in the Software without restriction, including without limitation the rights
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
* furnished to do so, subject to the following conditions:
|
* furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in
|
* The above copyright notice and this permission notice shall be included in
|
||||||
* all copies or substantial portions of the Software.
|
* all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @author Karsten Heiken <karsten@disposed.de>
|
* @author Karsten Heiken <karsten@disposed.de>
|
||||||
*/
|
* @author Eike Foken <kontakt@eikefoken.de>
|
||||||
|
*/
|
||||||
class Projects extends CI_Controller {
|
class Projects extends CI_Controller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +44,7 @@ class Projects extends CI_Controller {
|
|||||||
$projects = $this->project->getAll();
|
$projects = $this->project->getAll();
|
||||||
|
|
||||||
$tpl['projects'] = $projects;
|
$tpl['projects'] = $projects;
|
||||||
$this->load->view('project/list', $tpl);
|
$this->load->view('projects/list', $tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,7 +101,7 @@ class Projects extends CI_Controller {
|
|||||||
$data['model']['success'] = isset($modelUploaded) && $modelUploaded ? true : false;
|
$data['model']['success'] = isset($modelUploaded) && $modelUploaded ? true : false;
|
||||||
$data['config']['success'] = isset($configUploaded) && $configUploaded ? true: false;
|
$data['config']['success'] = isset($configUploaded) && $configUploaded ? true: false;
|
||||||
|
|
||||||
$this->load->view('project/new', $data);
|
$this->load->view('projects/new', $data);
|
||||||
} else {
|
} else {
|
||||||
$data = array(
|
$data = array(
|
||||||
'name' => $this->input->post('name'),
|
'name' => $this->input->post('name'),
|
||||||
@@ -112,17 +113,9 @@ class Projects extends CI_Controller {
|
|||||||
$data['project_id'] = $this->project->create($data);
|
$data['project_id'] = $this->project->create($data);
|
||||||
|
|
||||||
if (isset($data['project_id'])) {
|
if (isset($data['project_id'])) {
|
||||||
$userpath = FCPATH . 'uploads/' . $this->session->userdata('user_id') . '/';
|
$this->load->helper('directory');
|
||||||
$projectpath = $userpath . $data['project_id'] . '/';
|
$projectPath = FCPATH.'uploads/'.$this->session->userdata('user_id').'/'.$data['project_id'].'/';
|
||||||
|
mkdirs($projectPath);
|
||||||
if (!is_dir($projectpath)) {
|
|
||||||
if (!is_dir($userpath)) {
|
|
||||||
mkdir($userpath, 0777);
|
|
||||||
chmod($userpath, 0777);
|
|
||||||
}
|
|
||||||
mkdir($projectpath, 0777);
|
|
||||||
chmod($projectpath, 0777);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($modelUploaded) {
|
if ($modelUploaded) {
|
||||||
copy($modelData['full_path'], $projectpath . $modelData['file_name']);
|
copy($modelData['full_path'], $projectpath . $modelData['file_name']);
|
||||||
@@ -132,10 +125,10 @@ class Projects extends CI_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->messages->add($projectpath, 'notice');
|
$this->messages->add($projectpath, 'notice');
|
||||||
redirect('/projects/detail/' . $data['project_id'], 301);
|
redirect('/projects/detail/' . $data['project_id'], 303);
|
||||||
} else {
|
} else {
|
||||||
$this->messages->add(_('The project could not be created.'), 'error');
|
$this->messages->add(_('The project could not be created.'), 'error');
|
||||||
$this->load->view('project/new');
|
$this->load->view('projects/new');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,22 +136,22 @@ class Projects extends CI_Controller {
|
|||||||
/**
|
/**
|
||||||
* Shows the project details
|
* Shows the project details
|
||||||
*
|
*
|
||||||
* @param integer $prj_id The ID of the project to show
|
* @param integer $id The ID of the project to show
|
||||||
*/
|
*/
|
||||||
public function detail($prj_id) {
|
public function detail($id) {
|
||||||
$project = $this->project->getById($prj_id);
|
$this->load->helper('typography');
|
||||||
|
|
||||||
|
$project = $this->project->getById($id);
|
||||||
if (!$project) {
|
if (!$project) {
|
||||||
$this->messages->add(_('The project could not be loaded.'), 'error');
|
$this->messages->add(_('The project could not be loaded.'), 'error');
|
||||||
redirect('projects', 301);
|
redirect('projects', 303);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session->set_userdata('active_project', $prj_id);
|
$data['project'] = $project;
|
||||||
$trials = $this->trial->getByProjectId($prj_id);
|
$data['trials'] = $this->trial->getByProjectId($id);
|
||||||
|
$data['jobsDone'] = null;
|
||||||
|
|
||||||
$tpl['project'] = $project;
|
$this->load->view('projects/detail', $data);
|
||||||
$tpl['trials'] = $trials;
|
|
||||||
$tpl['jobsDone'] = null;
|
|
||||||
$this->load->view('project/detail', $tpl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,11 +159,11 @@ class Projects extends CI_Controller {
|
|||||||
*
|
*
|
||||||
* @param integer $projectId
|
* @param integer $projectId
|
||||||
*/
|
*/
|
||||||
public function delete($projectId) {
|
public function delete($id) {
|
||||||
$this->project->delete($projectId);
|
if ($this->project->delete($id)) {
|
||||||
$this->session->unset_userdata('active_project');
|
|
||||||
$this->messages->add(_('The project was deleted.'), 'success');
|
$this->messages->add(_('The project was deleted.'), 'success');
|
||||||
redirect('projects');
|
}
|
||||||
|
redirect('projects', 303);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,13 @@ class Trials extends CI_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new project.
|
* Allows users to create new trials.
|
||||||
|
*
|
||||||
|
* @param string $projectId
|
||||||
*/
|
*/
|
||||||
public function create($projectId = '') {
|
public function create($projectId = '', $copyId = '') {
|
||||||
|
// TODO: Handle copying of trials
|
||||||
|
|
||||||
$project = $this->project->getByID($projectId);
|
$project = $this->project->getByID($projectId);
|
||||||
|
|
||||||
if (empty($projectId) || !isset($project['id'])){
|
if (empty($projectId) || !isset($project['id'])){
|
||||||
@@ -58,22 +62,8 @@ class Trials extends CI_Controller {
|
|||||||
$parameters[$program['id']] = $this->parameter->getAll($program['id']);
|
$parameters[$program['id']] = $this->parameter->getAll($program['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = array(
|
if ($this->form_validation->run('trials/create') === true) {
|
||||||
array(
|
// TODO: Handle file upload
|
||||||
'field' => 'name',
|
|
||||||
'label' => _('Trial name'),
|
|
||||||
'rules' => 'required|min_length[3]|max_length[60]|trim',
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'field' => 'description',
|
|
||||||
'label' => _('Description'),
|
|
||||||
'rules' => 'required|trim',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$this->form_validation->set_rules($config);
|
|
||||||
|
|
||||||
if ($this->form_validation->run() === true) {
|
|
||||||
// TODO: handle file upload
|
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'name' => $this->input->post('name'),
|
'name' => $this->input->post('name'),
|
||||||
@@ -83,43 +73,32 @@ class Trials extends CI_Controller {
|
|||||||
'creator_id' => $this->session->userdata('user_id'),
|
'creator_id' => $this->session->userdata('user_id'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = $this->trial->create($data);
|
$trialId = $this->trial->create($data);
|
||||||
if ($result) {
|
if ($trialId) {
|
||||||
foreach ($_POST as $key => $value) {
|
foreach ($_POST as $key => $value) {
|
||||||
if (preg_match('/^param-[0-9a-z]+/', $key) && !empty($value)) {
|
if (preg_match('/^param-[0-9a-z]+/', $key) && !empty($value)) {
|
||||||
$param['parameter_id'] = substr($key, 6, 16);
|
$param['parameter_id'] = substr($key, 6, 16);
|
||||||
$param['value'] = $this->input->post($key);
|
$param['value'] = $this->input->post($key);
|
||||||
$this->trial->addParameter($param, $result);
|
$this->trial->addParameter($param, $trialId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$userpath = FCPATH . 'uploads/' . $this->session->userdata('user_id') . '/';
|
$this->load->helper('directory');
|
||||||
$projectpath = $userpath . $projectId . '/';
|
$trialPath = FCPATH.'uploads/'.$this->session->userdata('user_id').'/'.$projectId.'/'. $trialId.'/';
|
||||||
$trialpath = $projectpath . $result . '/';
|
mkdirs($trialPath);
|
||||||
if(!is_dir($trialpath)) {
|
|
||||||
if (!is_dir($projectpath)) {
|
|
||||||
if(!is_dir($userpath)) {
|
|
||||||
mkdir($userpath);
|
|
||||||
chmod($userpath, 0777);
|
|
||||||
}
|
|
||||||
mkdir($projectpath);
|
|
||||||
chmod($projectpath, 0777);
|
|
||||||
}
|
|
||||||
mkdir($trialpath);
|
|
||||||
chmod($trialpath, 0777);
|
|
||||||
}
|
|
||||||
|
|
||||||
redirect('trials/detail/' . $result, 'refresh');
|
redirect('trials/detail/' . $trialId, 'refresh');
|
||||||
} else {
|
} else {
|
||||||
$this->messages->add(_('The trial could not be created.'), 'error');
|
$this->messages->add(_('The trial could not be created.'), 'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl['parameters'] = $parameters;
|
$data = array(); // empty the data array
|
||||||
$tpl['programs'] = $programs;
|
$data['parameters'] = $parameters;
|
||||||
$tpl['project'] = $project;
|
$data['programs'] = $programs;
|
||||||
|
$data['project'] = $project;
|
||||||
|
|
||||||
$this->load->view('trial/new', $tpl);
|
$this->load->view('trial/new', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,15 +36,19 @@ class Trial extends CI_Model {
|
|||||||
* @return bool was the insert successful
|
* @return bool was the insert successful
|
||||||
*/
|
*/
|
||||||
public function create($data) {
|
public function create($data) {
|
||||||
do {
|
if (!isset($data['project_id'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
do { // generate unique hash
|
||||||
$data['id'] = random_hash();
|
$data['id'] = random_hash();
|
||||||
} while ($this->db->where('id', $data['id'])->from('trials')->count_all_results() > 0);
|
} while ($this->db->where('id', $data['id'])->from('trials')->count_all_results() > 0);
|
||||||
|
|
||||||
|
if ($this->db->insert('trials', $data)) {
|
||||||
if ($this->db->insert('trials', $data))
|
|
||||||
return $data['id'];
|
return $data['id'];
|
||||||
else
|
} else {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
<?php $this->load->view('header'); ?>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<div class="title">
|
|
||||||
<h2><?= _('Project details') ?></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="box">
|
|
||||||
<h3><?= _('Description') ?></h3>
|
|
||||||
<div class="editInPlace"><?=nl2br($project['description']);?></div>
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<h3><?= _('Trials') ?></h3>
|
|
||||||
<table class="tableList">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col"><?= _('Trial') ?></th>
|
|
||||||
<th scope="col"><?= _('Jobs') ?></th>
|
|
||||||
<th scope="col"><?= _('Actions') ?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?
|
|
||||||
if(count($trials) > 0):
|
|
||||||
foreach($trials as $trial):
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td><a href="<?=site_url('trials/'.$trial['id'])?>"title="<?= sprintf(_('Show trial "%s"'), $trial['name'])?>"><?=$trial['name']?></a></td>
|
|
||||||
<td><span class="active"><?= _('Completed') ?></span></td>
|
|
||||||
<td>
|
|
||||||
<a href="<?=site_url('trials/results/'.$trial['id'])?>" title="<?= sprintf(_('Show results for the trial "%s"'), $trial['name'])?>"><?= _('Show results') ?></a> |
|
|
||||||
<a href="<?=site_url('trials/edit/'.$trial['id'])?>" title="<?= sprintf(_('Edit trial "%s"'), $trial['name']) ?>"><?= _('Edit') ?></a> |
|
|
||||||
<a href="<?=site_url('trials/delete/'.$trial['id'])?>" title="<?= sprintf(_('Delete trial "%s"'), $trial['name']) ?>"><?= _('Delete') ?></a></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
endforeach;
|
|
||||||
else:
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3"><?= _('No trials available.') ?></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p><a class="button add" href="<?=site_url('trials/create/'.$project['id'])?>"><?= _('Create a new trial') ?></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="title">
|
|
||||||
<h2><?= _('Recent jobs') ?></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="box">
|
|
||||||
<table class="tableList">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col"><?= _('Trial') ?></th>
|
|
||||||
<th scope="col"><?= _('Finished') ?></th>
|
|
||||||
<th scope="col"><?= _('Actions') ?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?
|
|
||||||
if(count($jobsDone) > 0):
|
|
||||||
foreach($jobsDone as $job):
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td>Versuchsname</td>
|
|
||||||
<td>Heute, 09:32</td>
|
|
||||||
<td>
|
|
||||||
<a href="<?=site_url('trials/results/'.$trial['id'])?>" title="<?= sprintf(_('Show results for the trial "%s"'), $trial['name'])?>"><?= _('Show results') ?></a> |
|
|
||||||
<a href="<?=site_url('trials/edit/'.$trial['id'])?>" title="<?= sprintf(_('Edit trial "%s"'), $trial['name']) ?>"><?= _('Edit') ?></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
endforeach;
|
|
||||||
else:
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3"><?= _('No jobs found.') ?></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php $this->load->view('footer'); ?>
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
<?php $this->load->view('header');?>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
|
|
||||||
<div class="title">
|
|
||||||
<h2><?= _('Project overview') ?></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="box">
|
|
||||||
<table class="tableList paginated sortable">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col"><?= _('Project') ?></th>
|
|
||||||
<th scope="col"><?= _('Owner') ?></th>
|
|
||||||
<th scope="col"><?= _('Jobs') ?></th>
|
|
||||||
<th scope="col"><?= _('Actions') ?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
foreach($projects as $project):
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td><a href="<?=site_url('projects/detail/' . $project['id'])?>"><abbr title="<?=$project['description']?>"><?=$project['name']?></abbr></a></td>
|
|
||||||
<td><?=$project['firstname'] . " " . $project['lastname']?></td>
|
|
||||||
<td><span class="active"><?= _('Successfully finished') ?></span></td>
|
|
||||||
<td><a href="#"><?= _('Show results') ?></a> | <?=anchor('projects/delete/' . $project['id'], _('Delete'));?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
endforeach;
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php $this->load->view('footer');?>
|
|
||||||
95
application/views/projects/detail.php
Normal file
95
application/views/projects/detail.php
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<?php $this->load->view('header');?>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<h2><?=_('Project details');?></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h3><?=_('Description');?></h3>
|
||||||
|
<div class="editInPlace"><?=auto_typography($project['description']);?></div>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<h3><?=_('Trials');?></h3>
|
||||||
|
<table class="tableList">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><?=_('Trial');?></th>
|
||||||
|
<th scope="col"><?=_('Jobs');?></th>
|
||||||
|
<th scope="col"><?=_('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if (count($trials) > 0):
|
||||||
|
foreach ($trials as $trial):
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><a href="<?=site_url('trials/' . $trial['id']);?>" title="<?=sprintf(_("Show trial '%s'"), $trial['name']);?>"><?=$trial['name'];?></a></td>
|
||||||
|
<td><span class="active"><?=_('Completed');?></span></td>
|
||||||
|
<td>
|
||||||
|
<a href="<?=site_url('trials/results/' . $trial['id']);?>" title="<?=sprintf(_('Show results for the trial "%s"'), $trial['name']);?>"><?=_('Show results');?></a> |
|
||||||
|
<a href="<?=site_url('trials/create/' . $project['id'] . '/' . $trial['id']);?>" title="<?=sprintf(_('Copy trial "%s"'), $trial['name']);?>"><?=_('Copy');?></a> |
|
||||||
|
<a href="<?=site_url('trials/edit/' . $trial['id']);?>" title="<?=sprintf(_('Edit trial "%s"'), $trial['name']);?>"><?=_('Edit');?></a> |
|
||||||
|
<a href="<?=site_url('trials/delete/' . $trial['id']);?>" title="<?=sprintf(_('Delete trial "%s"'), $trial['name']);?>"><?=_('Delete');?></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
endforeach;
|
||||||
|
else:
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"><?=_('No trials available.');?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p><a class="button add" href="<?=site_url('trials/create/' . $project['id']);?>"><?=_('Create a new trial');?></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<h2><?=_('Recent jobs');?></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<table class="tableList">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><?=_('Trial');?></th>
|
||||||
|
<th scope="col"><?=_('Finished');?></th>
|
||||||
|
<th scope="col"><?=_('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if (count($jobsDone) > 0):
|
||||||
|
foreach ($jobsDone as $job):
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td>Versuchsname</td>
|
||||||
|
<td>Heute, 09:32</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?=site_url('trials/results/' . $trial['id']);?>" title="<?= sprintf(_('Show results for the trial "%s"'), $trial['name']);?>"><?=_('Show results');?></a> |
|
||||||
|
<a href="<?=site_url('trials/edit/' . $trial['id']);?>" title="<?= sprintf(_('Edit trial "%s"'), $trial['name']);?>"><?=_('Edit');?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
endforeach;
|
||||||
|
else:
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"><?=_('No jobs found.');?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $this->load->view('footer');?>
|
||||||
39
application/views/projects/list.php
Normal file
39
application/views/projects/list.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php $this->load->view('header');?>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<h2><?=_('Project overview');?></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<table class="tableList paginated sortable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><?=_('Project');?></th>
|
||||||
|
<th scope="col"><?=_('Owner');?></th>
|
||||||
|
<th scope="col"><?=_('Jobs');?></th>
|
||||||
|
<th scope="col"><?=_('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
foreach($projects as $project):
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><a href="<?=site_url('projects/detail/' . $project['id'] . '?active_project=' . $project['id']);?>"><abbr title="<?=$project['description'];?>"><?=$project['name'];?></abbr></a></td>
|
||||||
|
<td><?=$project['firstname'] . " " . $project['lastname'];?></td>
|
||||||
|
<td><span class="active"><?=_('Successfully finished');?></span></td>
|
||||||
|
<td><a href="#"><?=_('Show results');?></a> | <?=anchor('projects/delete/' . $project['id'], _('Delete'));?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
endforeach;
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $this->load->view('footer');?>
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
?>
|
?>
|
||||||
<h4><?=_('Application to use for the computation');?></h4>
|
<h4><?=_('Application to use for the computation');?></h4>
|
||||||
<input type="hidden" name="program_id" id="program_id" value="<?=set_value('program_id');?>" />
|
<input type="hidden" name="program_id" id="program_id" value="<?=set_value('program_id');?>" />
|
||||||
|
<?=form_error('program_id');?>
|
||||||
<p>
|
<p>
|
||||||
<?
|
<?
|
||||||
foreach ($programs as $program):
|
foreach ($programs as $program):
|
||||||
|
|||||||
Reference in New Issue
Block a user