@use ::{Coord, Link}; @use rphotos::models::{Photo, Person, Place, Tag, Camera}; @use templates::page_base; @(lpath: &[Link], user: Option, people: &[Person], places: &[Place], tags: &[Tag], position: Option, attribution: Option, camera: Option, time: String, photo: Photo) @:page_base("Photo details", lpath, &user, {
@if user.is_some() {

@photo.path

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

Betyg: @g

}

Tid: @time

@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)

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