{{define "title"}} {{if .IsSiteGallery}} Member Gallery {{else}} Photos of {{.User.Username}} {{if eq .User.Visibility "private"}}{{end}} {{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}}
{{if .IsSiteGallery}}
{{if .CurrentUser.Explicit}}
{{end}}
{{if .CurrentUser.IsAdmin}}
{{end}}
Reset
{{end}} {{if .IsOwnPhotos}} {{else if and (not .IsSiteGallery) (not .IsMyPrivateUnlockedFor)}} {{else if and (not .IsSiteGallery) .IsMyPrivateUnlockedFor}}
You had granted {{.User.Username}} access to see your private photos. Manage that here.
{{end}} {{template "pager" .}} {{if eq .ViewStyle "full"}} {{range .Photos}}
{{if $Root.IsSiteGallery}}
{{if $Root.UserMap.Has .UserID}} {{$Owner := $Root.UserMap.Get .UserID}}
{{template "avatar-24x24" $Owner}}
{{if eq .Visibility "friends"}} {{else if eq .Visibility "private"}} {{else}} {{end}}
{{else}} [deleted] {{end}}
{{else}}

{{or .Caption "Photo"}}

{{end}}
{{if .Caption}} {{.Caption}} {{else}}No caption{{end}} {{template "card-body" .}} {{if not $Root.AdminView}}
{{$Like := $Root.LikeMap.Get .ID}}
{{$Comments := $Root.CommentMap.Get .ID}} {{$Comments}} Comment{{Pluralize64 $Comments}}
{{end}}
{{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}}
{{template "avatar-24x24" $Owner}}
{{if eq .Visibility "friends"}} {{else if eq .Visibility "private"}} {{else}} {{end}}
{{else}} [deleted] {{end}}
{{end}}
{{if .Caption}} {{.Caption}} {{else}}No caption{{end}} {{template "card-body" .}} {{if not $Root.AdminView}}
{{$Like := $Root.LikeMap.Get .ID}}
{{$Comments := $Root.CommentMap.Get .ID}} {{$Comments}} Comment{{Pluralize64 $Comments}}
{{end}}
{{if or $Root.IsOwnPhotos $Root.CurrentUser.IsAdmin}} {{template "card-footer" .}} {{end}} {{if not $Root.IsOwnPhotos}} Report {{end}}
{{end}}
{{end}} {{template "pager" .}}
{{end}}