{% extends 'up_squelette.html' %} {% block main %} {% for post in posts %} <div class="well"> <div class="row"> <div class="col-sm-2"> <img src="/static/usersprofil/{{ post.avatar }}" class="img-rounded" alt=""/><br><br> <p>{% if post.author != None %}{{ post.author }} {%endif%} <br />{% if post.prenom != None %}{{ post.prenom }}{%endif%} <br/>{% if post.age != None %}{{ post.age }} ans {%endif%}<br /></p> </div> <div class="col-sm-9"> <h6>{{ post.time }}</h6> <h2>{{ post.title }}</h2> {{ post.content|safe }} </div> <div class="col-sm-1"> {% if post.author == session['username'] %} {% if post.status == 'prive' %} <h4><span class="label label-danger">Privé</span></h4> {% else %} <h4><span class="label label-success">Public</span></h4> {% endif %} <br /><br> <a href="{{ url_for('post-it.edit', post=post.title) }}"><button type="button" class="btn btn-sm btn-primary"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></button></a><br /><br> <a href="{{ url_for('post-it.delete', post=post.title) }}"><button type="button" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button></a><br /><br> {% endif %} </div> </div> </div> {% endfor %} {% endblock %}