{% if (p.stack_count > 0) { %}
{% } %}
{/literal}{* @event prepare_photos_backend[top_left][%plugin_id%] *}{literal}
{% for (var plugin in p.hooks.top_left) { %}
{%# p.hooks.top_left[plugin] %}
{% } %}
{% if (p.status <= 0) { %}{% } %}
{% if (p.stack_count > 0) { %}{%#p.stack_count%}{% } %}
{% if ($.photos.album) { %}{% } %}
{/literal}{* @event prepare_photos_backend[top_right][%plugin_id%] *}{literal}
{% for (var plugin in p.hooks.top_right) { %}
{%# p.hooks.top_right[plugin] %}
{% } %}
{%#$.photos.getRatingHtml(p.rate, 10, true)%}
{% if (p.description) { %}
{%#p.description.truncate(255)%}
{%#p.description%}
{% } else { %}
{% if (p.edit_rights) { %}
[`add description`]
{% } else { %}
{% } %}
{% } %}
{% if ($.photos.album && $.photos.album.edit_rights) { %}
{% } %}
{% include ('template-photo-list-photo-tags', {tags: p.tags}); %}
{/literal}{* @event prepare_photos_backend[thumb][%plugin_id%] *}{literal}
{% for (var plugin in p.hooks.thumb) { %}
{%# p.hooks.thumb[plugin].replace(/\{%[#=]{1}\s*o.([\w_]+)%\s*\}/g,function(string,match){ return o[match];}) %}
{% } %}
{% } %}
{/literal}{/capture}
{capture name="template-photo-counter"}{literal}
{%=o.string.loaded%} {%=o.string.of%}
{% if (o.count < o.total_count) { %}
[`Show more photos`]
[`Loading`]{% if (o.string.chunk) { %} {%=o.string.chunk%}{% } %}...
{% } %}
{/literal}{/capture}
{capture name="template-photo-descriptions"}{literal}
{% var height; %}
{% for (var i=0, p=o.photos[0], n=o.photos.length; i
{% if (p.edit_rights) { %}
{%
if (typeof p.thumb.size === 'object' && p.thumb.size && p.thumb.size) {
height = p.thumb.size.height
} else {
height = p.thumb.bound.height || p.thumb.bound.width;
}
%}
{% } else { %}
{%#p.name%}
{%#p.description%}
{% } %}
{/literal}{* @event prepare_photos_backend[thumb][%plugin_id%] *}{literal}
{% for (var plugin in p.hooks.thumb) { %}
{%# p.hooks.thumb[plugin].replace(/\{%[#=]{1}\s*o.([\w_]+)%\s*\}/g,function(string,match){ return o[match];}) %}
{% } %}
{% } %}
{/literal}{/capture}
{capture name="template-photo-list-photo-tags"}{literal}
{% var tags = o.tags, i = 0; %}
{% if (!tags || ($.isArray(tags) && !tags.length)) return ''; %}
{% for (var tag_id in tags) { %}{% var t = tags[tag_id]; %}{% if (i++ > 0) { %},{% } %} {%=t%}{% } %}
{/literal}{/capture}
{* js templates block*}
{foreach $smarty.capture as $template => $template_content}
{if $template_content && (strpos($template, 'template-')===0)}
{capture name=$template}{/capture}
{/if}
{/foreach}
{if empty($offset)}
{$loaded = count($photos)}
{else}
{$loaded = count($photos) + $offset}
{/if}
{if isset($album)}{$total_count=$album.count}{/if}
{$photos_per_page = $wa->photos->option("photos_per_page")}