Extend project and trial management

This commit is contained in:
Eike Foken
2011-08-19 01:44:23 +02:00
parent 64659ca207
commit b2a9b8b087
11 changed files with 231 additions and 229 deletions

View 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 &quot;%s&quot;'), $trial['name']);?>"><?=_('Show results');?></a> |
<a href="<?=site_url('trials/create/' . $project['id'] . '/' . $trial['id']);?>" title="<?=sprintf(_('Copy trial &quot;%s&quot;'), $trial['name']);?>"><?=_('Copy');?></a> |
<a href="<?=site_url('trials/edit/' . $trial['id']);?>" title="<?=sprintf(_('Edit trial &quot;%s&quot;'), $trial['name']);?>"><?=_('Edit');?></a> |
<a href="<?=site_url('trials/delete/' . $trial['id']);?>" title="<?=sprintf(_('Delete trial &quot;%s&quot;'), $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 &quot;%s&quot;'), $trial['name']);?>"><?=_('Show results');?></a> |
<a href="<?=site_url('trials/edit/' . $trial['id']);?>" title="<?= sprintf(_('Edit trial &quot;%s&quot;'), $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');?>

View File

@@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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');?>

View File

@@ -0,0 +1,58 @@
<?php $this->load->view('header'); ?>
<div id="content">
<div class="title">
<h2><?= _('Create a new project') ?></h2>
</div>
<div class="box">
<form method="post" name="createproject" action="<?=site_url('projects/create')?>" enctype="multipart/form-data">
<h3><?= _('Required information') ?></h3>
<ul>
<li>
<h4><?= _('Project name') ?> <span class="req">*</span></h4>
<div>
<input type="text" name="name" class="short text" tabindex="1" value="<?=set_value('name') == '' ? $this->input->post('name') : set_value('name');?>">
<?=form_error('name')?>
</div>
</li>
<li>
<h4><?= _('Description') ?></h4>
<label class="note"><?= _('A description is useful if you want to share this project with co-workers.') ?></label>
<div>
<textarea name="description" rows="6" cols="60" tabindex="2" class="textarea"><?=set_value('description') == '' ? $this->input->post('description') : set_value('description');?></textarea>
<?=form_error('description')?>
</div>
</li>
</ul>
<h3><?= _('Optional information') ?></h3>
<ul>
<li>
<h4><?= _('3D model') ?></h4>
<label class="note"><?= _('Upload a 3D model that is used as a default for new trials. <br/>This model can be changed for every trial.')?></label>
<div>
<input type="file" class="file" name="defaultmodel" tabindex="3" value="<?=set_value('defaultmodel')?>">
<?=$model['success'] ? '' : $this->upload->display_errors('<span class="error">', '</span>');?>
</div>
</li>
<li>
<h4><?= _('Default configuration') ?> <span class="req">*</span></h4>
<label class="note"><?= _('Upload a configuration that is used as a default for new trials. <br/>This configuration can be changed for every trial.')?></label>
<div>
<input type="file" class="file" name="defaultconfig" tabindex="4" value="<?=set_value('defaultconfig')?>">
<?=$config['success'] ? '' : $this->upload->display_errors('<span class="error">', '</span>');?>
</div>
</li>
<li>
<a href="#" onclick="document.forms.createproject.submit()" class="button"><?= _('Save') ?></a>
</li>
</ul>
</form>
</div>
</div>
<?php $this->load->view('footer'); ?>