-<div class="photoview">
- [% SET sizes = request.config.sizes %]
- [% IF request.params.exists("scale") %]
- [% SET size = request.params.scale %]
- [% ELSIF request.session.scale %]
- [% SET size = request.session.scale %]
- [% ELSE; SET size = 1; END; %]
- <img src="[% photo.sized_url(size) %]">
- <p> (Original size [%photo.dimensions %]) </p>
- <p>
- Size:
- [% SET i = 0; WHILE i < sizes.size %]
- [% IF photo.is_bigger(sizes.$i); %]
- [% IF i == size %]
- [% sizes.$i %]
- [% ELSIF sizes.$i == "full" %]
- <a href="[%photo.path("url")%]">full</a>
- [% ELSE %]
- <a href="[%url%]?scale=[% i %]&active=[%tab%]">[% sizes.$i %]</a>
- [% END %]
- [% END; %]
- [% SET i = i + 1 %]
- [% END %]
- </p>
- [%# Now put it back in the session %]
- [% SET request.session.scale = size %]
+
+<div class="tagbrowse smaller">
+[% 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;
+ "<a href=\""; base;"/tag/view/";tag | html | uri;"\">";
+ tag;
+ "</a> (";
+ tagset.$tag; ")";
+ ELSE;
+ tag;
+ IF counter > 20; "..."; LAST; END;
+ END;
+ ", " UNLESS tag == sorted.last;
+END %]
+</div>
+
+[% PROCESS sized %]
+
+[% IF photo.description OR photo.copyright OR photo.license %]
+<div class="photodesc">
+ [% photo.description | html %]
+ [% IF photo.copyright %] <div class="photorights"> [% photo.copyright | html %] </div> [% END %]
+ [% IF photo.license %] <div class="photolicense"> [% photo.license | html %] </div> [% END %]