看板初始化提交

This commit is contained in:
zephyr
2026-06-01 21:23:12 -07:00
commit 27411ebedc
1827 changed files with 192340 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<div class="page-header">
<h2><?= t('Attach a document') ?></h2>
</div>
<?= $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'])),
'labelDropzone' => t('Drag and drop your files here'),
'labelOr' => t('or'),
'labelChooseFiles' => t('choose files'),
'labelOversize' => $max_size > 0 ? t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) : null,
'labelSuccess' => t('All files have been uploaded successfully.'),
'labelCloseSuccess' => t('Close this window'),
'labelUploadError' => t('Unable to upload this file.'),
)) ?>
<?= $this->modal->submitButtons(array(
'submitLabel' => t('Upload files'),
'disabled' => true,
)) ?>
+50
View File
@@ -0,0 +1,50 @@
<?php if (! empty($files)): ?>
<table class="table-striped table-scrolling">
<tr>
<th><?= t('Filename') ?></th>
<th class="column-15"><?= t('Size') ?></th>
<th class="column-15"><?= t('Creator') ?></th>
<th class="column-10"><?= t('Date') ?></th>
</tr>
<?php foreach ($files as $file): ?>
<tr>
<td>
<i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul>
<?php if ($this->file->getPreviewType($file['name']) !== null): ?>
<li>
<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'file_id' => $file['id'], 'etag' => $file['etag'])) ?>
</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'], 'file_id' => $file['id']), false, '', '', true) ?>
</li>
<?php endif ?>
<li>
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'], 'etag' => $file['etag'])) ?>
</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'], 'file_id' => $file['id'])) ?>
</li>
<?php endif ?>
<?= $this->hook->render('template:task-file:documents:dropdown', array('task' => $task, 'file' => $file)) ?>
</ul>
</div>
</td>
<td>
<?= $this->text->bytes($file['size']) ?>
</td>
<td>
<?= $this->text->e($file['user_name'] ?: $file['username']) ?>
</td>
<td>
<?= $this->dt->date($file['date']) ?>
</td>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>
+50
View File
@@ -0,0 +1,50 @@
<?php if (! empty($images)): ?>
<div class="file-thumbnails">
<?php foreach ($images as $file): ?>
<div class="file-thumbnail">
<?= $this->app->component('image-slideshow', array(
'images' => $images,
'image' => $file,
'regex_file_id' => 'FILE_ID',
'regex_etag' => 'ETAG',
'url' => array(
'image' => $this->url->to('FileViewerController', 'image', array('file_id' => 'FILE_ID', 'task_id' => $task['id'], 'etag' => 'ETAG')),
'thumbnail' => $this->url->to('FileViewerController', 'thumbnail', array('file_id' => 'FILE_ID', 'task_id' => $task['id'], 'etag' => 'ETAG')),
'download' => $this->url->to('FileViewerController', 'download', array('file_id' => 'FILE_ID', 'task_id' => $task['id'], 'etag' => 'ETAG')),
)
)) ?>
<div class="file-thumbnail-content">
<div class="file-thumbnail-title">
<div class="dropdown">
<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'], 'file_id' => $file['id'], 'etag' => $file['etag']), false, '', '', true) ?>
</li>
<li>
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'], 'etag' => $file['etag'])) ?>
</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'], 'file_id' => $file['id'])) ?>
</li>
<?php endif ?>
<?= $this->hook->render('template:task-file:images:dropdown', array('task' => $task, 'file' => $file)) ?>
</ul>
</div>
</div>
<div class="file-thumbnail-description">
<?= $this->hook->render('template:task-file:images:before-thumbnail-description', array('task' => $task, 'file' => $file)) ?>
<?= $this->app->tooltipMarkdown(t('Uploaded: %s', $this->dt->datetime($file['date']))."\n\n".t('Size: %s', $this->text->bytes($file['size']))) ?>
<?php if (! empty($file['user_id'])): ?>
<?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?>
<?php else: ?>
<?= t('Uploaded: %s', $this->dt->datetime($file['date'])) ?>
<?php endif ?>
</div>
</div>
</div>
<?php endforeach ?>
</div>
<?php endif ?>
+15
View File
@@ -0,0 +1,15 @@
<div class="page-header">
<h2><?= t('Remove a file') ?></h2>
</div>
<div class="confirm">
<p class="alert alert-info">
<?= t('Do you really want to remove this file: "%s"?', $this->text->e($file['name'])) ?>
</p>
<?= $this->modal->confirmButtons(
'TaskFileController',
'remove',
array('task_id' => $task['id'], 'file_id' => $file['id'])
) ?>
</div>
+15
View File
@@ -0,0 +1,15 @@
<div class="page-header">
<h2><?= t('Add a screenshot') ?></h2>
</div>
<div id="screenshot-zone">
<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'])) ?>" method="post">
<?= $this->form->csrf() ?>
<?= $this->app->component('screenshot') ?>
<?= $this->modal->submitButtons() ?>
</form>
<p class="alert alert-info"><?= t('This feature does not work with all browsers.') ?></p>
+7
View File
@@ -0,0 +1,7 @@
<details class="accordion-section" <?= empty($files) && empty($images) ? '' : 'open' ?>>
<summary class="accordion-title"><?= t('Attachments') ?></summary>
<div class="accordion-content">
<?= $this->render('task_file/images', array('task' => $task, 'images' => $images)) ?>
<?= $this->render('task_file/files', array('task' => $task, 'files' => $files)) ?>
</div>
</details>