Skip to content

Commit

Permalink
Merge branch 'develop' of git://github.com/WUJISHANXIA/bootcamp into …
Browse files Browse the repository at this point in the history
…WUJISHANXIA-develop
  • Loading branch information
sebastian-code committed Nov 1, 2017
2 parents 1e106c3 + aa58538 commit 5890401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bootcamp/articles/templates/articles/articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>{% trans 'Articles' %}</h1>
<div class="col-md-10">
<section class="articles">
{% for article in articles %}
{% include 'articles/partial_article.html' with article=article %}
{% include 'articles/partial_article.html' with article=article is_articles=forloop %}
{% empty %}
<h4 class="no-data">{% trans 'There is no published article yet' %}. <a href="{% url 'write' %}">{% trans 'Be the first one to publish' %}!</a></h4>
{% endfor %}
Expand Down
6 changes: 5 additions & 1 deletion bootcamp/articles/templates/articles/partial_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ <h2><a href="{% url 'article' article.slug %}">{{ article.title }}</a></h2>
</span>
</div>
<div class="content">
{{ article.get_content_as_markdown|safe }}
{% if is_articles %}
{{ article.get_summary_as_markdown|safe }}
{% else %}
{{ article.get_content_as_markdown|safe }}
{% endif %}
</div>
{% if article.tags.names %}
<div class="tags">
Expand Down

0 comments on commit 5890401

Please sign in to comment.