@use super::page_base; @use crate::models::{Photo, Person, Place, Tag, Camera, Coord, SizeTag}; @use crate::server::{Context, Link}; @(context: &Context, lpath: &[Link], people: &[Person], places: &[Place], tags: &[Tag], position: &Option, attribution: &Option, camera: &Option, photo: &Photo) @:page_base(context, "Photo details", lpath, { }, {
@if context.is_authorized() {

@photo.path

@if photo.is_public() {

This photo is public.

} else {

This photo is not public.

} } @if let Some(g) = photo.grade {

Grade: @g

} @if let Some(d) = photo.date {

Time: @d.format("%F %T")

} @if !people.is_empty() {

People: @for p in people {@p.person_name, }

} @if !tags.is_empty() {

Tags: @for t in tags {@t.tag_name, }

} @if !places.is_empty() {

Places: @for p in places {@p.place_name, }

} @if let Some(ref pos) = *position {

Position: @pos.x @pos.y

} @if let Some(ref a) = *attribution {

Av: @a

} @if let Some(ref c) = *camera {

Camera: @c.model (@c.manufacturer)

}
})