Display file size next to uploaded file names

This commit is contained in:
Giuseppe Criscione 2018-10-13 13:46:06 +02:00
parent 9933d18ab0
commit dbd131037b
4 changed files with 15 additions and 10 deletions

View File

@ -1317,7 +1317,8 @@ a.button {
.files-item-cell { .files-item-cell {
overflow: hidden; overflow: hidden;
white-space: nowrap; } white-space: nowrap;
font-size: 0.875rem; }
.files-item { .files-item {
display: table; display: table;
@ -1328,16 +1329,17 @@ a.button {
display: table-row; } display: table-row; }
.file-name { .file-name {
width: 60%;
font-size: 0.9375rem; font-size: 0.9375rem;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; } white-space: nowrap; }
.file-size {
color: #7e7e7e; }
.file-actions { .file-actions {
width: 40%; width: 20%;
text-align: right; text-align: right; }
font-size: 0.875rem; }
.file-actions button, .file-actions button,
.file-actions .button { .file-actions .button {

File diff suppressed because one or more lines are too long

View File

@ -38,6 +38,7 @@
.files-item-cell { .files-item-cell {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
font-size: 0.875rem;
} }
.files-item { .files-item {
@ -51,15 +52,17 @@
} }
.file-name { .file-name {
width: 60%;
font-size: 0.9375rem; font-size: 0.9375rem;
@include ellipsis; @include ellipsis;
} }
.file-size {
color: $color-gray-xdark;
}
.file-actions { .file-actions {
width: 40%; width: 20%;
text-align: right; text-align: right;
font-size: 0.875rem;
} }
.file-actions button, .file-actions button,

View File

@ -72,7 +72,7 @@
?> ?>
<li> <li>
<div class="files-item"> <div class="files-item">
<div class="files-item-cell file-name <?= is_null($file->type()) ? '' : 'file-type-' . $file->type() ?>"><?= $file->name() ?></div> <div class="files-item-cell file-name <?= is_null($file->type()) ? '' : 'file-type-' . $file->type() ?>" data-overflow-tooltip="true"><?= $file->name() ?> <span class="file-size">(<?= $file->size() ?>)</span></div>
<div class="files-item-cell file-actions"> <div class="files-item-cell file-actions">
<a class="button button-link" href="<?= $this->pageUri($page) . $file->name() ?>" target="_blank" title="<?= $this->label('pages.preview-file') ?>"><i class="i-eye"></i></a> <a class="button button-link" href="<?= $this->pageUri($page) . $file->name() ?>" target="_blank" title="<?= $this->label('pages.preview-file') ?>"><i class="i-eye"></i></a>
<button class="button-link" type="button" data-modal="deleteFileModal" data-modal-action="<?= $this->uri('/pages/' . trim($page->slug(), '/') . '/file/' . $file->name() . '/delete/') ?>" title="<?= $this->label('pages.delete-file') ?>"> <button class="button-link" type="button" data-modal="deleteFileModal" data-modal-action="<?= $this->uri('/pages/' . trim($page->slug(), '/') . '/file/' . $file->name() . '/delete/') ?>" title="<?= $this->label('pages.delete-file') ?>">