2 [% SET tab = request.params.active || "comment" %]
3 [% SET url = base _ "/photo/view/" _ photo.id; %]
8 <small><a href="[%base%]/photo/view/[%prev.id%]"><< [% prev %]</a></small>
10 <h1>[% photo.title %]</h1>
12 <small><a href="[%base%]/photo/view/[%next.id%]"> [% next %] >></a></small>
14 [% IF request.user == photo.uploader %]
15 <p><a href="[%base%]/photo/delete/[%photo.id%]">Delete this
17 <form action="[%base%]/photo/do_edit/[%photo.id%]">
18 <input name="title" value="[%photo.title |html%]">
19 <input type="submit" name="Rename" value="Rename">
26 [% FOR album = photo.albums; %]
27 <a href="[%base%]/album/view/[%album.id%]">[%album.name%]</a> ([%album.photos.size%])
28 [% ";" UNLESS album == photo.albums.last %]
33 <i>Photo shot on [% photo.shot.ymd %] </i> <br>
34 Uploaded by <a href="[%base%]/user/view/[%photo.uploader.id%]"> [%
35 photo.uploader %] </a>
37 [% photo.hit_count %] view[%IF photo.hit_count > 1%]s[%END%]
42 <div class="tagbrowse smaller">
43 [% SET tagset = {}; FOR tag = photo.tags;
44 SET name = tag.name; tagset.$name = tag.taggings.size;
46 SET sorted = tagset.nsort.reverse;
50 counter = counter + 1;
52 "<a href=\""; base;"/tag/view/";tag | html | uri;"\">";
58 IF counter > 20; "..."; LAST; END;
60 ", " UNLESS tag == sorted.last;
66 [% IF photo.description OR photo.copyright OR photo.license %]
67 <div class="photodesc">
68 [% photo.description | html %]
69 [% IF photo.copyright %] <div class="photorights"> [% photo.copyright | html %] </div> [% END %]
70 [% IF photo.license %] <div class="photolicense"> [% photo.license | html %] </div> [% END %]
75 function select_tab(name) {
76 document.getElementsByClassName("active").each(function (x) { x.removeClassName("active")});
77 new Ajax.Updater("content","[%base%]/photo/"+name+"/[%photo.id%]",
78 { method: "get", evalScripts: true }
80 $(name).addClassName("active");
83 [% MACRO do_tab(tabname, label) BLOCK; %]
85 <a [% IF tab == tabname %] class="active" [% END %] id="[%tabname%]" href="javascript:select_tab('[%tabname%]')">
91 [%do_tab("comment", "Comments") %]
92 [%do_tab("exif", "Photo info") %]
93 [%do_tab("tagedit", "Edit tags") %]
94 [%do_tab("similar", "Similar photos") %]