X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Fphoto%2Fview;h=46714844e8022309c048f8df7537415157aa852c;hb=7767c51977a235b2f9205da1a94b07ba55ad2f52;hp=3950ce6b5a566d2d04a59d0ee988fede5c988234;hpb=7f2c0b18cfff36d5a9d0f93e9cb4102d6a931768;p=memories.git diff --git a/templates/photo/view b/templates/photo/view index 3950ce6..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") %] @@ -84,11 +97,18 @@ photo.uploader %]
[% END %] + [% MACRO do_tab(tabname, label) BLOCK; %]
  • - [% IF tab == tabname %] - [% ELSE %] - [% END %] + [%label%]
  • [% END %] @@ -100,12 +120,7 @@ photo.uploader %] [%do_tab("similar", "Similar photos") %]
    -[% -IF request.params.active == "tagedit"; INCLUDE tagedit; -ELSIF request.params.active == "exif"; INCLUDE exif; -ELSIF request.params.active == "similar"; INCLUDE similar; -ELSE; INCLUDE comment; END; -%] +[% INCLUDE comment %]
    [% INCLUDE footer;