Show if a project is public and then disable sharing
This commit is contained in:
@@ -5,7 +5,17 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<h2>
|
<h2>
|
||||||
<?=anchor('projects', _('Projects'));?> » <?=$project['name'];?>
|
<?=anchor('projects', _('Projects'));?> » <?=$project['name'];?>
|
||||||
|
<?php
|
||||||
|
if ($project['public'] == 1):
|
||||||
|
?>
|
||||||
|
<a class="share" href="<?=site_url('projects/shares/' . $project['id']);?>"><?=_('Public for all');?></a>
|
||||||
|
<?php
|
||||||
|
else:
|
||||||
|
?>
|
||||||
<a class="share" href="<?=site_url('projects/shares/' . $project['id']);?>"><?=_(sprintf('Shared with %s people', count($shares)));?></a>
|
<a class="share" href="<?=site_url('projects/shares/' . $project['id']);?>"><?=_(sprintf('Shared with %s people', count($shares)));?></a>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
<h3><?=_('Edit shares');?></h3>
|
||||||
|
<?php
|
||||||
|
if ($project['public'] == 1):
|
||||||
|
?>
|
||||||
|
<p><?=_('This project is public for all');?></p>
|
||||||
|
<?php
|
||||||
|
else:
|
||||||
|
?>
|
||||||
<form method="post" name="updateShares" action="?action=update">
|
<form method="post" name="updateShares" action="?action=update">
|
||||||
<table class="tableList">
|
<table class="tableList">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -39,8 +47,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
<p>
|
||||||
<p><a class="button save" href="javascript:void(0);" onclick="$('form[name=updateShares]').submit();"><?=_('Save and back');?></a></p>
|
<a class="button save" href="javascript:void(0);" onclick="$('form[name=updateShares]').submit();"><?=_('Save and back');?></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3><?=_('Share with someone');?></h3>
|
<h3><?=_('Share with someone');?></h3>
|
||||||
<form method="post" name="addShare" action="?action=add">
|
<form method="post" name="addShare" action="?action=add">
|
||||||
@@ -50,7 +59,6 @@
|
|||||||
<select name="user_id" id="user_id" class="drop">
|
<select name="user_id" id="user_id" class="drop">
|
||||||
<?php
|
<?php
|
||||||
foreach ($this->user->getAll() as $user):
|
foreach ($this->user->getAll() as $user):
|
||||||
|
|
||||||
// don't list the user himself
|
// don't list the user himself
|
||||||
if ($user['id'] === $this->access->profile()->id || $user['id'] === $project['owner'])
|
if ($user['id'] === $this->access->profile()->id || $user['id'] === $project['owner'])
|
||||||
continue;
|
continue;
|
||||||
@@ -67,6 +75,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user