2016-09-07 21:44:28 +01:00
|
|
|
@php ($field_prefix = sprintf('photo[%d]', $photo->id))
|
|
|
|
<hr/>
|
2016-09-09 09:45:11 +01:00
|
|
|
<div class="photo row" data-photo-id="{{ $photo->id }}">
|
2017-04-09 09:07:18 +01:00
|
|
|
<div class="col-sm-2">
|
2016-09-09 09:45:11 +01:00
|
|
|
<div class="loading"><img src="{{ asset('ripple.svg') }}" /></div>
|
|
|
|
|
2016-09-07 21:44:28 +01:00
|
|
|
<a href="{{ $photo->thumbnailUrl() }}" target="_blank">
|
2016-09-08 23:22:29 +01:00
|
|
|
<img class="photo-thumbnail" src="{{ $photo->thumbnailUrl('admin-preview') }}" data-original-src="{{ $photo->thumbnailUrl('admin-preview') }}" style="max-width: 100%;"/>
|
|
|
|
</a><br/>
|
2016-09-09 09:45:11 +01:00
|
|
|
|
|
|
|
{{-- Photo editing tasks - these are hooked up using Javascript in admin/show_album --}}
|
2017-04-16 09:00:57 +01:00
|
|
|
@php($canChangeMetadata = Auth::user()->can('change-metadata', $photo))
|
|
|
|
@php($canManipulate = Auth::user()->can('manipulate', $photo))
|
|
|
|
@php($canDelete = Auth::user()->can('delete', $photo))
|
|
|
|
|
|
|
|
@if ($canManipulate || $canChangeMetadata || $canDelete)
|
|
|
|
<div class="text-center mt-1">
|
2017-04-10 17:29:45 +01:00
|
|
|
<div class="btn-group btn-group-sm" role="group">
|
2017-04-16 09:00:57 +01:00
|
|
|
@if ($canManipulate)
|
|
|
|
<div class="btn-group btn-group-sm" role="group">
|
|
|
|
<button type="button" class="btn btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<i class="fa fa-fw fa-pencil"></i> <span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
<a href="#" class="dropdown-item rotate-photo-left" v-on:click="rotateLeft"><i class="fa fa-fw fa-rotate-left"></i> @lang('admin.photo_actions.rotate_left')</a>
|
|
|
|
<a href="#" class="dropdown-item rotate-photo-right" v-on:click="rotateRight"><i class="fa fa-fw fa-rotate-right"></i> @lang('admin.photo_actions.rotate_right')</a>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<a href="#" class="dropdown-item flip-photo-horizontal" v-on:click="flipHorizontal"><i class="fa fa-fw fa-arrows-h"></i> @lang('admin.photo_actions.flip_horizontal')</a>
|
|
|
|
<a href="#" class="dropdown-item flip-photo-vertical" v-on:click="flipVertical"><i class="fa fa-fw fa-arrows-v"></i> @lang('admin.photo_actions.flip_vertical')</a>
|
|
|
|
<a href="#" class="dropdown-item flip-photo-both" v-on:click="flipBoth"><i class="fa fa-fw fa-retweet"></i> @lang('admin.photo_actions.flip_both')</a>
|
|
|
|
</div>
|
2017-04-10 17:29:45 +01:00
|
|
|
</div>
|
2017-04-16 09:00:57 +01:00
|
|
|
@endif
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<button type="button" class="btn btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<i class="fa fa-fw fa-cog"></i> <span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
@if ($canChangeMetadata)
|
|
|
|
<a href="#" class="dropdown-item change-album" v-on:click="changeAlbum"><i class="fa fa-fw fa-share"></i> @lang('admin.photo_actions.change_album')</a>
|
|
|
|
<a href="#" class="dropdown-item regenerate-thumbnails" v-on:click="regenerateThumbnails"><i class="fa fa-fw fa-picture-o"></i> @lang('admin.photo_actions.refresh_thumbnails')</a>
|
|
|
|
@endif
|
|
|
|
@if ($canDelete)
|
|
|
|
<a href="#" class="dropdown-item delete-photo" v-on:click="deletePhoto"><i class="fa fa-fw fa-trash text-danger"></i> <span class="text-danger">@lang('admin.photo_actions.delete')</span></a>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-04-10 17:29:45 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-09 09:45:11 +01:00
|
|
|
|
2017-04-16 09:00:57 +01:00
|
|
|
<div class="mt-2">
|
2017-08-30 22:22:44 +01:00
|
|
|
<input type="checkbox" id="select-photo-{{ $photo->id }}" name="select-photo[]" value="{{ $photo->id }}" /> <label for="select-photo-{{ $photo->id }}">@lang('forms.select')</label>
|
2017-04-16 09:00:57 +01:00
|
|
|
</div>
|
2016-09-09 09:45:11 +01:00
|
|
|
</div>
|
2017-04-16 09:00:57 +01:00
|
|
|
@endif
|
2016-09-07 21:44:28 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-sm-10">
|
2016-10-28 14:05:53 +01:00
|
|
|
@php($validation_field_name = ('photo.' . $photo->id . '.name'))
|
|
|
|
<div class="form-group{{ $errors->has($validation_field_name) ? ' has-error' : '' }}">
|
2017-04-09 09:07:18 +01:00
|
|
|
<label class="control-label" name="{{ $field_prefix }}[name]">@lang('forms.name_label')</label>
|
2017-04-16 09:00:57 +01:00
|
|
|
<input class="form-control" type="text" name="{{ $field_prefix }}[name]" value="{{ old($field_prefix . '[name]', $photo->name) }}" @cannot('change-metadata', $photo) disabled="disabled"@endcannot/>
|
2016-10-28 14:05:53 +01:00
|
|
|
|
|
|
|
@if ($errors->has($validation_field_name))
|
|
|
|
<span class="help-block">
|
|
|
|
<strong>{{ $errors->first($validation_field_name) }}</strong>
|
|
|
|
</span>
|
|
|
|
@endif
|
2016-09-07 21:44:28 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-04-09 09:07:18 +01:00
|
|
|
<label class="control-label" name="{{ $field_prefix }}[description]">@lang('forms.description_label')</label>
|
2017-04-16 09:00:57 +01:00
|
|
|
<textarea name="{{ $field_prefix }}[description]" class="form-control" rows="4" @cannot('change-metadata', $photo) disabled="disabled"@endcannot>{{ old($field_prefix . '[description]', $photo->description) }}</textarea>
|
2016-09-07 21:44:28 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|