2020-07-24 19:20:58 -04:00
|
|
|
<div class="image-manager-details">
|
|
|
|
|
|
|
|
<form component="ajax-form"
|
|
|
|
option:ajax-form:success-message="{{ trans('components.image_update_success') }}"
|
|
|
|
option:ajax-form:method="put"
|
|
|
|
option:ajax-form:response-container=".image-manager-details"
|
|
|
|
option:ajax-form:url="{{ url('images/' . $image->id) }}">
|
|
|
|
|
|
|
|
<div class="image-manager-viewer">
|
2021-05-24 16:17:08 -04:00
|
|
|
<a href="{{ $image->url }}" target="_blank" rel="noopener" class="block">
|
2022-01-10 13:12:11 -05:00
|
|
|
<img src="{{ $image->thumbs['display'] ?? $image->url }}"
|
2020-07-24 19:20:58 -04:00
|
|
|
alt="{{ $image->name }}"
|
|
|
|
class="anim fadeIn"
|
|
|
|
title="{{ $image->name }}">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="form-group stretch-inputs">
|
|
|
|
<label for="name">{{ trans('components.image_image_name') }}</label>
|
|
|
|
<input id="name" class="input-base" type="text" name="name" value="{{ $image->name }}">
|
|
|
|
</div>
|
|
|
|
<div class="grid half">
|
|
|
|
<div>
|
2022-09-05 10:52:12 -04:00
|
|
|
@if(userCan('image-delete', $image))
|
|
|
|
<button type="button"
|
2020-07-24 19:20:58 -04:00
|
|
|
id="image-manager-delete"
|
|
|
|
title="{{ trans('common.delete') }}"
|
|
|
|
class="button icon outline">@icon('delete')</button>
|
2022-09-05 10:52:12 -04:00
|
|
|
@endif
|
2020-07-24 19:20:58 -04:00
|
|
|
</div>
|
|
|
|
<div class="text-right">
|
|
|
|
<button type="submit"
|
|
|
|
class="button icon outline">{{ trans('common.save') }}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
@if(!is_null($dependantPages))
|
|
|
|
@if(count($dependantPages) > 0)
|
|
|
|
<p class="text-neg mb-xs mt-m">{{ trans('components.image_delete_used') }}</p>
|
|
|
|
<ul class="text-neg">
|
|
|
|
@foreach($dependantPages as $page)
|
|
|
|
<li>
|
|
|
|
<a href="{{ $page->url }}"
|
|
|
|
target="_blank"
|
2021-05-24 16:17:08 -04:00
|
|
|
rel="noopener"
|
2020-07-24 19:20:58 -04:00
|
|
|
class="text-neg">{{ $page->name }}</a>
|
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
@endif
|
|
|
|
<p class="text-neg mb-xs">{{ trans('components.image_delete_confirm_text') }}</p>
|
|
|
|
<form component="ajax-form"
|
|
|
|
option:ajax-form:success-message="{{ trans('components.image_delete_success') }}"
|
|
|
|
option:ajax-form:method="delete"
|
|
|
|
option:ajax-form:response-container=".image-manager-details"
|
|
|
|
option:ajax-form:url="{{ url('images/' . $image->id) }}">
|
|
|
|
<button type="submit" class="button neg">
|
|
|
|
{{ trans('common.delete_confirm') }}
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</div>
|