summaryrefslogtreecommitdiffstats
path: root/application/views/file
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-13 22:03:36 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-13 22:03:36 +0200
commit2cc4778de8ed465a0c870f120ec06510b6828edd (patch)
tree23e658f260cdf975450f6524ac506836a60c1d28 /application/views/file
parent189e232fc65ab356eef9997a81a9755d17c41b37 (diff)
Hide delete button if user doesn't own the id
It won't work anyway. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/views/file')
-rw-r--r--application/views/file/delete_form.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/application/views/file/delete_form.php b/application/views/file/delete_form.php
index 9e4562081..55827c019 100644
--- a/application/views/file/delete_form.php
+++ b/application/views/file/delete_form.php
@@ -2,7 +2,9 @@
<?php echo form_open('file/delete/'.$id); ?>
<?php if(isset($msg)) echo "<p>".$msg."</p>"; ?>
<?php if($filedata): ?>
- <p>You are about to delete the following upload:</p>
+ <?php if($can_delete) { ?>
+ <p>You are about to delete the following upload:</p>
+ <?php } ?>
<table style="margin: auto">
<tr>
<td class="title">ID</td>
@@ -25,7 +27,9 @@
<td class="text"><?php echo $filedata["mimetype"]; ?></td>
</tr>
</table>
- <input type="submit" value="Delete" name="process" />
+ <?php if($can_delete) { ?>
+ <input type="submit" value="Delete" name="process" />
+ <?php } ?>
<?php endif; ?>
</form>
</div>