[%-
SET GalleryPager = 9;
SET query.page = 1 UNLESS query.page ;
SET GalleryStart = (query.page - 1) * GalleryPager ;
SET GalleryStop = query.page * GalleryPager ;
SET gallery_nonempty_dirs = {
'/Documentation/' => 'yes',
'/Download/' => 'yes',
'/Links/' => 'yes',
};
-%]
[%- MACRO gallery_transl BLOCK ; text | translator(query.lang) | eval ; END -%]
[%- BLOCK gallery_title_and_comment %][% # {{{ -%]
[%- SET tr_gallery_TITLE = gallery_transl(text = gallery.TITLE) -%]
[%- SET tr_gallery_COMMENT = gallery_transl(text = gallery.COMMENT) -%]
[%- IF tr_gallery_TITLE -%]
[% tr_gallery_TITLE %]
[%- tr_gallery_COMMENT -%]
[%- ELSIF tr_gallery_COMMENT -%]
[% tr_gallery_COMMENT %]
[%- END -%]
[%- END %][% # }}} -%]
[%- BLOCK gallery_menu %][% # {{{ -%]
[%- IF gallery.error != '' -%]
[% transl.Error %]: [% transl.${gallery.error} %]. [% transl.continue %]
[%- ELSE -%]
[%- PROCESS gallery_title_and_comment -%]
[%- END -%]
[%- END %][% # }}} -%]
[%- BLOCK gallery_main_image %][% # -%]
[%- END -%]
[%- BLOCK gallery_image_preview %][% # {{{ -%]
[%- IF align != '' %][% END -%]
[%- IF align != '' %]
[% END -%]
[%- END %][% # }}} -%]
[%- BLOCK gallery_exif_info %][% # {{{ -%]
[% transl.Show_detail_EXIF_info %]
[% transl.Camera %]: [% info.Camera | replace('KONICA MINOLTA CAMERA, Inc.', 'MINOLTA') %], [% info.Model %]
[% transl.Date %]: [% info.Date %]
[% transl.Flash %]: [% transl.${info.Flash} OR info.Flash %]
[% transl.Shutter_speed %]: [% info.${'Shutter speed'} %] sec.
[% transl.Focal_length %]: [% info.${'Focal length'} %]
[% transl.Aperture %]: [% info.Aperture %]
[% transl.ISO_sensitivity %]: [% info.${'ISO sensitivity'} %]
[% transl.Original_size %]: [% info.width %]x[% info.height %] ([% transl.${'Size'} ; ' ' ; SET s = info.orig_imagesize / 1024; filesize(s) %])
[%- END %][% # }}} -%]
[%- BLOCK gallery_image %][% # {{{ -%]
[%- IF gallery.prev_image.src.url != '' %]
««[% END -%]
[%- IF gallery.next_image.src.url != '' %]
»»[% END -%]
[%- transl.Vieving_file %]
[% gallery.cur_image.name %]
[[% gallery.number ; transl.of ; gallery.total ; '] '; transl.resolution %]
[% gallery.cur_image.resolution %]
[%- IF gallery.cookie.GalleryInterval > 0 %][% # stop slideshow with click on image -%]
[% INCLUDE gallery_main_image file = gallery.cur_image %]
[%- ELSIF gallery.next_image.src != '' %][% # go to next image, if image is not last -%]
[% INCLUDE gallery_main_image file = gallery.cur_image %]
[%- ELSE %][% # last image, only show them -%]
[%- INCLUDE gallery_main_image file = gallery.cur_image -%]
[%- END -%]
[ [% transl.${'Size'} %]: [%- FOREACH s = gallery.image_sizes ; IF gallery.cookie.GallerySize == s ; s ; ELSE -%]
[% s %]
[%- END ; END -%]
[% transl.Original %]
| [% transl.Slideshow %]: [%- FOREACH s = gallery.slideshow_intervals ; IF gallery.cookie.GalleryInterval == s ; s ; ELSE -%]
[% s %]
[%- END ; END -%]
[%- IF gallery.cookie.GalleryInterval == 0 ; transl.Off ; ELSE %]
[% transl.Off %][% END %] ]
[%- IF gallery.prev_image.src.url != '' ; INCLUDE gallery_image_preview file = gallery.prev_image, align = 'left', prev = 'yes' ; END -%]
[%- IF gallery.next_image.src.url != '' ; INCLUDE gallery_image_preview file = gallery.next_image align = 'right', next = 'yes'; END -%]
[%- INCLUDE gallery_exif_info info = gallery.cur_image.info -%]
[%- # USE Dumper; '
' ; Dumper.dump(gallery) ; '
' ; -%]
[%- END %][% # }}} -%]
[%- BLOCK gallery_directories %][% # {{{ -%]
[%- SET l = gallery.LISTING -%]
[%- IF l.directories != '' AND l.directories.size > 0 -%]
[%- FOREACH d = l.directories ; SET x = query.gallery _ d.name _ '/' -%]
[%- IF d.subentries.dirs > 0 OR d.subentries.files > 0 OR gallery_nonempty_dirs.${x} == 'yes' -%]
[% (transl.${d.title} OR d.title) | spacer %]
[%- IF d.subentries.dirs > d.subentries.files -%]
[[% d.subentries.dirs %] [% transl.subdirs.${d.subentries.dirs} OR transl.subdirs.baseform %]]
[%- ELSE -%]
[[% d.subentries.files %] [% transl.images.${d.subentries.files} OR transl.images.baseform %]]
[%- END -%]
[%- ELSE %][% # empty directory -%]
[%- (transl.${d.title} OR d.title) | spacer -%]
[[% transl.empty %]]
[%- END -%]
[%- END -%]
[%- END -%]
[%- END %][% # }}} -%]
[%- BLOCK gallery_files %][% # {{{ -%]
[%- SET l = gallery.LISTING -%]
[%- IF l.files != '' AND l.files.size > 0 -%]
[%- SET GallerySize = l.files.size ;
SET pages = ((GallerySize - (GallerySize % GalleryPager)) / GalleryPager) + (GallerySize % GalleryPager ? 1 : 0) ;
-%]
[%- transl.Images %] [[% GalleryStart + 1 ; ' - ' ; (GallerySize < GalleryStop ? GallerySize : GalleryStop ); transl.of ; GallerySize %]]
[%- transl.Number_of_pages %]: [% pages -%]
[%- SET idx = 1 ; WHILE idx <= pages -%]
[%- IF query.page == idx %][% ELSE -%]
[%- END ; SET idx = idx + 1 ; END -%]
[%- SET idx = -1 -%]
[%- FOREACH f = l.files ; SET idx = idx + 1 ; NEXT IF idx < GalleryStart ; NEXT IF idx >= GalleryStop -%]
[%-INCLUDE gallery_image_preview file = f, idx = loop.index -%]
[%- END -%]
[%- END -%]
[%- END %][% # }}} -%]
[%- BLOCK gallery_downloadable_files %][% # {{{ -%]
[%- IF query.page == 1 -%]
[%- SET l = gallery.LISTING -%]
[%- IF l.downloadable_files != '' AND l.downloadable_files.size > 0 -%]
[%- FOREACH f = l.downloadable_files -%]
[%- END -%]
[%- END -%]
[%- END -%]
[%- END %][% # }}} -%]
[%- # '' ; USE Dumper; Dumper.dump(gallery.cur_image) ; '
' -%]
[%-
# vim: ft=tt2 fdm=marker fdl=0 fdc=3
-%]