{{define "title"}} {{if .IsSiteGallery}}Member Gallery{{else}}Photos of {{.User.Username}}{{end}} {{end}} {{define "card-body"}}
Uploaded {{.CreatedAt.Format "Jan _2 2006 15:04:05"}}
{{if .Explicit}} Explicit {{end}} {{if eq .Visibility "public"}} Public {{else if eq .Visibility "friends"}} Friends {{else}} Private {{end}} {{if .Gallery}} Gallery {{end}}
{{end}} {{define "card-footer"}} Edit Delete {{end}} {{define "pager"}} {{end}} {{define "content"}}
{{if .IsSiteGallery}}

{{template "title" .}}

{{else}}

{{template "title" .}}

{{if .IsOwnPhotos}} {{end}}
{{end}}
{{$Root := .}}
{{if not .IsSiteGallery}} {{end}}
Found {{.Pager.Total}} photo{{Pluralize64 .Pager.Total}} (page {{.Pager.Page}} of {{.Pager.Pages}}). {{if .ExplicitCount}} {{.ExplicitCount}} explicit photo{{Pluralize64 .ExplicitCount}} hidden per your settings. {{end}}
{{template "pager" .}} {{if eq .ViewStyle "full"}} {{range .Photos}}
{{if $Root.IsSiteGallery}}
{{if $Root.UserMap.Has .UserID}} {{$Owner := $Root.UserMap.Get .UserID}}
{{if gt $Owner.ProfilePhoto.ID 0}} {{else}} {{end}}
{{else}} [deleted] {{end}}
{{else}}

{{or .Caption "Photo"}}

{{end}}
{{if .Caption}} {{.Caption}} {{else}}No caption{{end}} {{template "card-body" .}}
{{if or $Root.IsOwnPhotos $Root.CurrentUser.IsAdmin}} {{template "card-footer" .}} {{end}} {{if not $Root.IsOwnPhotos}} Report {{end}}
{{end}} {{else}}
{{range .Photos}}
{{if $Root.IsSiteGallery}}
{{if $Root.UserMap.Has .UserID}} {{$Owner := $Root.UserMap.Get .UserID}}
{{if gt $Owner.ProfilePhoto.ID 0}} {{else}} {{end}}
{{else}} [deleted] {{end}}
{{end}}
{{if .Caption}} {{.Caption}} {{else}}No caption{{end}} {{template "card-body" .}}
{{if or $Root.IsOwnPhotos $Root.CurrentUser.IsAdmin}} {{template "card-footer" .}} {{end}} {{if not $Root.IsOwnPhotos}} Report {{end}}
{{end}}
{{end}} {{template "pager" .}}
{{end}}