2022-08-06 18:22:24 +02:00
|
|
|
{% extends 'up_squelette.html' %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block main %}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-06 05:07:34 +02:00
|
|
|
<div class="row">
|
2022-08-06 18:22:24 +02:00
|
|
|
{% for post in posts %}
|
|
|
|
|
2023-07-06 05:07:34 +02:00
|
|
|
|
|
|
|
<div class="well col-sm-5 post-it" style="margin: 30px;">
|
|
|
|
|
|
|
|
<div class="col-sm-1">
|
|
|
|
{% if post.avatar != None %}
|
|
|
|
<img src="/profil/{{ post.author }}/{{ post.avatar }}" class="img-rounded" alt="" width="50" height="50"/>
|
|
|
|
{% endif %}
|
2022-08-06 18:22:24 +02:00
|
|
|
|
2023-07-06 05:07:34 +02:00
|
|
|
<br><br>
|
|
|
|
<p> {{ post.author }} </p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-8 content" style="margin: 10px;">
|
|
|
|
<h6>{{ post.time }}</h6>
|
|
|
|
<h1>{{ post.title }}</h1>
|
|
|
|
{{ post.content[0:100]|safe }} ...
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
<button type="button" class="btn btn-default btn-primary" data-toggle="modal" data-target="#{{ post.id_postit }}"> Déplier </button>
|
|
|
|
</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', title=post.title, time=post.time) }}"><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', title=post.title, time=post.time ) }}"><button type="button" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button></a><br /><br>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-08-06 18:22:24 +02:00
|
|
|
|
2023-07-06 05:07:34 +02:00
|
|
|
</div>
|
2022-08-06 18:22:24 +02:00
|
|
|
|
2023-07-06 05:07:34 +02:00
|
|
|
<!-- Modal -->
|
|
|
|
<div class="modal fade" id="{{ post.id_postit }}" role="dialog">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
|
|
|
<!-- Modal content-->
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
|
<h4 class="modal-title">{{ post.title }}</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
{{ post.content|safe }}
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
2022-08-06 18:22:24 +02:00
|
|
|
</div>
|
2023-07-06 05:07:34 +02:00
|
|
|
|
|
|
|
</div>
|
2022-08-06 18:22:24 +02:00
|
|
|
</div>
|
2023-07-06 05:07:34 +02:00
|
|
|
|
2022-08-06 18:22:24 +02:00
|
|
|
{% endfor %}
|
2023-07-06 05:07:34 +02:00
|
|
|
</div>
|
|
|
|
|
2022-08-06 18:22:24 +02:00
|
|
|
{% endblock %}
|