X-Git-Url: https://git.decadent.org.uk/gitweb/?p=memories.git;a=blobdiff_plain;f=templates%2Fphoto%2Fview;h=617484c81c13884fa82c532ab5e3d680efc3e8e9;hp=0285d7584966b04dc91d1bb8c0131ebb10b0e678;hb=426b02d7e53067a411a549d1a80240381d52ab62;hpb=1ac69d664ef258186b9252fc610ca7d777bbdd79
diff --git a/templates/photo/view b/templates/photo/view
index 0285d75..617484c 100644
--- a/templates/photo/view
+++ b/templates/photo/view
@@ -20,34 +20,45 @@
[% 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 %]
|
+
+
+[% 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") %]