Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ameliore (un peu) l'affichage des articles #2829

Merged
merged 1 commit into from
Jun 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 28 additions & 30 deletions templates/article/includes/article_item.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{% for author in article.authors.all %}{% if forloop.first %}{% trans "par" %}{% elif forloop.last %} {% trans "et" %}{% else %},{% endif %} {{ author.username }}{% endfor %}
{% endcaptureas %}

<article class="content-item article-item has-reactions">
<article class="content-item article-item {% if article.sha_public != None %}has-reactions{% endif %}">
<a href="{{ link }}" tabindex="-1" class="content-illu">
{% if article.image %}
<img src="{{ article.image.content_thumb.url }}" alt="">
Expand All @@ -31,45 +31,43 @@ <h3 class="content-title" itemprop="itemListElement">
{{ article.title }}
</h3>

{% if article.description and show_description %}
<p class="content-description">
{{ article.description }}
</p>
{% endif %}


<p class="content-description">
{{ article.description }}
</p>

<div class="content-meta">
<time class="content-pubdate" pubdate="{{ article.pubdate|date:"c" }}">
{{ article.pubdate|format_date|capfirst }}
</time>

{% if article.sha_public %}
<p class="content-authors">
{{ authors_text }}
</p>
{% elif article.sha_validation %}
<p class="content-state">
{% trans "En validation" %}
</p>
{% else %}
<p class="content-state">
{% trans "Brouillon" %}
</p>
{% endif %}
<p>
<span class="content-authors">{{ authors_text }}</span>
{% if article.sha_public = None %}
<span class="content-state">
{% if article.sha_validation != None %}
{% trans " - En validation" %}
{% elif article.sha_public = None %}
{% trans " - Brouillon" %}
{% endif %}
</span>
{% endif %}
</p>
</div>
</a>

<a class="content-reactions" href="
{% if article.last_read_reaction %}
{{ article.last_read_reaction.get_absolute_url }}
{% else %}
{{ article.get_absolute_url_online }}#reactions
{% endif %}"
title="{% if article.get_reaction_count == 0 %}{% trans "Aucune" %}{% else %}{{ article.get_reaction_count }}{% endif %} {% trans "réaction" %}{{ article.get_reaction_count|pluralize }}"
>
<span>{{ article.get_reaction_count }}</span>
</a>
{% if article.sha_public != None %}
<a class="content-reactions" href="
{% if article.last_read_reaction %}
{{ article.last_read_reaction.get_absolute_url }}
{% else %}
{{ article.get_absolute_url_online }}#reactions
{% endif %}"
title="{% if article.get_reaction_count == 0 %}{% trans "Aucune" %}{% else %}{{ article.get_reaction_count }}{% endif %} {% trans "réaction" %}{{ article.get_reaction_count|pluralize }}"
>
<span>{{ article.get_reaction_count }}</span>
</a>
{% endif %}
</div>

{% if article.tags.all %}
Expand Down