X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=templates%2Fphoto%2Fview;h=46714844e8022309c048f8df7537415157aa852c;hb=92f8c80c61d9b1f90c0cd25e79710fc8e7963f4c;hp=b8a06bf6e72a19c8ed271a5eff59abcff40022fd;hpb=b9d021d4af1018ac2c60640678c1b790251190e9;p=memories.git
diff --git a/templates/photo/view b/templates/photo/view
index b8a06bf..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") %]
@@ -76,11 +89,26 @@ photo.uploader %]
[% SET request.session.scale = size %]
+[% IF photo.description OR photo.copyright OR photo.license %]
+
+ [% photo.description | html %]
+ [% IF photo.copyright %]
[% photo.copyright | html %]
[% END %]
+ [% IF photo.license %]
[% photo.license | html %]
[% END %]
+
+[% END %]
+
+
[% MACRO do_tab(tabname, label) BLOCK; %]
- [% IF tab == tabname %]
- [% ELSE %]
- [% END %]
+
[%label%]
[% END %]
@@ -92,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;