Amélioration des post-it Ajout supp son compte
This commit is contained in:
@@ -5,29 +5,67 @@
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
{% for post in posts %}
|
||||
{% if post.nom != None %}
|
||||
<div class="well">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-2">
|
||||
<img src="/profil/{{post.author}}/{{ post.avatar }}" height="100" width="100" 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="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 %}
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user