{if empty($photos) && empty($album) && empty($hash)}

[`Welcome to your new photo gallery!`]

[`Start uploading photos by clicking the link above or by dragging selected photos anywhere on this page.`]

[`Drag some photos anywhere on this page to start upload`]
{else}

{if !empty($album)} [`← Back`] {/if} {if isset($album) && empty($title)}[`(no name)`]{else}{$title|escape}{/if} {if isset($album)} {if $album.note}{$album.note}{/if} {/if} {if isset($album) && $album.type == photosAlbumModel::TYPE_DYNAMIC} {if isset($album.conditions.status) && $album.conditions.status[0] == '<=' && $album.conditions.status[1] == '0'}{/if} {if isset($album.conditions.rate)} {'★'|str_repeat:$album.conditions.rate[1]}{*'*}{if $album.conditions.rate[0] == '>='}+{else}-{/if} {/if} {if isset($album.conditions.tag)} {$album.conditions.tag[1]|implode:', '} {/if} {/if}

{if !empty($album)} {if !empty($album.description)}

{$album.description|strip_tags|truncate:512}

{/if} {if $child_albums}
[`In this album`]
{/if} {/if}
{/if}
{capture name="template-photo-thumbs"}{literal} {% var last_login_time = o.last_login_time; %} {% for (var i=0, p=o.photos[0], n=o.photos.length; i
{% 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)%}
{% } 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`] {% } %} {/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")}