You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
160 lines
7.1 KiB
160 lines
7.1 KiB
{% extends 'base_catalog.html' %}
|
|
{% load static thumbnail %}
|
|
{% load i18n %}
|
|
|
|
{% block og %}
|
|
<meta property="og:image" content="{% thumbnail object.logo '500' %}">
|
|
<meta property="og:title" content="{{ object.main_title }}">
|
|
<meta property="og:description" content="{{ object.description|safe|striptags|truncatewords:'30' }}">
|
|
<meta property="og:url" content="{{ request.build_absolute_uri }}">
|
|
{% endblock %}
|
|
|
|
{% block head_scripts %}
|
|
<script src="{% static 'client/js/comments.js' %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block bread_scrumbs %}
|
|
<div class="bread-crumbs">
|
|
<a href="/">{% trans 'Главная страница' %}</a>
|
|
<a href="/blogs/">{% trans 'Статьи' %}</a>
|
|
<strong>{{ object.main_title }}</strong>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block page_title %}
|
|
{% endblock %}
|
|
|
|
{% block content_list %}
|
|
<div class="m-article cl-news blog_block">
|
|
<div class="blog_block_headline full_width">
|
|
|
|
{# {% include 'client/includes/article/article_logo.html' with obj=object %} #}
|
|
<h1><a href="#" class="preview_toggle" data-short="{% trans 'Краткое содержание' %}" data-full="{% trans 'Полное содержание' %}">{% trans 'Краткое содержание' %}</a>{{ object.main_title }}</h1>
|
|
<ul class="article_info">
|
|
<li><i class="fa fa-user"></i> {{ object.author_s.fullname }}</li>
|
|
<li><i class="fa fa-calendar"></i> {{ object.publish_date|date:"d E Y" }}</li>
|
|
<li>Раздел: <a href="/blogs/theme/{{ object.theme.all.0.url }}"> {{ object.theme.all.0 }} </a></li>
|
|
</ul>
|
|
{# <strong><span>{{ object.publish_date|date:"d E Y" }}</span></strong> #}
|
|
{% if object.tag.all.exists %}
|
|
<div class="article_tags">
|
|
{% trans 'Теги:' %} {% include 'client/includes/article_tags.html' with obj=object %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if request.user.is_admin %}
|
|
<a target="_blank" class="button green" href="/admin/article/blog/{{ object.slug }}/">{% trans 'изменить' %}</a>
|
|
{% endif %}
|
|
<div class="article_sharing">
|
|
<h5>{% trans 'Поделитесь статьей с коллегами:' %}</h5>
|
|
{% include "client/includes/sharing_block.html" %}
|
|
</div>
|
|
<p style="text-align: justify" align="justify"> </p>
|
|
</div>
|
|
<div class="article_image">
|
|
<img src="{% thumbnail object.logo '935' %}" alt="{{ object.main_title }}">
|
|
</div>
|
|
<div class="content-text new_article">
|
|
{{ object.description|safe }}
|
|
</div>
|
|
|
|
<div class="new_article hidden">
|
|
{{ object.short_description|safe }}
|
|
</div>
|
|
|
|
<div class="full_sharing">
|
|
{% include 'client/includes/sharing_block_full.html' %}
|
|
</div>
|
|
|
|
<div class="article_author">
|
|
<div class="author">
|
|
{# для thumbnail '148x148' crop="center" #}
|
|
{% thumbnail object.author_s.photo '148x148' crop="center" as im %}
|
|
<img src="{{ im.url }}" alt="">
|
|
{% endthumbnail %}
|
|
|
|
<h4>{{ object.author_s.fullname }}</h4>
|
|
|
|
<i class="author_position">{{ object.author_s.position|default:'' }}</i>
|
|
<ul>
|
|
{% if object.author_s.email %}
|
|
<li><i class="fa fa-envelope"></i> <a href="mailto:{{ object.author_s.email }}">{{ object.author_s.email }}</a></li>
|
|
{% endif %}
|
|
<li>
|
|
{# <a href="#"><i class="fa fa-rss-square"></i></a>#}
|
|
{% if object.author_s.fb %}
|
|
<a href="{{ object.author_s.fb }}"><i class="fa fa-facebook-square"></i></a>
|
|
{% endif %}
|
|
|
|
{% if object.author_s.linkedin %}
|
|
<a href="{{ object.author_s.linkedin }}"><i class="fa fa-linkedin-square"></i></a>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="author_about">
|
|
{{ object.author_s.about|safe }}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% if object.get_similar %}
|
|
<div class="recommended_articles">
|
|
<h2>{% trans 'Рекомендуемые статьи' %}</h2>
|
|
<div class="articles">
|
|
{% for sim in object.get_similar %}
|
|
<div class="article">
|
|
{# thumbnail '217x148' crop="center" #}
|
|
{% thumbnail sim.logo '217x148' crop="center" as im %}
|
|
<img src="{{ im.url }}" alt="">
|
|
{% endthumbnail %}
|
|
<a href="{{ sim.get_permanent_url }}">{{ sim.main_title }}</a>
|
|
<time><i class="fa fa-calendar"></i> {{ sim.publish_date|date:"d E Y" }}</time>
|
|
<p>{{ sim.preview|safe }}</p>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="article_comments">
|
|
<h2>{% trans 'Комментарии' %}</h2>
|
|
{% for comment in comments %}
|
|
<div class="comment">
|
|
<div class="comment_author">
|
|
{{ comment.user.get_full_name }} <time><i class="fa fa-calendar"></i> {{ comment.created }}</time>
|
|
</div>
|
|
<div class="comment_text">{{ comment.text }}</div>
|
|
<a href="#" data-parent="{{ comment.pk }}" data-user="{{ comment.user.get_full_name }}" class="reply_comment"><i class="fa fa-comment"></i> <span>{% trans "Ответить на комментарий" %}</span></a>
|
|
|
|
{% for answer in comment.childs %}
|
|
<div class="comment">
|
|
<div class="comment_author">
|
|
{{ answer.user.get_full_name }} <time><i class="fa fa-calendar"></i> {{ answer.created }}</time>
|
|
</div>
|
|
<div class="comment_text">{{ answer.text }}</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if user.is_authenticated %}
|
|
<div class="сomment_form">
|
|
<form action="." method="post" id="comment_form">
|
|
{% csrf_token %}
|
|
<p>
|
|
<textarea cols="40" id="id_text" name="text" rows="10"></textarea>
|
|
|
|
<button type="submit" class="button">Отправить</button>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
{% else %}
|
|
<p class="no_login">{% trans 'Для отправки комментариев' %}, <a class="login pw-open" href="#pw-login">{% trans 'авторизуйтесь' %}.</a></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
|
|
|