72 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% extends 'up_squelette.html' %}
 | 
						|
 | 
						|
 | 
						|
{% block main %}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<div class="row">
 | 
						|
{% for post in posts %}
 | 
						|
 | 
						|
  
 | 
						|
<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>
 | 
						|
 | 
						|
{% endfor %}
 | 
						|
 </div>
 | 
						|
 | 
						|
{% endblock %}
 |