{% extends "layout.jinja2" %}

{% block content %}

<div class="card mb-0">
    <div class="card-body">
        {% if request.authenticated_userid %}
            <p>
                <a href="{{ request.route_url('topic', topic=entry.topic_id) }}"  class="btn btn-light" role="button">
                    <span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
                <a href="{{ request.route_url('blog_edit', topic=entry.topic_id, id=entry.id) }}"  class="btn btn-primary" role="button">
                    <span class="glyphicon glyphicon-pencil"></span> Modifier</a>
                <a href="{{ request.route_url('blog_copy', topic=entry.topic_id, id=entry.id) }}"  class="btn btn-success" role="button">
                    <span class="glyphicon glyphicon-duplicate"></span> Duppliquer</a>
                </p>
        
        {% endif %}

        <hr/>
        {{ body_html | safe }}
    <br><br>
        {% if entry.source_link != '' %}
            <ul>
                <li><b>{{ scr_label }}</b> : <a href="{{ entry.source_link }}">{{ entry.source_title }}</a> - {{ entry.source_site }}</li>
            </ul>
        {% endif %}
        {% if related != None %}
            <ul>
                <li><b>{{ rel_label }}</b> : <a href="{{ request.route_url('blog', id=related.id, slug=related.title) }}">{{ related.title }}</a> - {{ related.author }}</li>
            </ul>
        {% endif %}
    <hr/>
        <p>
            <strong>{{ entry.author }}</strong> - Publié le <strong>{{ entry.create_date }}</strong><br>
        </p>

        <p>
            {% if request.authenticated_userid %}
                Topic - Tag : <strong>{{ entry.topic_id }}</strong> - <strong>{{ entry.tag }}</strong><br>
                Description : <strong>{{ entry.description }}</strong><br>
                URL id : <strong>{{ entry.url_id }}</strong><br>
                Type : <strong>{{ entry.content_type }}</strong><br>
                Language : <strong>{{ entry.language }}</strong><br>
                Statut : <strong>{{ entry.status }}</strong><br>
            {% endif %}
        </p>
    </div>
</div>

{% endblock %}
