Working on GalleryItem Naming
This commit is contained in:
parent
11af22215e
commit
ded03e22f1
3 changed files with 17 additions and 9 deletions
|
|
@ -155,6 +155,11 @@ class GalleryController extends Controller
|
|||
return redirect("/tour/gallery/$tour_id");
|
||||
|
||||
}
|
||||
|
||||
public function name_image(Request $request, $tour_id, $image_name) {
|
||||
$new_image_name = $request->new_image_name;
|
||||
Log::info("GalleryController::name_image for tour $tour_id , current name=$image_name, new name=$new_image_name");
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private function storeImage($bild, $category, $name) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,17 @@
|
|||
|
||||
@if(Auth::user()->role=="ADMIN")
|
||||
<p>
|
||||
<a href="#"><label style="display:inline;">🖊</label></a>
|
||||
<a id="edit_{{$tour_id}}_{{$image}}" href="#"><label style="display:inline;">🖊</label></a>
|
||||
|
||||
<form style="display:inline;background-color: #fff;" class="text-dark" method="post"
|
||||
action="/tour/gallery/{{$tour_id}}/name_image/{{$image}}.jpg" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<input type="hidden" name="tour_id" value="{{ $tour_id }}">
|
||||
<input type="text" name="new_image_name" value="" ">
|
||||
</form>
|
||||
|
||||
|
||||
<a href="/tour/gallery/{{$tour_id}}/delete_image/{{$image}}.jpg" style="color:red;"><span data-toggle="tooltip" title="Löschen">X</a>
|
||||
</p>
|
||||
@endif
|
||||
|
|
@ -35,14 +45,6 @@
|
|||
</a>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
// Open the Modal
|
||||
function openModal() {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
Route::get('/tour/gallery/{gallery_id}', 'GalleryController@show'); // no middleware auth needed, its checked in Controller
|
||||
Route::post('/tour/gallery/{gallery_id}', 'GalleryController@store');
|
||||
Route::get('/tour/gallery/{gallery_id}/delete_image/{imageName}', 'GalleryController@delete_image');
|
||||
Route::put('/tour/gallery/{gallery_id}/name_image/{imageName}', 'GalleryController@name_image');
|
||||
|
||||
|
||||
Auth::routes();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue