180 lines
7.1 KiB
Smarty
180 lines
7.1 KiB
Smarty
{* Страница отдельной записи блога *}
|
||
|
||
<!-- Хлебные крошки /-->
|
||
<ul class="breadcrumb">
|
||
<li><a href="/">Главная</a></li>
|
||
<li><a href="/nashi-raboty/">Примеры работ</a></li>
|
||
{foreach from=$article->category->path item=cat}
|
||
<li><a href="/articles/{$cat->url}/">{$cat->name|escape}</a></li>
|
||
{/foreach}
|
||
<li>{$article->name|escape}</li>
|
||
</ul>
|
||
<!-- Хлебные крошки #End /-->
|
||
|
||
<!-- Заголовок /-->
|
||
<h1>{$article->name|escape}</h1>
|
||
<p>{$article->date|date|date_format:"%e %m %Y":"":"rus"}</p>
|
||
<p>Количество просмотров: {$article->visited}</p>
|
||
{if $article->image}<a href="{$article->image|resizepost:800:800}" class="fancybox" data-rel="details"><img class="img-thumbnail" src="{$article->image|resizepost:100:100}" alt="{$article->name|escape}" /></a>{/if}
|
||
|
||
<!-- Тело поста / -->
|
||
{images_resize content=$article->text}
|
||
<!-- / Тело поста -->
|
||
|
||
<!-- Соседние записи /-->
|
||
{*
|
||
<div id="back_forward">
|
||
{if $prev_article}
|
||
← <a class="back" id="PrevLink" href="/article/{$prev_article->url}/">{$prev_article->name}</a>
|
||
{/if}
|
||
{if $next_article}
|
||
<a class="forward" id="NextLink" href="/article/{$next_article->url}/">{$next_article->name}</a> →
|
||
{/if}
|
||
</div>*}
|
||
|
||
{if $related_products}
|
||
<h2>Связанные товары</h2>
|
||
<ul>
|
||
{foreach $related_products as $p}
|
||
<li><a href="/products/{$p->url}/">{$p->name}</a></li>
|
||
{/foreach}
|
||
</ul>
|
||
<br/>
|
||
|
||
{/if}
|
||
<br/>
|
||
|
||
{if $related_articles}
|
||
<h2>Также советуем посмотреть</h2>
|
||
<ul>
|
||
{foreach $related_articles as $a}
|
||
<li>
|
||
{if $a->image}<a href="/article/{$a->url}/" class="w"><img class="img-thumbnail" src="{$a->image|resizepost:100:100}" alt="{$a->name|escape}" /></a>{/if}
|
||
<a href="/article/{$a->url}/">{$a->name}</a>
|
||
</li>
|
||
{/foreach}
|
||
</ul>
|
||
{/if}
|
||
|
||
|
||
{foreach from=$article_photos item=ph}
|
||
<div class="add-photo-preview" style="float:left;margin-right:10px;margin-bottom:10px;">
|
||
<a class="fancybox" data-rel="details" href="{$ph->bigImage}" rel="details">
|
||
<img class="img-thumbnail w" src="{$ph->image}" style="width:400px">
|
||
</a>
|
||
</div>
|
||
{/foreach}
|
||
|
||
{if $article_photos}<div class="clearfix"></div><div style="height:30px"></div>{/if}
|
||
|
||
<div id="back_forward" style="margin-left: 0;" class="row">
|
||
<div class="col-sm-6">
|
||
{if $prev_article}
|
||
{*<a class="prev-strelka" href="/catalog/reshetki-radiatora/tovar-1217.html"><span class="fa fa-chevron-left"></span></a>*}
|
||
<div class="prev-next-title"><a href="/article/{$prev_article->url}/">← {$prev_article->name}</a></div>
|
||
<div style="float: none;" class="cell">
|
||
<a href="/article/{$prev_article->url}/">
|
||
<div class="wrap-pic2" style="width: 200px; height: 120px; overflow: hidden; float: left; border: 6px solid rgb(39, 39, 39); margin: 0px 5px 5px 0px;">
|
||
<img src="{$prev_article->image|resizepost:200:140}" alt="Решетка радиатора (4 поперечины)" style="width: 200px; margin-top: -9.5px; display: inline-block;">
|
||
</div>
|
||
</a>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
<div style="text-align: right;" class="col-sm-6">
|
||
{if $next_article}
|
||
<div style="float:left" class="prev-next-title"><a href="/article/{$next_article->url}/">{$next_article->name} →</a></div>
|
||
{*<a class="next-strelka" href="/catalog/reshetki-radiatora/tovar-3004.html"><span class="fa fa-chevron-right"></span></a>*}
|
||
<div style="float: none;display: inline-block;" class="cell">
|
||
<a href="/article/{$next_article->url}/">
|
||
<div class="wrap-pic2" style="width: 200px; height: 120px; overflow: hidden; float: left; border: 6px solid rgb(39, 39, 39); margin: 0px 5px 5px 0px;">
|
||
<img src="{$next_article->image|resizepost:200:140}" alt="Решетка радиатора Audi A4 B8 '07-11 с рамкой под номер, черная" style="width: 200px; margin-top: -3.5px; display: inline-block;">
|
||
</div>
|
||
</a>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Комментарии -->
|
||
<div id="comments">
|
||
|
||
<h2>Комментарии</h2>
|
||
|
||
{if $comments}
|
||
<!-- Список с комментариями -->
|
||
<ul class="comment_list">
|
||
{foreach $comments as $comment}
|
||
|
||
<li> <a name="comment_{$comment->id}"></a>
|
||
<!-- Имя и дата комментария-->
|
||
<div class="comment_header">
|
||
{$comment->name|escape} <i>{$comment->date|date}, {$comment->date|time}</i>
|
||
{if !$comment->approved}ожидает модерации</b>{/if}
|
||
</div>
|
||
<!-- Имя и дата комментария (The End)-->
|
||
|
||
<!-- Комментарий -->
|
||
{$comment->text|escape|nl2br}
|
||
<!-- Комментарий (The End)-->
|
||
</li>
|
||
{/foreach}
|
||
</ul>
|
||
<!-- Список с комментариями (The End)-->
|
||
{else}
|
||
<p>
|
||
Пока нет комментариев
|
||
</p>
|
||
{/if}
|
||
|
||
<!--Форма отправления комментария-->
|
||
|
||
<!--Подключаем js-проверку формы -->
|
||
|
||
<div class="title">Написать комментарий</div>
|
||
<div class="well">
|
||
<form class="form-horizontal comment_form" method="post" action="{$smarty.server.REQUEST_URI}">
|
||
{if $error}
|
||
<div class="message_error">
|
||
{if $error=='captcha'}
|
||
Неверно введена капча
|
||
{elseif $error=='empty_name'}
|
||
Введите имя
|
||
{elseif $error=='empty_comment'}
|
||
Введите комментарий
|
||
{/if}
|
||
</div>
|
||
{/if}
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label" for="comment_name">Комментарий</label>
|
||
<div class="col-sm-10"><textarea class="comment_textarea form-control" id="comment_text" name="text" data-format=".+" data-notice="Введите комментарий">{$comment_text}</textarea></div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label" for="comment_name">Имя</label>
|
||
<div class="col-sm-10"><input class="input_name form-control" type="text" id="comment_name" name="name" value="{$comment_name}" data-format=".+" data-notice="Введите имя"/></div>
|
||
</div>
|
||
<div class="form-group">
|
||
<div class="col-sm-2 captcha"><img src="captcha/image.php?{math equation='rand(10,10000)'}" alt=""/></div>
|
||
<div class="col-sm-2"><input class="input_captcha form-control" id="comment_captcha" type="text" name="captcha_code" value="" data-format="\d\d\d\d" data-notice="Введите капчу"/></div>
|
||
</div>
|
||
<input class="btn btn-danger pull-right" type="submit" name="comment" value="Отправить" />
|
||
<input type="text" name="email" id="h_email">
|
||
</form>
|
||
</div>
|
||
<!--Форма отправления комментария (The End)-->
|
||
|
||
</div>
|
||
<!-- Комментарии (The End) -->
|
||
|
||
{* Скрипт для листания через ctrl → *}
|
||
{* Ссылки на соседние страницы должны иметь id PrevLink и NextLink *}
|
||
<script type="text/javascript" src="js/ctrlnavigate.js"></script>
|
||
|
||
{literal}
|
||
<script>
|
||
$(function() {
|
||
$("a.zoom").fancybox({ 'hideOnContentClick' : true });
|
||
});
|
||
</script>
|
||
{/literal}
|