article_detail.html 1.46 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{% extends "base.html" %}
{% load static %}
{% load crispy_forms_tags %}
{% load crispy_forms_field %}


{% block content-banner %}
{% endblock %}

{% block content %}
<div class="row">
<div class="col-md-12 white-bg">
  <div class="well">

    <div class="d-flex justify-content-start align-items-baseline mb-4">
      <p class="lead">
        <a class="btn btn-outline-primary" href="{% url 'rp:article-list' filter_view='draft' %}">
          <i class="fa fa-chevron-left" aria-hidden="true"></i> Pending articles
        </a>
        <span class="ml-2"><strong>Article ID #{{object.id}}</strong></span>
      </p>
      <div class="ml-auto">
        <span class="btn-group" role="group" aria-label="Actions">
          <a class="btn btn-outline-primary" href="{% url 'rp:article-edit' object.id %}">Éditer</a>
          <input type="submit" class="btn btn-outline-warning" name="publish" value="Publier">
        </span>
      </div>
    </div>

    <div class="row">
      <div class="col-sm-3">
        {% if object.screenshot %}
        <img class="img-responsive mb-4"
             src="/media/{{ object.screenshot }}">
        {% endif %}
      </div>
      <div class="col-sm-9 lead">
        <h4>{{object.title}}</h4>
        <p>{{article.created_at.date}}
        {% for t in article.tags.all %}
        <span class="badge badge-default ml-1">{{t}}</span>
        {% endfor %}
        </p>

        <p>{{object.extracts}}</p>
      </div>
    </div>

</div>
</div>
{% endblock %}