This commit is contained in:
Kekskurse 2021-01-20 00:26:23 +01:00
parent 7cde2db61a
commit de07eee4d1
2 changed files with 16 additions and 3 deletions

View file

@ -39,7 +39,10 @@ class EXIFRead extends Command
*/
public function handle()
{
$images = Image::query()->where("exifRead", "=", 0)->limit(10)->get();
$images = Image::query()
->where("exifRead", "=", 0)
->limit(10)
->get();
foreach ($images as $image) {
$this->info("Get Image ".$image->id);
EXIFAuslesen::dispatchSync($image->id);

View file

@ -4,7 +4,7 @@
<div class="row" style="margin-top: 20px;">
<div class="col-md-12">
@foreach($images as $image)
<div class="card col-md-2 editImage" x-id="{{ $image->id }}" x-name="{{ $image->filename }}" x-image-url="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=medium" style="float:left;cursor: pointer;" >
<div class="card col-md-2 editImage" data-name="{{ $image->name }}" data-description="{{ $image->description }}" data-rating="{{ $image->rating }}" x-id="{{ $image->id }}" x-name="{{ $image->filename }}" x-image-url="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=medium" style="float:left;cursor: pointer;" >
<div class="card-body" style="text-align: center;">
<img class="card-img-top" src="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=small" style="height: 200px;width: auto; max-width: 100%;">
@ -36,6 +36,13 @@
<img src="" id="imagePreview" style="width: 100%;">
<input style="display: none;" name="name" id="edit-name" placeholder="Name" class="form-control">
<input style="display: none;" name="edit-id" id="edit-id" placeholder="ID" class="form-control">
<b>Name</b>
<input name="name" id="name" class="form-control">
<b>Beschreibung</b>
<textarea name="description" class="form-control" id="description"></textarea>
<b>Rating</b>
<input name="rating" class="form-control" id="rating">
</div>
<div class="modal-footer">
<button type="button" id="deleteImage" class="btn btn-danger">Delete</button>
@ -56,7 +63,10 @@
$("#imagePreview").attr("src", $(this).attr("x-image-url"));
$("#edit-name").val($(this).attr("x-name"));
$("#edit-id").val($(this).attr("x-id"));
$('#exampleModal').modal('show')
$('#exampleModal').modal('show');
$("#name").val($(this).attr("data-name"));
$("#rating").val($(this).attr("data-rating"));
$("#description").val($(this).attr("data-description"));
});
$("#makeGalleryDefault").click(function () {
$.ajax("/g/{{ $gallery->url }}/setDefault?id="+$("#edit-id").val()).done(function () {