blue-twilight/resources/views/themes/base/gallery/photo.blade.php

108 lines
4.7 KiB
PHP

@extends('themes.base.layout')
@section('title', $photo->name)
@section('breadcrumb')
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
@foreach ($album->albumParentTree() as $parentAlbum)
@if ($parentAlbum->id == $photo->album->id)
<li class="breadcrumb-item"><a href="{{ $return_album_url }}">{{ $photo->album->name }}</a></li>
@else
<li class="breadcrumb-item"><a href="{{ $parentAlbum->url() }}">{{ $parentAlbum->name }}</a></li>
@endif
@endforeach
<li class="breadcrumb-item active">{{ $photo->name }}</li>
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="col">
<h1>{{ $photo->name }}</h1>
@if (strlen($photo->description) > 0)
<p>{{ $photo->description }}</p>
@endif
</div>
</div>
<div class="row">
<div class="col-sm-8 content-body">
@if ($is_original_allowed)
<a href="{{ $photo->thumbnailUrl() }}">
@endif
<img src="{{ $photo->thumbnailUrl('fullsize') }}" alt="" class="img-thumbnail mb-4"/>
@if ($is_original_allowed)
</a>
@endif
@if ($photo->labels()->count() > 0)
<h4>@lang('gallery.labels')</h4>
<ul class="nav nav-pills mb-4">
@foreach ($photo->labels()->orderBy('name')->get() as $label)
<li class="nav-item">
<a class="nav-link" href="{{ $label->url() }}">
<i class="fa fa-tag"></i> {{ $label->name }}
</a>
</li>
@endforeach
</ul>
@endif
</div>
<div class="col-sm-4">
<div class="card">
<div class="card-header">Information about this photo:</div>
<div class="card-body" style="padding: 0;">
<table class="table table-striped photo-metadata mb-0">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td class="metadata_name">File name:</td>
<td class="metadata_value">{{ $photo->file_name }}</td>
</tr>
@if (strlen($photo->taken_at) > 0)
<tr>
<td class="metadata_name">Date taken:</td>
<td class="metadata_value">{{ date(UserConfig::get('date_format'), strtotime($photo->taken_at)) }}</td>
</tr>
@endif
@if (strlen($photo->camera_make) > 0)
<tr>
<td class="metadata_name">Camera make:</td>
<td class="metadata_value">{{ $photo->camera_make }}</td>
</tr>
@endif
@if (strlen($photo->camera_model) > 0)
<tr>
<td class="metadata_name">Camera model:</td>
<td class="metadata_value">{{ $photo->camera_model }}</td>
</tr>
@endif
@if (strlen($photo->camera_software) > 0)
<tr>
<td class="metadata_name">Camera software:</td>
<td class="metadata_value">{{ $photo->camera_software }}</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col mt-4">
<a href="{{ $return_album_url }}" class="btn btn-secondary">&laquo; @lang('gallery.back_to_album', ['name' => $photo->album->name])</a>
</div>
</div>
</div>
@endsection