{{define "partials/relations_comparison.html"}} {{- $L := .Left -}} {{- $R := .Right -}} {{- $lwin := and (gt $L.ResolutionW 0) (or (gt $L.ResolutionW $R.ResolutionW) (and (eq $L.ResolutionW $R.ResolutionW) (gt $L.ResolutionH $R.ResolutionH))) -}} {{- $rwin := and (gt $R.ResolutionW 0) (or (gt $R.ResolutionW $L.ResolutionW) (and (eq $R.ResolutionW $L.ResolutionW) (gt $R.ResolutionH $L.ResolutionH))) -}} {{$L.ResolutionW}}×{{$L.ResolutionH}}{{if $lwin}} ←{{end}} {{$R.ResolutionW}}×{{$R.ResolutionH}}{{if $rwin}} ←{{end}} {{if ne $L.FileSize $R.FileSize}} {{humanBytes $L.FileSize}}{{if gt $L.FileSize $R.FileSize}} ←{{end}} {{humanBytes $R.FileSize}}{{if gt $R.FileSize $L.FileSize}} ←{{end}} {{end}} {{if ne $L.AddedAt $R.AddedAt}} {{end}} {{if ne $L.TagCount $R.TagCount}} {{$L.TagCount}}{{if gt $L.TagCount $R.TagCount}} ←{{end}} {{$R.TagCount}}{{if gt $R.TagCount $L.TagCount}} ←{{end}} {{end}} {{if or $L.UniqueTags $R.UniqueTags}} {{end}} {{if ne $L.Format $R.Format}} {{end}} {{if or $L.Collection $R.Collection}} {{- $same := and (ne $L.Collection "") (eq $L.Collection $R.Collection) -}} {{if $L.Collection}}{{$L.Collection}}{{else}}—{{end}} {{if $R.Collection}}{{$R.Collection}}{{else}}—{{end}} {{end}}
FieldLeft #{{$L.ImageID}}Right #{{$R.ImageID}}
Resolution
File size
Added {{if $L.AddedAt}}{{$L.AddedAt}}{{else}}—{{end}} {{if $R.AddedAt}}{{$R.AddedAt}}{{else}}—{{end}}
Tag count
Tags only here {{if $L.UniqueTags}} {{range $i, $n := $L.UniqueTags}}{{if $i}}, {{end}}{{$n}}{{end}}{{if gt $L.UniqueTagsTotal (len $L.UniqueTags)}}, +{{sub $L.UniqueTagsTotal (len $L.UniqueTags)}} more{{end}} {{else}}(none){{end}} {{if $R.UniqueTags}} {{range $i, $n := $R.UniqueTags}}{{if $i}}, {{end}}{{$n}}{{end}}{{if gt $R.UniqueTagsTotal (len $R.UniqueTags)}}, +{{sub $R.UniqueTagsTotal (len $R.UniqueTags)}} more{{end}} {{else}}(none){{end}}
Format {{if $L.Format}}{{$L.Format}}{{else}}—{{end}} {{if $R.Format}}{{$R.Format}}{{else}}—{{end}}
Collection
{{end}}