Remove project_id from task URLs
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<?= $this->app->component('file-upload', array(
|
||||
'csrf' => $this->app->getToken()->getReusableCSRFToken(),
|
||||
'maxSize' => $max_size,
|
||||
'url' => $this->url->to('TaskFileController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
'url' => $this->url->to('TaskFileController', 'save', array('task_id' => $task['id'])),
|
||||
'labelDropzone' => t('Drag and drop your files here'),
|
||||
'labelOr' => t('or'),
|
||||
'labelChooseFiles' => t('choose files'),
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
<ul>
|
||||
<?php if ($this->file->getPreviewType($file['name']) !== null): ?>
|
||||
<li>
|
||||
<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
||||
<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?>
|
||||
<li>
|
||||
<i class="fa fa-eye fa-fw"></i>
|
||||
<?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?>
|
||||
<?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
||||
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?= $this->hook->render('template:task-file:documents:dropdown', array('task' => $task, 'file' => $file)) ?>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
'image' => $file,
|
||||
'regex' => 'FILE_ID',
|
||||
'url' => array(
|
||||
'image' => $this->url->to('FileViewerController', 'image', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])),
|
||||
'thumbnail' => $this->url->to('FileViewerController', 'thumbnail', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])),
|
||||
'download' => $this->url->to('FileViewerController', 'download', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])),
|
||||
'image' => $this->url->to('FileViewerController', 'image', array('file_id' => 'FILE_ID', 'task_id' => $task['id'])),
|
||||
'thumbnail' => $this->url->to('FileViewerController', 'thumbnail', array('file_id' => 'FILE_ID', 'task_id' => $task['id'])),
|
||||
'download' => $this->url->to('FileViewerController', 'download', array('file_id' => 'FILE_ID', 'task_id' => $task['id'])),
|
||||
)
|
||||
)) ?>
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-text" title="<?= $this->text->e($file['name']) ?>"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', 'image', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?>
|
||||
<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', 'image', array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
||||
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?= $this->hook->render('template:task-file:images:dropdown', array('task' => $task, 'file' => $file)) ?>
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<?= $this->modal->confirmButtons(
|
||||
'TaskFileController',
|
||||
'remove',
|
||||
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])
|
||||
array('task_id' => $task['id'], 'file_id' => $file['id'])
|
||||
) ?>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<p id="screenshot-inner"><?= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?></p>
|
||||
</div>
|
||||
|
||||
<form action="<?= $this->url->href('TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post">
|
||||
<form action="<?= $this->url->href('TaskFileController', 'screenshot', array('task_id' => $task['id'])) ?>" method="post">
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->app->component('screenshot') ?>
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
|
||||
Reference in New Issue
Block a user