parent
45f2e83fed
commit
91ff24980c
11 changed files with 179 additions and 31 deletions
@ -0,0 +1,35 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load template_filters %} |
||||
{% load i18n %} |
||||
|
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="/news/">{% trans 'Новости' %}</a> |
||||
{% if month %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
<a href="{{ year.link }}">{{ year.text }}</a> |
||||
<strong>{{ month.text }}</strong> |
||||
{% else %} |
||||
{% if year %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
<strong>{{ year.text }}</strong> |
||||
{% else %} |
||||
<strong>{{ filter_object.name }}</strong> |
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
<div class="page-title"> |
||||
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Новости' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1> |
||||
</div> |
||||
{% include 'includes/article/catalog_filter_period.html' %} |
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
{% include 'client/includes/article/news_list.html' with object_list=object_list %} |
||||
{% endblock %} |
||||
@ -0,0 +1,19 @@ |
||||
{% load i18n %} |
||||
{% load template_filters %} |
||||
{% load tempalte_tags %} |
||||
|
||||
|
||||
{% if month or year %} |
||||
{% else %} |
||||
{% get_date_reverse %} |
||||
<div class="p-filter clearfix"> |
||||
<div class="pf-body"> |
||||
<div class="pf-label">{% trans 'Период' %}:</div> |
||||
{% with path=request.path|without_page now=now %} |
||||
{% for month in monthes_period %} |
||||
<a href="{{ path }}{{ month.date|date:'Y' }}/{{ month.month_url }}/">{{ month.name|lower }} {{ month.date|date:'Y' }}</a>{% if month != monthes_period|last %},{% endif %} |
||||
{% endfor %} |
||||
{% endwith %} |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
@ -0,0 +1,17 @@ |
||||
|
||||
|
||||
<div class="rq-to-hide"> |
||||
<div class="cat-list sc-comments"> |
||||
{% for news in object_list %} |
||||
<div class="cl-item"> |
||||
<div class="acticle_list"> |
||||
<a href="{{ news.get_permanent_url }}" title=""> |
||||
{% include 'includes/article/news_preview.html' with obj=news %}</a> |
||||
<h3><a href="{{ news.get_permanent_url }}" title="">{{ news.main_title }}</a></h3> |
||||
{{ news.preview }} |
||||
<strong><span>{{ news.publish_date|date:"d E Y" }}</span>{% with event=news.get_event %}{% if event %}<a href="{{ event.get_permanent_url }}" title=""><b>{{ event.name }}</b></a>{% endif %}{% endwith %}</strong> |
||||
</div> |
||||
</div> |
||||
{% endfor %} |
||||
</div> |
||||
</div> |
||||
@ -1,6 +1,6 @@ |
||||
|
||||
{% with tags=obj.tag.all %} |
||||
{% for tag in obj.tag.all %} |
||||
<a href="{{ obj.get_catalog }}?tag={{ tag.id }}" title="">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %} |
||||
<a href="{{ obj.get_catalog }}tag/{{ tag.url }}/" title="">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %} |
||||
{% endfor %} |
||||
{% endwith %} |
||||
Loading…
Reference in new issue