@use nickel::Request; @use nickel_jwt_session::SessionRequestExtensions; @use models::{Photo, Person, Place, Tag, Camera, Coord}; @use server::Link; @use templates::page_base; @(req: &Request, lpath: &[Link], people: &[Person], places: &[Place], tags: &[Tag], position: &Option, attribution: &Option, camera: &Option, photo: &Photo) @:page_base(req, "Photo details", lpath, {
@if req.authorized_user().is_some() {

@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 !places.is_empty() {

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

} @if !tags.is_empty() {

Tags: @for t in tags{@t.tag_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)

}
})