Implement project shares
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
<div id="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><?=_('Project details');?></h2>
|
||||
<h2>
|
||||
<?=_('Project');?> »<?=$project['name'];?>«
|
||||
|
||||
<a class="share" href="<?=site_url('projects/share/' . $project['id']);?>"><?=_(sprintf('Shared with %s people', count($shares)));?></a>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
@@ -14,26 +18,27 @@
|
||||
<?php
|
||||
if ($project['default_model'] != ''):
|
||||
?>
|
||||
<canvas id="cv" style="border: #e8e8e8 1px solid;" width="120" height="120"></canvas>
|
||||
<p></p>
|
||||
<canvas id="cv" style="border: #e8e8e8 1px solid;" width="120" height="120"></canvas>
|
||||
<p></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('cv');
|
||||
var viewer = new JSC3D.Viewer(canvas);
|
||||
viewer.setParameter('SceneUrl', BASE_URL + 'uploads/<?=$project['id'];?>/<?=$project['default_model'];?>');
|
||||
viewer.setParameter('InitRotationX', -20);
|
||||
viewer.setParameter('InitRotationY', 20);
|
||||
viewer.setParameter('InitRotationZ', 0);
|
||||
viewer.setParameter('ModelColor', '#cccccc');
|
||||
viewer.setParameter('BackgroundColor1', '#ffffff');
|
||||
viewer.setParameter('BackgroundColor2', '#ffffff');
|
||||
viewer.setParameter('RenderMode', 'flat');
|
||||
viewer.init();
|
||||
viewer.update();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var canvas = document.getElementById('cv');
|
||||
var viewer = new JSC3D.Viewer(canvas);
|
||||
viewer.setParameter('SceneUrl', BASE_URL + 'uploads/<?=$project['id'];?>/<?=$project['default_model'];?>');
|
||||
viewer.setParameter('InitRotationX', -20);
|
||||
viewer.setParameter('InitRotationY', 20);
|
||||
viewer.setParameter('InitRotationZ', 0);
|
||||
viewer.setParameter('ModelColor', '#cccccc');
|
||||
viewer.setParameter('BackgroundColor1', '#ffffff');
|
||||
viewer.setParameter('BackgroundColor2', '#ffffff');
|
||||
viewer.setParameter('RenderMode', 'flat');
|
||||
viewer.init();
|
||||
viewer.update();
|
||||
</script>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<h3><?=_('Experiments');?></h3>
|
||||
<table class="tableList">
|
||||
<thead>
|
||||
@@ -71,7 +76,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><a class="button add" href="<?=site_url('experiments/create/' . $project['id']);?>"><?=_('Create experiment');?></a>
|
||||
<p><a class="button add" href="<?=site_url('experiments/create/' . $project['id']);?>"><?=_('Create experiment');?></a></p>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
|
||||
58
application/views/projects/shares.php
Normal file
58
application/views/projects/shares.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php $this->load->view('header');?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><?=_('Project');?> »<?=$project['name'];?>«</h2>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<table class="tableList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?=_('User');?></th>
|
||||
<th scope="col"><?=_('Rights');?></th>
|
||||
<th scope="col"><?=_('Actions');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($shares as $share):
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="<?=site_url('users/profile/' . $share['user_id']);?>"><?=$share['firstname'];?> <?=$share['lastname'];?></a></td>
|
||||
<td><?=form_dropdown('rights', array('Can edit', 'Can view'), $share['can_edit'], 'class="drop"')?></td>
|
||||
<td><a href="?action=delete&user_id=<?=$share['user_id'];?>"><?=_('Delete');?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<form method="post" name="addShare" action="<?=site_url('projects/share/' . $project['id']);?>">
|
||||
<ul>
|
||||
<li>
|
||||
<div>
|
||||
<?=form_label(_('Add person:'), 'user_id');?>
|
||||
<select name="user_id" id="user_id" class="drop">
|
||||
<?php
|
||||
foreach ($this->user->getAll() as $user):
|
||||
?>
|
||||
<option value="<?=$user['id'];?>"><?=$user['firstname'];?> <?=$user['lastname'];?></option>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
<?=form_submit('', _('Share'), 'class="submit"');?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<p><a class="button save" href="javascript:history.back();"><?=_('Save and back');?></a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('footer');?>
|
||||
Reference in New Issue
Block a user