diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-31 12:37:15 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-31 12:37:15 -0500 |
commit | 772804add8095eea9b3ec2a832c2f82fbb9a6fd5 (patch) | |
tree | 782a414d15f9091d04bcf3960a957f952958e548 /app/Template/file | |
parent | 66f150d887a34d2b51ff14f22d0fd41a34f8cc77 (diff) |
Acl refactoring
Diffstat (limited to 'app/Template/file')
-rw-r--r-- | app/Template/file/new.php | 4 | ||||
-rw-r--r-- | app/Template/file/open.php | 2 | ||||
-rw-r--r-- | app/Template/file/remove.php | 4 | ||||
-rw-r--r-- | app/Template/file/show.php | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/app/Template/file/new.php b/app/Template/file/new.php index 861344b4..4f0c233b 100644 --- a/app/Template/file/new.php +++ b/app/Template/file/new.php @@ -2,13 +2,13 @@ <h2><?= t('Attach a document') ?></h2> </div> -<form action="<?= $this->u('file', 'save', array('task_id' => $task['id'])) ?>" method="post" enctype="multipart/form-data"> +<form action="<?= $this->u('file', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" enctype="multipart/form-data"> <?= $this->formCsrf() ?> <input type="file" name="files[]" multiple /> <div class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->formatBytes($max_size) : $max_size ?></div> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> - <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> </form>
\ No newline at end of file diff --git a/app/Template/file/open.php b/app/Template/file/open.php index 9efd7780..70e0f8aa 100644 --- a/app/Template/file/open.php +++ b/app/Template/file/open.php @@ -1,6 +1,6 @@ <div class="page-header"> <h2><?= $this->e($file['name']) ?></h2> <div class="task-file-viewer"> - <img src="<?= $this->u('file', 'image', array('file_id' => $file['id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> + <img src="<?= $this->u('file', 'image', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> </div> </div>
\ No newline at end of file diff --git a/app/Template/file/remove.php b/app/Template/file/remove.php index 3e542c05..04ec30d5 100644 --- a/app/Template/file/remove.php +++ b/app/Template/file/remove.php @@ -8,8 +8,8 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> + <?= $this->a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> <?= t('or') ?> - <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/file/show.php b/app/Template/file/show.php index 4742db87..179f5744 100644 --- a/app/Template/file/show.php +++ b/app/Template/file/show.php @@ -8,12 +8,12 @@ <ul class="task-show-files"> <?php foreach ($files as $file): ?> <li> - <?= $this->a($this->e($file['name']), 'file', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?> + <?= $this->a($this->e($file['name']), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <span class="task-show-file-actions"> <?php if ($file['is_image']): ?> - <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'file_id' => $file['id']), false, 'file-popover') ?>, + <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'file-popover') ?>, <?php endif ?> - <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?> + <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> </span> </li> <?php endforeach ?> |