Commit 6dadc540 authored by okhin's avatar okhin 🚴

Merge branch '66-recuperer-le-titre-de-l-article-a-l-ajout' into 'rp2'

Resolve "Récupérer le titre de l'article à l'ajout"

Closes #66

See merge request !57
parents 369c72a9 4224e4a8
Pipeline #2687 passed with stages
in 3 minutes and 43 seconds
......@@ -123,8 +123,8 @@ class Article(models.Model):
ordering = ["-published_at", "-updated_at", "-created_at"]
def __str__(self):
""" Returns article title. """
return self.title
""" Returns article title. Or URL if title is empty"""
return self.title if self.title else self.url
# Finite state logic
@transition(field=status, source='DRAFT', target='PUBLISHED',
......@@ -101,7 +101,7 @@
<td>{{article.created_at |date:'d/m/y'}}<br />{{article.created_at |date:'H:i'}}</td>
<td class="title-cell"><a target="_blank" href="{{article.url}}"><strong>{{article.title}}</strong></a></td>
<td class="title-cell"><a target="_blank" href="{{article.url}}"><strong>{{article}}</strong></a></td>
<span id="score_{{}}">{{article.score}}</span>
{% if filter_view != "published" %}
......@@ -123,7 +123,7 @@
<ul class="actions-list">
{% if filter_view == 'flux' %}
<li class="actions-item actions-item-draft" onclick="javascript:call_recover({{}})">
<i class="fa fa-fw fa-chevron-right" aria-hidden="true"></i> Forcer</a>
<i class="fa fa-fw fa-chevron-right" aria-hidden="true"></i> Forcer
{% else %}
<li class="actions-item actions-item-edit"><a href="{% url 'rp:article-edit' %}">
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment