Updated photo viewing
This commit is contained in:
@@ -25,53 +25,47 @@
|
||||
<table class="table table-striped table-sm table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-50">Source</th>
|
||||
<th class="w-50">Remove</th>
|
||||
<th class="w-50">Source</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php $c=0; @endphp
|
||||
@foreach ($catalog as $o)
|
||||
@php
|
||||
$d=$o->list_duplicates(TRUE); $src=[];
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
@if($d->where('duplicate',null)->count() > 1)
|
||||
More than 1 source?
|
||||
|
||||
@elseif($d->count())
|
||||
@php($src=$d->first())
|
||||
@include('photo.widgets.thumbnail',['o'=>$src])
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($d->count() == 1)
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
No other duplicates found?
|
||||
<input type="hidden" name="items[]" value="{{ $o->id }}">
|
||||
@include('photo.widgets.thumbnail',['o'=>$o])
|
||||
</td>
|
||||
@continue
|
||||
|
||||
@else
|
||||
@foreach($d as $item)
|
||||
@if($loop->first) @continue @endif
|
||||
@php($diff=collect($src)->diffAssoc($item))
|
||||
@if (! ($d=$o->duplicates()->with('software.model.make')->get())->count())
|
||||
<td>
|
||||
<input type="hidden" name="items[]" value="{{ $item->id }}">
|
||||
XX
|
||||
@include('photo.widgets.thumbnail',['o'=>$src])
|
||||
No other duplicates found?
|
||||
</td>
|
||||
@endforeach
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
@continue
|
||||
|
||||
@else
|
||||
@foreach($d as $item)
|
||||
<td>
|
||||
<input type="hidden" name="items[]" value="{{ $item->id }}">
|
||||
@include('photo.widgets.thumbnail',['o'=>$item])
|
||||
</td>
|
||||
@endforeach
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"><button class="btn btn-primary">Update</button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
{{--
|
||||
<input type="hidden" name="pagenext" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">
|
||||
<button class="btn btn-primary">Update</button>
|
||||
--}}
|
||||
</form>
|
||||
@else
|
||||
NONE!
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Photo
|
||||
Photo #{{ $o->id }} @if($o->duplicate)<button class="btn btn-warning">DUPLICATE</button>@endif @if($o->remove)<button class="btn btn-danger">PENDING DELETE</button>@endif
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
#{{ $o->id }}
|
||||
@@ -16,80 +16,90 @@
|
||||
|
||||
@section('main-content')
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Photo {{ $photo->id }}<?php if ($photo->remove) : ?> - <strong>PENDING DELETE</strong><?php endif?>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<a href="{{ url('p/view',$o->id) }}"><img class="p-3" src="{{ url('p/thumbnail',$o->id) }}"></a>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="col-md-2">
|
||||
<a href="{{ url('/p/view/'.$photo->id) }}"><img src="{{ url('/p/thumbnail/'.$photo->id) }}" width="200px"></a>
|
||||
<div class="text-center">
|
||||
<ul class="pagination">
|
||||
<li <?php if (! $x = $photo->previous()) : ?>class="disabled"<?php endif ?>><a href="{{ $x ? url('/p/info/'.$x->id) : '#' }}"><<</a></li>
|
||||
<li <?php if (! $x = $photo->next()) : ?>class="disabled"<?php endif ?>><a href="{{ $x ? url('/p/info/'.$x->id) : '#' }}">>></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="pagination justify-content-center">
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li class="page-item @if(! $x=$o->previous())disabled @endif" aria-disabled="@if(! $x)true @else false @endif" aria-label="« Previous">
|
||||
<a class="page-link" href="{{ $x ? url('p/info',$x->id) : '#' }}"><<</a>
|
||||
</li>
|
||||
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="dl-horizontal">
|
||||
<dt>Signature</dt><dd>{{ $photo->signature(TRUE) }}</dd>
|
||||
<dt>Filename</dt><dd>{{ $photo->file_path(TRUE) }}<dd>
|
||||
<?php if ($photo->shouldMove()) : ?>
|
||||
<dt>NEW Filename</dt><dd>{{ $photo->file_path(TRUE,TRUE) }}<dd>
|
||||
<?php endif ?>
|
||||
<dt>Size</dt><dd>{{ $photo->file_size() }}<dd>
|
||||
<dt>Dimensions</dt><dd>{{ $photo->width }} x {{ $photo->height }} @ {{ $photo->orientation }}<dd>
|
||||
<br/>
|
||||
<dt>Date Taken</dt><dd>{{ $photo->date_taken() }}<dd>
|
||||
<dt>Camera</dt><dd>{{ $photo->make }}<dd>
|
||||
<dt>Model</dt><dd>{{ $photo->model }}<dd>
|
||||
<dt>Software</dt><dd>{{ $photo->software }}<dd>
|
||||
<br/>
|
||||
<dt>Location</dt><dd>
|
||||
<?php if ($photo->gps() == 'UNKNOWN') : ?>
|
||||
UNKNOWN
|
||||
<?php else : ?>
|
||||
<div id="map" style="width: 400px; height: 300px"></div>
|
||||
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
<script type="text/javascript">
|
||||
var myLatLng = {lat: {{ $photo->gps_lat }}, lng: {{ $photo->gps_lon }}};
|
||||
var map = new google.maps.Map(document.getElementById("map"), {
|
||||
zoom: 16,
|
||||
center: myLatLng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
});
|
||||
var marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: myLatLng,
|
||||
});
|
||||
</script>
|
||||
<?php endif ?>
|
||||
</dd>
|
||||
<br/>
|
||||
<dt>Exif Data</dt><dd>
|
||||
<table>
|
||||
<?php foreach ($photo->properties() as $k => $v) : ?>
|
||||
<tr><th>{{ $k }}<><td>{{ $v }}<td></tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</dd>
|
||||
</div>
|
||||
</div>
|
||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $o->id }}</span></li>
|
||||
|
||||
<?php if ($photo->remove) : ?>
|
||||
<form action="{{ url('/p/undelete/'.$photo->id) }}" method="POST">
|
||||
<button class="btn btn-default">Undelete</button>
|
||||
<?php else : ?>
|
||||
<form action="{{ url('/p/delete/'.$photo->id) }}" method="POST">
|
||||
<button class="btn btn-default">Delete</button>
|
||||
<?php endif ?>
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
</div>
|
||||
<li class="page-item @if(! $x=$o->next())disabled @endif" aria-disabled="@if(! $x)true @else false @endif" aria-label="« Previous">
|
||||
<a class="page-link" href="{{ $x ? url('p/info',$x->id) : '#' }}">>></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col-9">
|
||||
<div class="dl-horizontal">
|
||||
<dt>Signature</dt><dd>{{ $o->signature(TRUE) }}</dd>
|
||||
<dt>Filename</dt><dd>{{ $o->file_path(TRUE) }}<dd>
|
||||
|
||||
@if ($o->shouldMove())
|
||||
<dt>NEW Filename</dt><dd>{{ $o->file_path(TRUE,TRUE) }}<dd>
|
||||
@endif
|
||||
|
||||
<dt>Size</dt><dd>{{ $o->file_size() }}<dd>
|
||||
<dt>Dimensions</dt><dd>{{ $o->dimensions }} @ {{ $o->orientation }}<dd>
|
||||
<hr>
|
||||
<dt>Date Taken</dt><dd>{{ $o->date_taken() }}<dd>
|
||||
<dt>Camera</dt><dd>{{ $o->device() }}<dd>
|
||||
<hr>
|
||||
<dt>Location</dt><dd>
|
||||
@if($o->gps() == 'UNKNOWN')
|
||||
UNKNOWN
|
||||
@else
|
||||
<div id="map" style="width: 400px; height: 300px"></div>
|
||||
@endif
|
||||
|
||||
</dd>
|
||||
<br/>
|
||||
<dt>Exif Data</dt><dd>
|
||||
<table>
|
||||
@foreach ($o->properties() as $k => $v)
|
||||
<tr><th>{{ $k }}<><td>{{ $v }}<td></tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@if ($o->remove)
|
||||
<form action="{{ url('p/undelete',$o->id) }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<button class="btn btn-primary">Undelete</button>
|
||||
@else
|
||||
<form action="{{ url('p/delete',$o->id) }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<button class="btn btn-danger">Delete</button>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
@if($o->gps() !== 'UNKNOWN')
|
||||
@js('//maps.google.com/maps/api/js?sensor=false')
|
||||
|
||||
<script type="text/javascript">
|
||||
var myLatLng = {lat: {{ $o->gps_lat }}, lng: {{ $o->gps_lon }}};
|
||||
var map = new google.maps.Map(document.getElementById("map"), {
|
||||
zoom: 16,
|
||||
center: myLatLng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
});
|
||||
var marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: myLatLng,
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
@append
|
@@ -15,42 +15,29 @@
|
||||
<div class="card-header">
|
||||
<div class="user-block">
|
||||
<i class="float-left fa fa-2x fa-camera"></i><span class="username"><a href="#">#{{ $o->id }} - {{ \Illuminate\Support\Str::limit($o->filename,12).\Illuminate\Support\Str::substr($o->filename,-16) }}</a></span>
|
||||
<span class="description">{{ $o->date_created->toDateTimeString() }} [{{ $o->make }} {{ $o->model }} ({{ $o->software }})]</span>
|
||||
<span class="description">{{ $o->date_created->toDateTimeString() }} [{{ $o->device() }}]</span>
|
||||
</div>
|
||||
<!-- /.user-block -->
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fa fa-times"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.card-tools -->
|
||||
</div>
|
||||
|
||||
<!-- /.card-body -->
|
||||
<div class="card-body">
|
||||
{!! $o->view() !!}
|
||||
{!! $o->getHtmlImageURL() !!}
|
||||
|
||||
<span class="float-right text-muted"> </span>
|
||||
</div>
|
||||
|
||||
<!-- /.card-body -->
|
||||
<div class="card-footer card-comments">
|
||||
<div class="card-comment">
|
||||
<div class="comment-text">
|
||||
<table class="table table-striped table-sm table-hover small">
|
||||
@foreach($data as $k=>$v)
|
||||
<tr><th>{{$k}}</th><td>{!! $src->{$v[1]} !!}</td></tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.comment-text -->
|
||||
</div>
|
||||
<!-- /.card-comment -->
|
||||
|
||||
<table class="table table-striped table-sm table-hover small">
|
||||
@foreach($data as $k=>$v)
|
||||
<tr><th>{{$k}}</th><td>{!! $o->{$v[1]} !!}</td></tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-footer -->
|
||||
<div class="card-footer">
|
||||
</div>
|
||||
<!-- /.card-footer -->
|
||||
</div>
|
Reference in New Issue
Block a user