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\Group;
|
||||
use App\Helpers\DbHelper;
|
||||
use App\Helpers\FileHelper;
|
||||
use App\Helpers\MiscHelper;
|
||||
use App\Helpers\PermissionsHelper;
|
||||
use App\Http\Controllers\Controller;
|
||||
@ -74,7 +73,7 @@ class AlbumController extends Controller
|
||||
|
||||
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]);
|
||||
@ -171,7 +170,7 @@ class AlbumController extends Controller
|
||||
|
||||
$redirect->delete();
|
||||
$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->rebuildCache();
|
||||
|
||||
return redirect(route('albums.show', ['id' => $album->id]));
|
||||
return redirect(route('albums.show', ['album' => $album->id]));
|
||||
}
|
||||
|
||||
public function storeRedirect(Requests\StoreAlbumRedirectRequest $request, $id)
|
||||
@ -721,7 +720,7 @@ class AlbumController extends Controller
|
||||
$redirect->save();
|
||||
|
||||
$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]));
|
||||
|
||||
return redirect(route('albums.show', ['id' => $id]));
|
||||
return redirect(route('albums.show', ['album' => $id]));
|
||||
}
|
||||
|
||||
private function createActivityRecord(Album $album, $type, $activityDateTime = null)
|
||||
|
@ -134,7 +134,7 @@ class PhotoCommentController extends Controller
|
||||
if (count($commentIDs) == 1)
|
||||
{
|
||||
// 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
|
||||
@ -148,7 +148,7 @@ class PhotoCommentController extends Controller
|
||||
if (count($commentIDs) == 1)
|
||||
{
|
||||
// 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
|
||||
@ -162,7 +162,7 @@ class PhotoCommentController extends Controller
|
||||
if (count($commentIDs) == 1)
|
||||
{
|
||||
// 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
|
||||
|
@ -392,7 +392,7 @@ class PhotoController extends Controller
|
||||
else
|
||||
{
|
||||
return redirect(route('albums.analyse', [
|
||||
'id' => $album->id,
|
||||
'album' => $album->id,
|
||||
'queue_token' => $queueUid
|
||||
]));
|
||||
}
|
||||
@ -408,7 +408,7 @@ class PhotoController extends Controller
|
||||
if (is_null($request->files->get('archive')))
|
||||
{
|
||||
$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'));
|
||||
@ -416,7 +416,7 @@ class PhotoController extends Controller
|
||||
{
|
||||
Log::error('Bulk image upload failed.', ['error' => $archiveFile->getError(), 'reason' => $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
|
||||
@ -446,7 +446,7 @@ class PhotoController extends Controller
|
||||
|
||||
default:
|
||||
$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);
|
||||
@ -523,7 +523,7 @@ class PhotoController extends Controller
|
||||
}
|
||||
|
||||
return redirect(route('albums.analyse', [
|
||||
'id' => $album->id,
|
||||
'album' => $album->id,
|
||||
'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)
|
||||
|
@ -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('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.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>
|
||||
@endsection
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
<p class="text-danger"><b>@lang('admin.metadata_upgrade.warning')</b></p>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -97,7 +97,7 @@
|
||||
app.analyseImage(new AnalyseImageViewModel({
|
||||
'id': '{{ $photo->id }}',
|
||||
'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
|
||||
});
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
<div class="text-right">
|
||||
<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>
|
||||
@ -69,7 +69,7 @@
|
||||
app.analyseImage(new AnalyseImageViewModel({
|
||||
'id': '{{ $photo->id }}',
|
||||
'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
|
||||
</script>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<form action="{{ route('albums.destroy', [$album->id]) }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
{{ 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>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -45,7 +45,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
|
||||
<br/>
|
||||
@ -67,16 +67,16 @@
|
||||
<div class="btn-toolbar pull-right">
|
||||
<div class="btn-group mr-2">
|
||||
@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.reject', ['id' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.reject_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', ['comment' => $comment->id]) }}" class="btn btn-outline-info">@lang('forms.reject_action')</a>
|
||||
@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())
|
||||
<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
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -30,11 +30,11 @@
|
||||
@foreach ($groups as $group)
|
||||
<tr>
|
||||
<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>
|
||||
</td>
|
||||
<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>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
@ -32,7 +32,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<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_active) <i class="fa fa-fw fa-minus-circle text-danger"></i>@endif
|
||||
</span><br/>
|
||||
@ -45,7 +45,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@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
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -21,7 +21,7 @@
|
||||
@foreach ($users as $user)
|
||||
<tr>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
@ -30,7 +30,7 @@
|
||||
@endif
|
||||
</td>
|
||||
<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>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
@ -9,7 +9,7 @@
|
||||
@if ($parentAlbum->id == $album->id)
|
||||
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
||||
@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
|
||||
@endforeach
|
||||
@endsection
|
||||
@ -97,12 +97,12 @@
|
||||
language.upload_status = '{!! addslashes(trans('admin.upload_file_status_progress')) !!}';
|
||||
|
||||
var urls = [];
|
||||
urls.analyse = '{{ route('albums.analyse', ['id' => $album->id, 'queue_token' => $queue_token]) }}';
|
||||
urls.delete_photo = '{{ route('photos.destroy', ['id' => 0]) }}';
|
||||
urls.flip_photo = '{{ route('photos.flip', ['id' => 0, 'horizontal' => -1, 'vertical' => -2]) }}';
|
||||
urls.move_photo = '{{ route('photos.move', ['photoId' => 0]) }}';
|
||||
urls.regenerate_thumbnails = '{{ route('photos.regenerateThumbnails', ['photoId' => 0]) }}';
|
||||
urls.rotate_photo = '{{ route('photos.rotate', ['id' => 0, 'angle' => 1]) }}';
|
||||
urls.analyse = '{{ route('albums.analyse', ['album' => $album->id, 'queue_token' => $queue_token]) }}';
|
||||
urls.delete_photo = '{{ route('photos.destroy', ['photo' => 0]) }}';
|
||||
urls.flip_photo = '{{ route('photos.flip', ['photo' => 0, 'horizontal' => -1, 'vertical' => -2]) }}';
|
||||
urls.move_photo = '{{ route('photos.move', ['photo' => 0]) }}';
|
||||
urls.regenerate_thumbnails = '{{ route('photos.regenerateThumbnails', ['photo' => 0]) }}';
|
||||
urls.rotate_photo = '{{ route('photos.rotate', ['photo' => 0, 'angle' => 1]) }}';
|
||||
|
||||
var viewModel = new UploadPhotosViewModel('{{ $album->id }}', '{{ $queue_token }}', language, urls);
|
||||
var editViewModel = new EditPhotosViewModel('{{ $album->id }}', language, urls);
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="pull-right">
|
||||
@can('edit', $album)
|
||||
<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>
|
||||
@endcan
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<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>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="pull-right">
|
||||
@can('edit', $album)
|
||||
<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>
|
||||
@endcan
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<p class="card-text">{!! nl2br(e($album->description)) !!}</p>
|
||||
|
||||
@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
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
|
@ -1,11 +1,11 @@
|
||||
@foreach ($album->albumParentTree() as $parentAlbum)
|
||||
@if ($parentAlbum->id == $album->id)
|
||||
@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
|
||||
<li class="breadcrumb-item active">{{ $album->name }}</li>
|
||||
@endif
|
||||
@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
|
||||
@endforeach
|
@ -32,7 +32,7 @@
|
||||
<hr/>
|
||||
<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() }}
|
||||
|
||||
@if (count($existing_groups) > 0)
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
<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() }}
|
||||
|
||||
<div id="users-accordion" role="tablist" aria-multiselectable="true">
|
||||
|
@ -65,7 +65,7 @@
|
||||
<div class="card-body bg-light">
|
||||
<p class="text-danger">@lang('admin.danger_zone_intro')</p>
|
||||
<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>
|
||||
|
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<td>
|
||||
<span style="font-size: 1.3em;">
|
||||
@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
|
||||
@cannot('edit', $album)
|
||||
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
||||
@ -27,7 +27,7 @@
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
@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
|
||||
</div>
|
||||
</td>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<td>
|
||||
<span style="font-size: 1.3em;">
|
||||
@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
|
||||
@cannot('edit', $album)
|
||||
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
||||
@ -24,10 +24,10 @@
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
@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
|
||||
@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
|
||||
</div>
|
||||
</td>
|
||||
|
@ -30,51 +30,51 @@ Route::group(['prefix' => 'admin'], function () {
|
||||
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-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/{id}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
||||
Route::get('/albums/{id}/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/{id}/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::post('albums/{id}/store-redirect', 'Admin\AlbumController@storeRedirect')->name('albums.store_redirect');
|
||||
Route::get('albums/{album}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
|
||||
Route::get('albums/{album}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
||||
Route::get('/albums/{album}/metadata', 'Admin\AlbumController@metadata')->name('albums.metadata');
|
||||
Route::post('albums/{album}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
|
||||
Route::post('albums/{album}/set-user-permissions', 'Admin\AlbumController@setUserPermissions')->name('albums.set_user_permissions');
|
||||
Route::delete('albums/{album}/delete-redirect/{redirectId}', 'Admin\AlbumController@deleteRedirect')->name('albums.delete_redirect');
|
||||
Route::post('albums/{album}/store-redirect', 'Admin\AlbumController@storeRedirect')->name('albums.store_redirect');
|
||||
Route::resource('albums', 'Admin\AlbumController');
|
||||
|
||||
// Photo management
|
||||
Route::post('photos/analyse/{id}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
||||
Route::post('photos/flip/{photoId}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
||||
Route::post('photos/move/{photoId}', 'Admin\PhotoController@move')->name('photos.move');
|
||||
Route::post('photos/reanalyse/{id}/{queue_token}', 'Admin\PhotoController@reAnalyse')->name('photos.re-analyse');
|
||||
Route::post('photos/regenerate-thumbnails/{photoId}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
||||
Route::post('photos/rotate/{photoId}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
||||
Route::post('photos/analyse/{photo}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
||||
Route::post('photos/flip/{photo}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
||||
Route::post('photos/move/{photo}', 'Admin\PhotoController@move')->name('photos.move');
|
||||
Route::post('photos/reanalyse/{photo}/{queue_token}', 'Admin\PhotoController@reAnalyse')->name('photos.re-analyse');
|
||||
Route::post('photos/regenerate-thumbnails/{photo}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
||||
Route::post('photos/rotate/{photo}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
||||
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');
|
||||
|
||||
// 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');
|
||||
|
||||
// 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');
|
||||
|
||||
// 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::resource('users', 'Admin\UserController');
|
||||
|
||||
// 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');
|
||||
|
||||
// Comments management
|
||||
Route::get('comments/{id}/approve', 'Admin\PhotoCommentController@approve')->name('comments.approve');
|
||||
Route::post('comments/{id}/approve', 'Admin\PhotoCommentController@confirmApprove')->name('comments.confirmApprove');
|
||||
Route::get('comments/{comment}/approve', 'Admin\PhotoCommentController@approve')->name('comments.approve');
|
||||
Route::post('comments/{comment}/approve', 'Admin\PhotoCommentController@confirmApprove')->name('comments.confirmApprove');
|
||||
|
||||
Route::get('comments/{id}/reject', 'Admin\PhotoCommentController@reject')->name('comments.reject');
|
||||
Route::post('comments/{id}/reject', 'Admin\PhotoCommentController@confirmReject')->name('comments.confirmReject');
|
||||
Route::get('comments/{comment}/reject', 'Admin\PhotoCommentController@reject')->name('comments.reject');
|
||||
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/bulk-action', 'Admin\PhotoCommentController@bulkAction')->name('comments.bulkAction');
|
||||
|
Loading…
Reference in New Issue
Block a user