X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Fphoto%2Fview;h=46714844e8022309c048f8df7537415157aa852c;hb=7767c51977a235b2f9205da1a94b07ba55ad2f52;hp=0285d7584966b04dc91d1bb8c0131ebb10b0e678;hpb=d8b282730b07b6aaadcc683112863f22ea20e459;p=memories.git diff --git a/templates/photo/view b/templates/photo/view index 0285d75..4671484 100644 --- a/templates/photo/view +++ b/templates/photo/view @@ -20,34 +20,47 @@ [% END %] - -[% FOR tag = photo.tags; - ""; - tag; - " ("; - tag.taggings.size; ")"; - ", " UNLESS tag == photo.tags.last; -END %] - - - - + [% IF photo.albums %] In albums: [% FOR album = photo.albums; %] [%album.name%] ([%album.photos.size%]) [% ";" UNLESS album == photo.albums.last %] [% END %] +
[% END %] - - - + Photo shot on [% photo.shot.ymd %]
Uploaded by [% photo.uploader %] -
+

+[% photo.hit_count %] view[%IF photo.hit_count > 1%]s[%END%] + + +
+[% SET tagset = {}; FOR tag = photo.tags; + SET name = tag.name; tagset.$name = tag.taggings.size; + END; + SET sorted = tagset.nsort.reverse; +%] +[% SET counter = 0; + FOR tag = sorted; + counter = counter + 1; + IF tagset.$tag > 1; + ""; + tag; + " ("; + tagset.$tag; ")"; + ELSE; + tag; + IF counter > 20; "..."; LAST; END; + END; + ", " UNLESS tag == sorted.last; +END %] +
+
[% SET sizes = request.config.sizes %] [% IF request.params.exists("scale") %]