* Fix #226

* Fix indentation

* Fix indentation

* Owner visibility
This commit is contained in:
Pietro Marangon 2020-10-16 23:10:00 +02:00 committed by GitHub
parent 30c83811b9
commit dbd40f6210
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 10 deletions

View file

@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Added
- OpenGraph image tag #269
- Table view for users #226
## [3.2.0] - 2020-09-05
### Added

View file

@ -67,7 +67,7 @@ class DashboardController extends Controller
return view()->render(
$response,
($this->session->get('admin', false) && $this->session->get('gallery_view', true)) ? 'dashboard/list.twig' : 'dashboard/grid.twig',
($this->session->get('gallery_view', true)) ? 'dashboard/list.twig' : 'dashboard/grid.twig',
[
'medias' => $query->getMedia(),
'next' => $page < floor($query->getPages()),

View file

@ -23,10 +23,9 @@ $app->group('', function (RouteCollectorProxy $group) {
$group->get('/home[/page/{page}]', [DashboardController::class, 'home'])->setName('home');
$group->get('/upload', [UploadController::class, 'uploadWebPage'])->setName('upload.web.show');
$group->post('/upload/web', [UploadController::class, 'uploadWeb'])->setName('upload.web');
$group->get('/home/switchView', [DashboardController::class, 'switchView'])->setName('switchView');
$group->group('', function (RouteCollectorProxy $group) {
$group->get('/home/switchView', [DashboardController::class, 'switchView'])->setName('switchView');
$group->get('/system/deleteOrphanFiles', [AdminController::class, 'deleteOrphanFiles'])->setName('system.deleteOrphanFiles');
$group->get('/system/recalculateUserQuota', [AdminController::class, 'recalculateUserQuota'])->setName('system.recalculateUserQuota');

View file

@ -43,10 +43,10 @@
</div>
</a>
{% endif %}
{% if session.get('admin') %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('switchView') }}"><i class="fas fa-fw fa-sync"></i> {{ lang('switch_to') }}: {{ session.get('gallery_view') is null or session.get('gallery_view') ? lang('gallery') : lang('table') }}</a>
{% endif %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('switchView') }}"><i class="fas fa-fw fa-sync"></i> {{ lang('switch_to') }}: {{ session.get('gallery_view') is null or session.get('gallery_view') ? lang('gallery') : lang('table') }}</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('profile') }}"><i class="fas fa-fw fa-user"></i> {{ lang('profile') }}</a>
<a class="dropdown-item" href="{{ route('logout') }}"><i class="fas fa-fw fa-sign-out-alt"></i> {{ lang('logout') }}</a>

View file

@ -21,7 +21,9 @@
<th>{{ lang('filename') }}</th>
<th>{{ lang('size') }}</th>
<th>{{ lang('public') }}</th>
<th>{{ lang('owner') }}</th>
{% if session.get('admin') %}
<th>{{ lang('owner') }}</th>
{% endif %}
<th>{{ lang('date') }}</th>
<th></th>
</tr>
@ -57,7 +59,9 @@
<span class="badge badge-danger"><i class="fas fa-times"></i></span>
{% endif %}
</td>
<td>{{ media.username|default('<None>') }}</td>
{% if session.get('admin') %}
<td>{{ media.username|default('<None>') }}</td>
{% endif %}
<td>{{ media.timestamp|date("d/m/Y H:i:s") }}</td>
<td class="text-right">
<div class="btn-group">