{include file="lc_album/album_toolbar.tpl"}

<h1><a href="{url action="album" var=$album->id}">{$album->name|escape}</a></h1>
<div class="image_main">
	<a class="image img-thumbnail" href="{$image->files.original}" title="{$image->name|escape}"><img alt="{$image->name|escape}" src="{$image->files.middle}" /></a>
	<div class="crearfix">&nbsp;</div>
	{if $_cfg.current.image_rating_enable}
		<div class="btn-group voting"{if $image_votes[$image->id]==1} title="{t}Вы проголосовали положительно{/t}"{elseif $image_votes[$image->id]==-1}title="{t}Вы проголосовали отрицательно{/t}"{/if}>
			{if isset($image_votes)}
				<a class="{if $image_votes[$image->id]}disabled {/if}btn btn-default" title="{t}за{/t}" onclick="return voter.vote(this, {$image->id}, 1, 'image')" href="#plus"><img src="/skins/default/images/icons/plus_white16.png" alt="{t}за{/t}" /></a>
				<span class="score btn disabled{if $image->vote_result>0} btn-success{elseif $image->vote_result<0} btn-danger{else} btn-default {/if}">{$image->vote_result}</span>
				<a class="{if $image_votes[$image->id]}disabled {/if}btn btn-default" title="{t}против{/t}" onclick="return voter.vote(this, {$image->id}, -1, 'image')" href="#minus"><img src="/skins/default/images/icons/minus_white16.png" alt="{t}против{/t}" /></a>
			{else}
				<span class="score btn disabled{if $image->vote_result>0} btn-success{elseif $image->vote_result<0} btn-danger{else} btn-default {/if}">{$image->vote_result}</span>
			{/if}
		</div>
	{/if}
	<div class="crearfix">&nbsp;</div>
	{if $image->describe_html || $image->name}
		<div class="panel panel-default">
			{if $image->name}<div class="panel-heading">{$image->name|escape}</div>{/if}
			{if $image->describe_html}<div class="panel-body">
				{$image->describe_html}
			</div>{/if}
		</div>
	{/if}
	
</div>
<div class="album_nav">
	{if $prev}<a class="prev img-thumbnail" href="{url action="image" var1=$prev->id}#album_top" title="Предыдущее"><img src="{$prev->files.small}" alt="Предыдущее" /></a>{/if}
	{if $next}<a class="next img-thumbnail" href="{url action="image" var1=$next->id}#album_top" title="Следующее"><img src="{$next->files.small}" alt="Следующее" /></a>{/if}
</div>

{if $_cfg.current.image_rating_enable}
	<script type="text/javascript">
		voter.url['image']='{url action="image_vote_ajax" type='json'}';
		voter.token='{$_user->token}';
	</script>
{/if}

<script type="text/javascript">
	$('.image_main').photobox('.image', { thumbs:true }, null, '{url action="album" var1=$album->id type="json"}');
</script>

{* комментарии *}
{nocache}
	{if $comments_item}
		{include file="lc_comments/comments.tpl"}
	{/if}
{/nocache}