1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/app/Template/project_overview/files.php
2016-04-27 20:50:42 +02:00

47 lines
2.3 KiB
PHP

<?php if (! empty($files)): ?>
<table class="table-stripped">
<tr>
<th><?= t('Filename') ?></th>
<th><?= t('Creator') ?></th>
<th><?= t('Date') ?></th>
<th><?= t('Size') ?></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>
<i class="fa fa-eye fa-fw"></i>
<?= $this->url->link(t('View file'), 'FileViewer', 'show', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
</li>
<?php endif ?>
<li>
<i class="fa fa-download fa-fw"></i>
<?= $this->url->link(t('Download'), 'FileViewer', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('ProjectFile', 'remove', $project['id'])): ?>
<li>
<i class="fa fa-trash fa-fw"></i>
<?= $this->url->link(t('Remove'), 'ProjectFile', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
</li>
<?php endif ?>
</ul>
</div>
</td>
<td>
<?= $this->text->e($file['user_name'] ?: $file['username']) ?>
</td>
<td>
<?= $this->dt->date($file['date']) ?>
</td>
<td>
<?= $this->text->bytes($file['size']) ?>
</td>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>