Merge branch 'master' of disposed.de:scattport
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
<?php defined('BASEPATH') || exit('No direct script access allowed');
|
||||
/*
|
||||
* Copyright (c) 2011 Karsten Heiken, Eike Foken
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* 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
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Karsten Heiken <karsten@disposed.de>
|
||||
*/
|
||||
class Programs extends MY_Controller {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->model('program');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a list of all available programs.
|
||||
*/
|
||||
public function index() {
|
||||
$programs = $this->program->getAll();
|
||||
|
||||
$tpl['programs'] = $programs;
|
||||
$this->load->view('program/list', $tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show detailed information about a program.
|
||||
*
|
||||
* @param type $prg_id The program's id
|
||||
*/
|
||||
public function detail($prg_id) {
|
||||
$program = $this->program->getById($prg_id);
|
||||
|
||||
$tpl['program'] = $program;
|
||||
$this->load->view('program/detail', $tpl);
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,11 @@
|
||||
<?php
|
||||
endif;
|
||||
if ($experiment['creator_id'] == $this->access->profile()->id || $this->access->isAdmin()):
|
||||
if (isset($job['id']) && $job['finished_at'] != '0000-00-00 00:00:00'):
|
||||
?>
|
||||
<a href="javascript:deleteConfirm('<?=site_url('experiments/delete/' . $experiment['id']);?>');" class="button delete"><?=_('Delete experiment');?></a>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<a href="javascript:changeTitle('<?=$experiment['name'];?>', '<?=site_url('ajax/rename_experiment/' . $experiment['id']);?>');" class="button experiment_rename"><?=_('Change title');?></a>
|
||||
<?php
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?=_('Name');?></th>
|
||||
<?php
|
||||
if (count($shares) > 0 || $project['public'] == 1):
|
||||
?>
|
||||
<th scope="col"><?=_('Creator');?></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th scope="col"><?=_('Jobs');?></th>
|
||||
<th scope="col"><?=_('Actions');?></th>
|
||||
</tr>
|
||||
@@ -63,6 +70,20 @@
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="<?=site_url('experiments/detail/' . $experiment['id']);?>" title="<?=sprintf(_('Show experiment "%s"'), $experiment['name']);?>"><?=$experiment['name'];?></a></td>
|
||||
<?php
|
||||
if (count($shares) > 0 || $project['public'] == 1):
|
||||
if ($experiment['creator_id'] == $this->access->profile()->id):
|
||||
?>
|
||||
<td><?=_('You');?></td>
|
||||
<?php
|
||||
else:
|
||||
$user = $this->user->getById($experiment['creator_id']);
|
||||
?>
|
||||
<td><?=anchor('users/profile/' . urlencode($user['username']), $user['firstname'].' '.$user['lastname']);?></td>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
<td><span class="<?=$job['css'];?>"><?=$job['status'];?></span></td>
|
||||
<td>
|
||||
<?php
|
||||
@@ -75,10 +96,12 @@
|
||||
<a href="<?=site_url('experiments/create/' . $project['id'] . '/' . $experiment['id']);?>" title="<?=sprintf(_('Copy experiment "%s"'), $experiment['name']);?>"><?=_('Copy');?></a>
|
||||
<?php
|
||||
if ($experiment['creator_id'] == $this->access->profile()->id || $this->access->isAdmin()):
|
||||
if ($job['css'] == 'closed' || $job['css'] == ''):
|
||||
?>
|
||||
| <a href="<?=site_url('experiments/edit/' . $experiment['id']);?>" title="<?=sprintf(_('Edit this experiment'), $experiment['name']);?>"><?=_('Edit');?></a>
|
||||
| <a href="javascript:deleteConfirm('<?=site_url('experiments/delete/' . $experiment['id']);?>');" title="<?=sprintf(_('Delete this experiment'), $experiment['name']);?>"><?=_('Delete');?></a>
|
||||
<?php
|
||||
if ($job['css'] == 'closed' || $job['css'] == ''):
|
||||
elseif ($job['css'] == 'active'):
|
||||
?>
|
||||
| <a href="javascript:deleteConfirm('<?=site_url('experiments/delete/' . $experiment['id']);?>');" title="<?=sprintf(_('Delete this experiment'), $experiment['name']);?>"><?=_('Delete');?></a>
|
||||
<?php
|
||||
@@ -130,8 +153,18 @@
|
||||
<td><?=$job['name'];?></td>
|
||||
<td><span class="<?=$job['cssclass'];?>"><?=$job['humanstatus'];?></span></td>
|
||||
<td>
|
||||
<a href="<?=site_url('results/experiment/' . $job['id']);?>" title="<?= sprintf(_('Show results for this experiment'), $job['name']);?>"><?=_('Show results');?></a> |
|
||||
<a href="<?=site_url('experiments/edit/' . $job['id']);?>" title="<?= sprintf(_('Edit this experiment'), $job['name']);?>"><?=_('Edit');?></td>
|
||||
<?php
|
||||
if ($job['status'] == 'complete'):
|
||||
?>
|
||||
<a href="<?=site_url('results/experiment/' . $job['experiment_id']);?>" title="<?= sprintf(_('Show results for this experiment'), $job['name']);?>"><?=_('Show results');?></a>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
-
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
|
||||
Reference in New Issue
Block a user