Updated all resource routes to follow Laravel's standard of the "id" parameter on edit/update/destroy routes being the singular of the resource #142
This commit is contained in:
parent
15cb2f40b0
commit
93c6f5da10
@ -11,7 +11,6 @@ use App\Facade\Theme;
|
|||||||
use App\Facade\UserConfig;
|
use App\Facade\UserConfig;
|
||||||
use App\Group;
|
use App\Group;
|
||||||
use App\Helpers\DbHelper;
|
use App\Helpers\DbHelper;
|
||||||
use App\Helpers\FileHelper;
|
|
||||||
use App\Helpers\MiscHelper;
|
use App\Helpers\MiscHelper;
|
||||||
use App\Helpers\PermissionsHelper;
|
use App\Helpers\PermissionsHelper;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@ -74,7 +73,7 @@ class AlbumController extends Controller
|
|||||||
|
|
||||||
if (count($photos) == 0)
|
if (count($photos) == 0)
|
||||||
{
|
{
|
||||||
return redirect(route('albums.show', ['id' => $album->id]));
|
return redirect(route('albums.show', ['album' => $album->id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Theme::render('admin.analyse_album', ['album' => $album, 'photos' => $photos, 'queue_token' => $queue_token]);
|
return Theme::render('admin.analyse_album', ['album' => $album, 'photos' => $photos, 'queue_token' => $queue_token]);
|
||||||
@ -171,7 +170,7 @@ class AlbumController extends Controller
|
|||||||
|
|
||||||
$redirect->delete();
|
$redirect->delete();
|
||||||
$request->session()->flash('success', trans('admin.delete_redirect_success_message'));
|
$request->session()->flash('success', trans('admin.delete_redirect_success_message'));
|
||||||
return redirect(route('albums.show', ['id' => $id, 'tab' => 'redirects']));
|
return redirect(route('albums.show', ['album' => $id, 'tab' => 'redirects']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -706,7 +705,7 @@ class AlbumController extends Controller
|
|||||||
$helper = new PermissionsHelper();
|
$helper = new PermissionsHelper();
|
||||||
$helper->rebuildCache();
|
$helper->rebuildCache();
|
||||||
|
|
||||||
return redirect(route('albums.show', ['id' => $album->id]));
|
return redirect(route('albums.show', ['album' => $album->id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function storeRedirect(Requests\StoreAlbumRedirectRequest $request, $id)
|
public function storeRedirect(Requests\StoreAlbumRedirectRequest $request, $id)
|
||||||
@ -721,7 +720,7 @@ class AlbumController extends Controller
|
|||||||
$redirect->save();
|
$redirect->save();
|
||||||
|
|
||||||
$request->session()->flash('success', trans('admin.create_redirect_success_message'));
|
$request->session()->flash('success', trans('admin.create_redirect_success_message'));
|
||||||
return redirect(route('albums.show', ['id' => $id, 'tab' => 'redirects']));
|
return redirect(route('albums.show', ['album' => $id, 'tab' => 'redirects']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -783,7 +782,7 @@ class AlbumController extends Controller
|
|||||||
|
|
||||||
$request->session()->flash('success', trans('admin.album_saved_successfully', ['name' => $album->name]));
|
$request->session()->flash('success', trans('admin.album_saved_successfully', ['name' => $album->name]));
|
||||||
|
|
||||||
return redirect(route('albums.show', ['id' => $id]));
|
return redirect(route('albums.show', ['album' => $id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createActivityRecord(Album $album, $type, $activityDateTime = null)
|
private function createActivityRecord(Album $album, $type, $activityDateTime = null)
|
||||||
|
@ -134,7 +134,7 @@ class PhotoCommentController extends Controller
|
|||||||
if (count($commentIDs) == 1)
|
if (count($commentIDs) == 1)
|
||||||
{
|
{
|
||||||
// Single comment selected - redirect to the single delete page
|
// Single comment selected - redirect to the single delete page
|
||||||
return redirect(route('comments.delete', ['id' => $commentIDs[0]]));
|
return redirect(route('comments.delete', ['comment' => $commentIDs[0]]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the view to confirm the delete
|
// Show the view to confirm the delete
|
||||||
@ -148,7 +148,7 @@ class PhotoCommentController extends Controller
|
|||||||
if (count($commentIDs) == 1)
|
if (count($commentIDs) == 1)
|
||||||
{
|
{
|
||||||
// Single comment selected - redirect to the single approve page
|
// Single comment selected - redirect to the single approve page
|
||||||
return redirect(route('comments.approve', ['id' => $commentIDs[0]]));
|
return redirect(route('comments.approve', ['comment' => $commentIDs[0]]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the view to confirm the approval
|
// Show the view to confirm the approval
|
||||||
@ -162,7 +162,7 @@ class PhotoCommentController extends Controller
|
|||||||
if (count($commentIDs) == 1)
|
if (count($commentIDs) == 1)
|
||||||
{
|
{
|
||||||
// Single comment selected - redirect to the single reject page
|
// Single comment selected - redirect to the single reject page
|
||||||
return redirect(route('comments.reject', ['id' => $commentIDs[0]]));
|
return redirect(route('comments.reject', ['comment' => $commentIDs[0]]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the view to confirm the rejection
|
// Show the view to confirm the rejection
|
||||||
|
@ -392,7 +392,7 @@ class PhotoController extends Controller
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
return redirect(route('albums.analyse', [
|
return redirect(route('albums.analyse', [
|
||||||
'id' => $album->id,
|
'album' => $album->id,
|
||||||
'queue_token' => $queueUid
|
'queue_token' => $queueUid
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
@ -408,7 +408,7 @@ class PhotoController extends Controller
|
|||||||
if (is_null($request->files->get('archive')))
|
if (is_null($request->files->get('archive')))
|
||||||
{
|
{
|
||||||
$request->session()->flash('error', trans('admin.upload_bulk_no_file'));
|
$request->session()->flash('error', trans('admin.upload_bulk_no_file'));
|
||||||
return redirect(route('albums.show', ['id' => $album->id]));
|
return redirect(route('albums.show', ['album' => $album->id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$archiveFile = UploadedFile::createFromBase($request->files->get('archive'));
|
$archiveFile = UploadedFile::createFromBase($request->files->get('archive'));
|
||||||
@ -416,7 +416,7 @@ class PhotoController extends Controller
|
|||||||
{
|
{
|
||||||
Log::error('Bulk image upload failed.', ['error' => $archiveFile->getError(), 'reason' => $archiveFile->getErrorMessage()]);
|
Log::error('Bulk image upload failed.', ['error' => $archiveFile->getError(), 'reason' => $archiveFile->getErrorMessage()]);
|
||||||
$request->session()->flash('error', $archiveFile->getErrorMessage());
|
$request->session()->flash('error', $archiveFile->getErrorMessage());
|
||||||
return redirect(route('albums.show', ['id' => $album->id]));
|
return redirect(route('albums.show', ['album' => $album->id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the folder to hold the analysis results if not already present
|
// Create the folder to hold the analysis results if not already present
|
||||||
@ -446,7 +446,7 @@ class PhotoController extends Controller
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
$request->session()->flash('error', sprintf('The file type "%s" is not supported for bulk uploads.', $mimeType));
|
$request->session()->flash('error', sprintf('The file type "%s" is not supported for bulk uploads.', $mimeType));
|
||||||
return redirect(route('albums.show', ['id' => $album->id]));
|
return redirect(route('albums.show', ['album' => $album->id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$di = new \RecursiveDirectoryIterator($temporaryFolder, \RecursiveDirectoryIterator::SKIP_DOTS);
|
$di = new \RecursiveDirectoryIterator($temporaryFolder, \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||||
@ -523,7 +523,7 @@ class PhotoController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return redirect(route('albums.analyse', [
|
return redirect(route('albums.analyse', [
|
||||||
'id' => $album->id,
|
'album' => $album->id,
|
||||||
'queue_token' => $queueUid
|
'queue_token' => $queueUid
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
@ -586,7 +586,7 @@ class PhotoController extends Controller
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return redirect(route('albums.show', array('id' => $albumId, 'page' => $request->get('page', 1))));
|
return redirect(route('albums.show', array('album' => $albumId, 'page' => $request->get('page', 1))));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function applyBulkActions(Request $request, Album $album)
|
private function applyBulkActions(Request $request, Album $album)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ route('albums.index') }}">@lang('navigation.breadcrumb.albums')</a></li>
|
<li class="breadcrumb-item"><a href="{{ route('albums.index') }}">@lang('navigation.breadcrumb.albums')</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{ route('albums.show', ['id' => $album->id]) }}">{{ $album->name }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ route('albums.show', ['album' => $album->id]) }}">{{ $album->name }}</a></li>
|
||||||
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.metadata_upgrade')</li>
|
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.metadata_upgrade')</li>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<p class="text-danger"><b>@lang('admin.metadata_upgrade.warning')</b></p>
|
<p class="text-danger"><b>@lang('admin.metadata_upgrade.warning')</b></p>
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<a href="{{ route('admin.metadataUpgrade', ['id' => $album->id]) }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
<a href="{{ route('admin.metadataUpgrade', ['album' => $album->id]) }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
||||||
<button id="submit-button" type="submit" class="btn btn-primary"><i class="fa fa-fw fa-check"></i> @lang('forms.continue_action')</button>
|
<button id="submit-button" type="submit" class="btn btn-primary"><i class="fa fa-fw fa-check"></i> @lang('forms.continue_action')</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
app.analyseImage(new AnalyseImageViewModel({
|
app.analyseImage(new AnalyseImageViewModel({
|
||||||
'id': '{{ $photo->id }}',
|
'id': '{{ $photo->id }}',
|
||||||
'name': '{!! addslashes($photo->name) !!}',
|
'name': '{!! addslashes($photo->name) !!}',
|
||||||
'url': '{{ route('photos.re-analyse', ['id' => $photo->id, 'queue_token' => $queue_token]) }}'
|
'url': '{{ route('photos.re-analyse', ['photo' => $photo->id, 'queue_token' => $queue_token]) }}'
|
||||||
}));
|
}));
|
||||||
@endforeach
|
@endforeach
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<a class="btn btn-link" href="{{ $album->url() }}">View album</a>
|
<a class="btn btn-link" href="{{ $album->url() }}">View album</a>
|
||||||
<a class="btn btn-primary" href="{{ route('albums.show', ['id' => $album->id]) }}"><i class="fa fa-fw fa-chevron-left"></i> Back to album settings</a>
|
<a class="btn btn-primary" href="{{ route('albums.show', ['album' => $album->id]) }}"><i class="fa fa-fw fa-chevron-left"></i> Back to album settings</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
app.analyseImage(new AnalyseImageViewModel({
|
app.analyseImage(new AnalyseImageViewModel({
|
||||||
'id': '{{ $photo->id }}',
|
'id': '{{ $photo->id }}',
|
||||||
'name': '{!! addslashes($photo->name) !!}',
|
'name': '{!! addslashes($photo->name) !!}',
|
||||||
'url': '{{ route('photos.analyse', ['id' => $photo->id, 'queue_token' => $queue_token]) }}'
|
'url': '{{ route('photos.analyse', ['photo' => $photo->id, 'queue_token' => $queue_token]) }}'
|
||||||
}));
|
}));
|
||||||
@endforeach
|
@endforeach
|
||||||
</script>
|
</script>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<form action="{{ route('albums.destroy', [$album->id]) }}" method="POST">
|
<form action="{{ route('albums.destroy', [$album->id]) }}" method="POST">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
{{ method_field('DELETE') }}
|
{{ method_field('DELETE') }}
|
||||||
<a href="{{ route('albums.show', ['id' => $album->id]) }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
<a href="{{ route('albums.show', ['album' => $album->id]) }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
||||||
<button type="submit" class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> @lang('forms.delete_action')</button>
|
<button type="submit" class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> @lang('forms.delete_action')</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<a href="{{ route('albums.show', ['id' => $album->id]) }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
<a href="{{ route('albums.show', ['album' => $album->id]) }}" class="btn btn-link">@lang('forms.cancel_action')</a>
|
||||||
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.save_action')</button>
|
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.save_action')</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
{{-- TODO: edit comments <a href="{{ route('comments.edit', ['id' => $comment->id]) }}"><span style="font-size: 1.3em;">{{ $comment->name }}</span></a> --}}
|
{{-- TODO: edit comments <a href="{{ route('comments.edit', ['comment' => $comment->id]) }}"><span style="font-size: 1.3em;">{{ $comment->name }}</span></a> --}}
|
||||||
<span style="font-size: 1.3em;">{{ $comment->name }}</span>
|
<span style="font-size: 1.3em;">{{ $comment->name }}</span>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
@ -67,16 +67,16 @@
|
|||||||
<div class="btn-toolbar pull-right">
|
<div class="btn-toolbar pull-right">
|
||||||
<div class="btn-group mr-2">
|
<div class="btn-group mr-2">
|
||||||
@if (!$comment->isModerated())
|
@if (!$comment->isModerated())
|
||||||
<a href="{{ route('comments.approve', ['id' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.approve_action')</a>
|
<a href="{{ route('comments.approve', ['comment' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.approve_action')</a>
|
||||||
<a href="{{ route('comments.reject', ['id' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.reject_action')</a>
|
<a href="{{ route('comments.reject', ['comment' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.reject_action')</a>
|
||||||
@elseif ($comment->isApproved())
|
@elseif ($comment->isApproved())
|
||||||
<a href="{{ route('comments.reject', ['id' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.reject_action')</a>
|
<a href="{{ route('comments.reject', ['comment' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.reject_action')</a>
|
||||||
@elseif ($comment->isRejected())
|
@elseif ($comment->isRejected())
|
||||||
<a href="{{ route('comments.approve', ['id' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.approve_action')</a>
|
<a href="{{ route('comments.approve', ['comment' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.approve_action')</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="{{ route('comments.delete', ['id' => $comment->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
<a href="{{ route('comments.delete', ['comment' => $comment->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -30,11 +30,11 @@
|
|||||||
@foreach ($groups as $group)
|
@foreach ($groups as $group)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ route('groups.edit', ['id' => $group->id]) }}"><span style="font-size: 1.3em;">{{ $group->name }}</span></a><br/>
|
<a href="{{ route('groups.edit', ['group' => $group->id]) }}"><span style="font-size: 1.3em;">{{ $group->name }}</span></a><br/>
|
||||||
<span class="{{ $group->users()->count() == 0 ? "text-danger" : "text-success" }}">{{ trans_choice('admin.group_number_users', $group->users()->count()) }}</span>
|
<span class="{{ $group->users()->count() == 0 ? "text-danger" : "text-success" }}">{{ trans_choice('admin.group_number_users', $group->users()->count()) }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<a href="{{ route('groups.delete', ['id' => $group->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
<a href="{{ route('groups.delete', ['group' => $group->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span style="font-size: 1.3em;">
|
<span style="font-size: 1.3em;">
|
||||||
<a href="{{ route('storage.edit', ['id' => $storage->id]) }}">{{ $storage->name }}</a>
|
<a href="{{ route('storage.edit', ['storage' => $storage->id]) }}">{{ $storage->name }}</a>
|
||||||
@if ($storage->is_default) <i class="fa fa-fw fa-check text-success"></i>@endif
|
@if ($storage->is_default) <i class="fa fa-fw fa-check text-success"></i>@endif
|
||||||
@if (!$storage->is_active) <i class="fa fa-fw fa-minus-circle text-danger"></i>@endif
|
@if (!$storage->is_active) <i class="fa fa-fw fa-minus-circle text-danger"></i>@endif
|
||||||
</span><br/>
|
</span><br/>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
@if (!$storage->is_internal)
|
@if (!$storage->is_internal)
|
||||||
<a href="{{ route('storage.delete', ['id' => $storage->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
<a href="{{ route('storage.delete', ['storage' => $storage->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
@foreach ($users as $user)
|
@foreach ($users as $user)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span style="font-size: 1.3em;"><a href="{{ route('users.edit', ['id' => $user->id]) }}">{{ $user->name }}</a>@if ($user->is_admin) <i class="fa fa-fw fa-cog"></i>@endif</span><br/>
|
<span style="font-size: 1.3em;"><a href="{{ route('users.edit', ['user' => $user->id]) }}">{{ $user->name }}</a>@if ($user->is_admin) <i class="fa fa-fw fa-cog"></i>@endif</span><br/>
|
||||||
{{ $user->email }} <a href="mailto:{{ $user->email }}"><i class="fa fa-fw fa-mail-forward"></i></a>
|
{{ $user->email }} <a href="mailto:{{ $user->email }}"><i class="fa fa-fw fa-mail-forward"></i></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<a href="{{ route('users.delete', ['id' => $user->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
<a href="{{ route('users.delete', ['user' => $user->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
@if ($parentAlbum->id == $album->id)
|
@if ($parentAlbum->id == $album->id)
|
||||||
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
||||||
@else
|
@else
|
||||||
<li class="breadcrumb-item"><a href="{{ route('albums.show', ['id' => $parentAlbum->id]) }}">{{ $parentAlbum->name }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ route('albums.show', ['album' => $parentAlbum->id]) }}">{{ $parentAlbum->name }}</a></li>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endsection
|
@endsection
|
||||||
@ -97,12 +97,12 @@
|
|||||||
language.upload_status = '{!! addslashes(trans('admin.upload_file_status_progress')) !!}';
|
language.upload_status = '{!! addslashes(trans('admin.upload_file_status_progress')) !!}';
|
||||||
|
|
||||||
var urls = [];
|
var urls = [];
|
||||||
urls.analyse = '{{ route('albums.analyse', ['id' => $album->id, 'queue_token' => $queue_token]) }}';
|
urls.analyse = '{{ route('albums.analyse', ['album' => $album->id, 'queue_token' => $queue_token]) }}';
|
||||||
urls.delete_photo = '{{ route('photos.destroy', ['id' => 0]) }}';
|
urls.delete_photo = '{{ route('photos.destroy', ['photo' => 0]) }}';
|
||||||
urls.flip_photo = '{{ route('photos.flip', ['id' => 0, 'horizontal' => -1, 'vertical' => -2]) }}';
|
urls.flip_photo = '{{ route('photos.flip', ['photo' => 0, 'horizontal' => -1, 'vertical' => -2]) }}';
|
||||||
urls.move_photo = '{{ route('photos.move', ['photoId' => 0]) }}';
|
urls.move_photo = '{{ route('photos.move', ['photo' => 0]) }}';
|
||||||
urls.regenerate_thumbnails = '{{ route('photos.regenerateThumbnails', ['photoId' => 0]) }}';
|
urls.regenerate_thumbnails = '{{ route('photos.regenerateThumbnails', ['photo' => 0]) }}';
|
||||||
urls.rotate_photo = '{{ route('photos.rotate', ['id' => 0, 'angle' => 1]) }}';
|
urls.rotate_photo = '{{ route('photos.rotate', ['photo' => 0, 'angle' => 1]) }}';
|
||||||
|
|
||||||
var viewModel = new UploadPhotosViewModel('{{ $album->id }}', '{{ $queue_token }}', language, urls);
|
var viewModel = new UploadPhotosViewModel('{{ $album->id }}', '{{ $queue_token }}', language, urls);
|
||||||
var editViewModel = new EditPhotosViewModel('{{ $album->id }}', language, urls);
|
var editViewModel = new EditPhotosViewModel('{{ $album->id }}', language, urls);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@can('edit', $album)
|
@can('edit', $album)
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a class="btn btn-secondary" href="{{ route('albums.show', ['id' => $album->id]) }}"><i class="fa fa-fw fa-eye"></i> @lang('gallery.manage_album_link_2')</a>
|
<a class="btn btn-secondary" href="{{ route('albums.show', ['album' => $album->id]) }}"><i class="fa fa-fw fa-eye"></i> @lang('gallery.manage_album_link_2')</a>
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a class="btn btn-secondary" href="{{ route('albums.show', ['id' => $album->id]) }}"><i class="fa fa-fw fa-eye"></i> @lang('gallery.manage_album_link_2')</a>
|
<a class="btn btn-secondary" href="{{ route('albums.show', ['album' => $album->id]) }}"><i class="fa fa-fw fa-eye"></i> @lang('gallery.manage_album_link_2')</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@can('edit', $album)
|
@can('edit', $album)
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a class="btn btn-secondary" href="{{ route('albums.show', ['id' => $album->id]) }}"><i class="fa fa-fw fa-eye"></i> @lang('gallery.manage_album_link_2')</a>
|
<a class="btn btn-secondary" href="{{ route('albums.show', ['album' => $album->id]) }}"><i class="fa fa-fw fa-eye"></i> @lang('gallery.manage_album_link_2')</a>
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<p class="card-text">{!! nl2br(e($album->description)) !!}</p>
|
<p class="card-text">{!! nl2br(e($album->description)) !!}</p>
|
||||||
|
|
||||||
@can('edit', $album)
|
@can('edit', $album)
|
||||||
<a href="{{ route('albums.show', ['id' => $album->id]) }}" class="card-link">@lang('gallery.manage_album_link')</a>
|
<a href="{{ route('albums.show', ['album' => $album->id]) }}" class="card-link">@lang('gallery.manage_album_link')</a>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
@foreach ($album->albumParentTree() as $parentAlbum)
|
@foreach ($album->albumParentTree() as $parentAlbum)
|
||||||
@if ($parentAlbum->id == $album->id)
|
@if ($parentAlbum->id == $album->id)
|
||||||
@if (!empty($show_current_link) && $show_current_link)
|
@if (!empty($show_current_link) && $show_current_link)
|
||||||
<li class="breadcrumb-item active"><a href="{{ route('albums.show', ['id' => $album->id]) }}">{{ $album->name }}</a></li>
|
<li class="breadcrumb-item active"><a href="{{ route('albums.show', ['album' => $album->id]) }}">{{ $album->name }}</a></li>
|
||||||
@else
|
@else
|
||||||
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<li class="breadcrumb-item"><a href="{{ route('albums.show', ['id' => $parentAlbum->id]) }}">{{ $parentAlbum->name }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ route('albums.show', ['album' => $parentAlbum->id]) }}">{{ $parentAlbum->name }}</a></li>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
@ -32,7 +32,7 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
<h5 style="font-weight: bold;">@lang('admin.security_groups_heading')</h5>
|
<h5 style="font-weight: bold;">@lang('admin.security_groups_heading')</h5>
|
||||||
|
|
||||||
<form action="{{ route('albums.set_group_permissions', ['id' => $album->id]) }}" method="post">
|
<form action="{{ route('albums.set_group_permissions', ['album' => $album->id]) }}" method="post">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
|
||||||
@if (count($existing_groups) > 0)
|
@if (count($existing_groups) > 0)
|
||||||
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<h5 style="font-weight: bold;">@lang('admin.security_users_heading')</h5>
|
<h5 style="font-weight: bold;">@lang('admin.security_users_heading')</h5>
|
||||||
|
|
||||||
<form action="{{ route('albums.set_user_permissions', ['id' => $album->id]) }}" method="post">
|
<form action="{{ route('albums.set_user_permissions', ['album' => $album->id]) }}" method="post">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
|
|
||||||
<div id="users-accordion" role="tablist" aria-multiselectable="true">
|
<div id="users-accordion" role="tablist" aria-multiselectable="true">
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<div class="card-body bg-light">
|
<div class="card-body bg-light">
|
||||||
<p class="text-danger">@lang('admin.danger_zone_intro')</p>
|
<p class="text-danger">@lang('admin.danger_zone_intro')</p>
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ route('albums.delete', ['id' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
<a href="{{ route('albums.delete', ['album' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" v-if="!isUploadInProgress">
|
<div class="modal-footer" v-if="!isUploadInProgress">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-if="imagesUploaded === 0">@lang('forms.close_action')</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-if="imagesUploaded === 0">@lang('forms.close_action')</button>
|
||||||
<a href="{{ route('albums.analyse', ['id' => $album->id, 'queue_token' => $queue_token]) }}" class="btn btn-primary" v-if="imagesUploaded > 0">@lang('forms.continue_action')</a>
|
<a href="{{ route('albums.analyse', ['album' => $album->id, 'queue_token' => $queue_token]) }}" class="btn btn-primary" v-if="imagesUploaded > 0">@lang('forms.continue_action')</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span style="font-size: 1.3em;">
|
<span style="font-size: 1.3em;">
|
||||||
@can('edit', $album)
|
@can('edit', $album)
|
||||||
<a href="{{ route('albums.show', ['id' => $album->id]) }}">{{ $album->name }}</a>
|
<a href="{{ route('albums.show', ['album' => $album->id]) }}">{{ $album->name }}</a>
|
||||||
@endcan
|
@endcan
|
||||||
@cannot('edit', $album)
|
@cannot('edit', $album)
|
||||||
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@if ($album->min_metadata_version < $current_metadata_version)
|
@if ($album->min_metadata_version < $current_metadata_version)
|
||||||
<a href="{{ route('albums.metadata', ['id' => $album->id]) }}" class="btn btn-primary">@lang('admin.metadata_upgrade.upgrade_button')</a>
|
<a href="{{ route('albums.metadata', ['album' => $album->id]) }}" class="btn btn-primary">@lang('admin.metadata_upgrade.upgrade_button')</a>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span style="font-size: 1.3em;">
|
<span style="font-size: 1.3em;">
|
||||||
@can('edit', $album)
|
@can('edit', $album)
|
||||||
<a href="{{ route('albums.show', ['id' => $album->id]) }}">{{ $album->name }}</a>
|
<a href="{{ route('albums.show', ['album' => $album->id]) }}">{{ $album->name }}</a>
|
||||||
@endcan
|
@endcan
|
||||||
@cannot('edit', $album)
|
@cannot('edit', $album)
|
||||||
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
||||||
@ -24,10 +24,10 @@
|
|||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@can('edit', $album)
|
@can('edit', $album)
|
||||||
<a href="{{ route('albums.edit', ['id' => $album->id]) }}" class="btn btn-secondary">@lang('forms.edit_action')</a>
|
<a href="{{ route('albums.edit', ['album' => $album->id]) }}" class="btn btn-secondary">@lang('forms.edit_action')</a>
|
||||||
@endcan
|
@endcan
|
||||||
@can('delete', $album)
|
@can('delete', $album)
|
||||||
<a href="{{ route('albums.delete', ['id' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
<a href="{{ route('albums.delete', ['album' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -30,51 +30,51 @@ Route::group(['prefix' => 'admin'], function () {
|
|||||||
Route::get('albums/default-permissions', 'Admin\AlbumController@defaultPermissions')->name('albums.defaultPermissions');
|
Route::get('albums/default-permissions', 'Admin\AlbumController@defaultPermissions')->name('albums.defaultPermissions');
|
||||||
Route::post('albums/set-default-group-permissions', 'Admin\AlbumController@setDefaultGroupPermissions')->name('albums.set_default_group_permissions');
|
Route::post('albums/set-default-group-permissions', 'Admin\AlbumController@setDefaultGroupPermissions')->name('albums.set_default_group_permissions');
|
||||||
Route::post('albums/set-default-user-permissions', 'Admin\AlbumController@setDefaultUserPermissions')->name('albums.set_default_user_permissions');
|
Route::post('albums/set-default-user-permissions', 'Admin\AlbumController@setDefaultUserPermissions')->name('albums.set_default_user_permissions');
|
||||||
Route::get('albums/{id}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
|
Route::get('albums/{album}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
|
||||||
Route::get('albums/{id}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
Route::get('albums/{album}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
||||||
Route::get('/albums/{id}/metadata', 'Admin\AlbumController@metadata')->name('albums.metadata');
|
Route::get('/albums/{album}/metadata', 'Admin\AlbumController@metadata')->name('albums.metadata');
|
||||||
Route::post('albums/{id}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
|
Route::post('albums/{album}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
|
||||||
Route::post('albums/{id}/set-user-permissions', 'Admin\AlbumController@setUserPermissions')->name('albums.set_user_permissions');
|
Route::post('albums/{album}/set-user-permissions', 'Admin\AlbumController@setUserPermissions')->name('albums.set_user_permissions');
|
||||||
Route::delete('albums/{id}/delete-redirect/{redirectId}', 'Admin\AlbumController@deleteRedirect')->name('albums.delete_redirect');
|
Route::delete('albums/{album}/delete-redirect/{redirectId}', 'Admin\AlbumController@deleteRedirect')->name('albums.delete_redirect');
|
||||||
Route::post('albums/{id}/store-redirect', 'Admin\AlbumController@storeRedirect')->name('albums.store_redirect');
|
Route::post('albums/{album}/store-redirect', 'Admin\AlbumController@storeRedirect')->name('albums.store_redirect');
|
||||||
Route::resource('albums', 'Admin\AlbumController');
|
Route::resource('albums', 'Admin\AlbumController');
|
||||||
|
|
||||||
// Photo management
|
// Photo management
|
||||||
Route::post('photos/analyse/{id}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
Route::post('photos/analyse/{photo}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
||||||
Route::post('photos/flip/{photoId}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
Route::post('photos/flip/{photo}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
||||||
Route::post('photos/move/{photoId}', 'Admin\PhotoController@move')->name('photos.move');
|
Route::post('photos/move/{photo}', 'Admin\PhotoController@move')->name('photos.move');
|
||||||
Route::post('photos/reanalyse/{id}/{queue_token}', 'Admin\PhotoController@reAnalyse')->name('photos.re-analyse');
|
Route::post('photos/reanalyse/{photo}/{queue_token}', 'Admin\PhotoController@reAnalyse')->name('photos.re-analyse');
|
||||||
Route::post('photos/regenerate-thumbnails/{photoId}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
Route::post('photos/regenerate-thumbnails/{photo}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
||||||
Route::post('photos/rotate/{photoId}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
Route::post('photos/rotate/{photo}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
||||||
Route::post('photos/store-bulk', 'Admin\PhotoController@storeBulk')->name('photos.storeBulk');
|
Route::post('photos/store-bulk', 'Admin\PhotoController@storeBulk')->name('photos.storeBulk');
|
||||||
Route::put('photos/update-bulk/{albumId}', 'Admin\PhotoController@updateBulk')->name('photos.updateBulk');
|
Route::put('photos/update-bulk/{photo}', 'Admin\PhotoController@updateBulk')->name('photos.updateBulk');
|
||||||
Route::resource('photos', 'Admin\PhotoController');
|
Route::resource('photos', 'Admin\PhotoController');
|
||||||
|
|
||||||
// Label management
|
// Label management
|
||||||
Route::get('labels/{id}/delete', 'Admin\LabelController@delete')->name('labels.delete');
|
Route::get('labels/{label}/delete', 'Admin\LabelController@delete')->name('labels.delete');
|
||||||
Route::resource('labels', 'Admin\LabelController');
|
Route::resource('labels', 'Admin\LabelController');
|
||||||
|
|
||||||
// Storage management
|
// Storage management
|
||||||
Route::get('storage/{id}/delete', 'Admin\StorageController@delete')->name('storage.delete');
|
Route::get('storage/{storage}/delete', 'Admin\StorageController@delete')->name('storage.delete');
|
||||||
Route::resource('storage', 'Admin\StorageController');
|
Route::resource('storage', 'Admin\StorageController');
|
||||||
|
|
||||||
// User management
|
// User management
|
||||||
Route::get('users/{id}/delete', 'Admin\UserController@delete')->name('users.delete');
|
Route::get('users/{user}/delete', 'Admin\UserController@delete')->name('users.delete');
|
||||||
Route::get('users.json', 'Admin\UserController@searchJson')->name('users.searchJson');
|
Route::get('users.json', 'Admin\UserController@searchJson')->name('users.searchJson');
|
||||||
Route::resource('users', 'Admin\UserController');
|
Route::resource('users', 'Admin\UserController');
|
||||||
|
|
||||||
// Group management
|
// Group management
|
||||||
Route::get('groups/{id}/delete', 'Admin\GroupController@delete')->name('groups.delete');
|
Route::get('groups/{group}/delete', 'Admin\GroupController@delete')->name('groups.delete');
|
||||||
Route::resource('groups', 'Admin\GroupController');
|
Route::resource('groups', 'Admin\GroupController');
|
||||||
|
|
||||||
// Comments management
|
// Comments management
|
||||||
Route::get('comments/{id}/approve', 'Admin\PhotoCommentController@approve')->name('comments.approve');
|
Route::get('comments/{comment}/approve', 'Admin\PhotoCommentController@approve')->name('comments.approve');
|
||||||
Route::post('comments/{id}/approve', 'Admin\PhotoCommentController@confirmApprove')->name('comments.confirmApprove');
|
Route::post('comments/{comment}/approve', 'Admin\PhotoCommentController@confirmApprove')->name('comments.confirmApprove');
|
||||||
|
|
||||||
Route::get('comments/{id}/reject', 'Admin\PhotoCommentController@reject')->name('comments.reject');
|
Route::get('comments/{comment}/reject', 'Admin\PhotoCommentController@reject')->name('comments.reject');
|
||||||
Route::post('comments/{id}/reject', 'Admin\PhotoCommentController@confirmReject')->name('comments.confirmReject');
|
Route::post('comments/{comment}/reject', 'Admin\PhotoCommentController@confirmReject')->name('comments.confirmReject');
|
||||||
|
|
||||||
Route::get('comments/{id}/delete', 'Admin\PhotoCommentController@delete')->name('comments.delete');
|
Route::get('comments/{comment}/delete', 'Admin\PhotoCommentController@delete')->name('comments.delete');
|
||||||
|
|
||||||
Route::post('comments/apply-bulk-action', 'Admin\PhotoCommentController@applyBulkAction')->name('comments.applyBulkAction');
|
Route::post('comments/apply-bulk-action', 'Admin\PhotoCommentController@applyBulkAction')->name('comments.applyBulkAction');
|
||||||
Route::post('comments/bulk-action', 'Admin\PhotoCommentController@bulkAction')->name('comments.bulkAction');
|
Route::post('comments/bulk-action', 'Admin\PhotoCommentController@bulkAction')->name('comments.bulkAction');
|
||||||
|
Loading…
Reference in New Issue
Block a user