From e2349927902c2bc9f1faebce83f893e0f5660eaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Thu, 4 Aug 2016 11:14:54 +0200 Subject: [PATCH] Topic details first implementation --- .../article/includes/article_card.html | 55 ++++++------ .../magazine/topic/topic_detail.html | 90 ++++++++++--------- 2 files changed, 78 insertions(+), 67 deletions(-) diff --git a/app/templates/magazine/article/includes/article_card.html b/app/templates/magazine/article/includes/article_card.html index 12f2a127..2e5f6835 100644 --- a/app/templates/magazine/article/includes/article_card.html +++ b/app/templates/magazine/article/includes/article_card.html @@ -1,31 +1,34 @@ -{% load i18n pages_tags mezzanine_tags %} +{% load i18n pages_tags mezzanine_tags media_tags %} -
- -
-
- -
-
-
- {% trans 'Actualité' %} -
- {% if article.keywords %} -
- {{ article.keywords.first }} -
- {% endif %} +
+
+
+ +
+
+
+ {% trans 'Actualité' %}
+ {% if article.keywords %} +
+ {{ article.keywords.first }} +
+ {% endif %}
+
-
-

{{ article.title }}

-
- {{ article.publish_date|date:"DATE_FORMAT" }} -
-
- {{ article.content|richtext_filters|safe|truncatechars:200 }} -
+
+

{{ article.title }}

+
+ {{ article.publish_date|date:"DATE_FORMAT" }} + {% for category in article.categories.all %} + {% if forloop.first %} | {% endif %} + {% if not forloop.first %}, {% endif %} + {{ category }} + {% endfor %} +
+
+ {{ article.content|richtext_filters|safe|truncatechars_html:200 }}
-
-
+
+ diff --git a/app/templates/magazine/topic/topic_detail.html b/app/templates/magazine/topic/topic_detail.html index 9e54e093..4f387d5a 100644 --- a/app/templates/magazine/topic/topic_detail.html +++ b/app/templates/magazine/topic/topic_detail.html @@ -1,64 +1,72 @@ {% extends "base.html" %} {% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %} -{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Articles" %}{% endif %}{% endblock %} +{% block meta_title %} + {{ topic.title }} | {% trans "Magazine" %} +{% endblock %} {% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} + {% keywords_for topic as keywords %} + {% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} + {% endfor %} {% endmetablock %}{% endblock %} {% block meta_description %}{% metablock %} -{{ page.description }} + {{ topic.description }} {% endmetablock %}{% endblock %} {% block title %} -{% if page %} -{% editable page.title %}{{ page.title }}{% endeditable %} -{% else %} -{% trans "Articles" %} -{% endif %} + {% if page %} + {% editable page.title %}{{ page.title }}{% endeditable %} + {% else %} + {% trans "Articles" %} + {% endif %} {% endblock %} {% block breadcrumb_menu %} -{{ block.super }} -{% if tag or category or year or month or author %} -
  • {% spaceless %} -{% if tag %} - {% trans "Tag:" %} {{ tag }} -{% else %}{% if category %} - {% trans "Category:" %} {{ category }} -{% else %}{% if year or month %} - {% if month %}{{ month }}, {% endif %}{{ year }} -{% else %}{% if author %} - {% trans "Author:" %} {{ author.get_full_name|default:author.username }} -{% endif %}{% endif %}{% endif %}{% endif %} -{% endspaceless %} -
  • -{% endif %} + {{ block.super }} + + {% endblock %} {% block main %} -
    -
    +
    +
    -

    {{ topic.title }}

    -

    {{ topic.description }}

    +
    +
    + {% editable topic.title %} +

    {{ topic.title }}

    + {% endeditable %} +
    +
    - {% for article in topic.articles.all %} - {% include 'magazine/article/includes/article_card.html' %} - {% endfor %} -
    +
    +
    + {% if topic.description %} + {% editable topic.description %} +
    + {{ topic.description }} +
    + {% endeditable %} + {% endif %} +
    +
    -{% if settings.COMMENTS_DISQUS_SHORTNAME %} -{% include "generic/includes/disqus_counts.html" %} -{% endif %} +
    -{% endblock %} +
    + +
    +
    + {% for article in topic.articles.all %} +
    + {% include 'magazine/article/includes/article_card.html' %} +
    + {% endfor %} +
    +
    -{% block right_panel %} -{% include "blog/includes/filter_panel.html" %} {% endblock %} -- 2.39.5