edit profile so that it shows the number of posts written by a specific user
This commit is contained in:
		
							parent
							
								
									8cfcdc832c
								
							
						
					
					
						commit
						3f4bdff449
					
				| 
						 | 
					@ -3,7 +3,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
    {% include 'flash.html' %}
 | 
					    {% include 'flash.html' %}
 | 
				
			||||||
    <div class="well well-large" style="height: 140px;">
 | 
					    <div class="well well-large" style="height: 190px;">
 | 
				
			||||||
        <div class="pull-right">
 | 
					        <div class="pull-right">
 | 
				
			||||||
            <img src="{{ user.avatar(128) }}" class="img-polaroid">
 | 
					            <img src="{{ user.avatar(128) }}" class="img-polaroid">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
| 
						 | 
					@ -12,6 +12,7 @@
 | 
				
			||||||
        {% if user.last_seen %}
 | 
					        {% if user.last_seen %}
 | 
				
			||||||
        <p><em>{{ _('Last seen:') }} {{ momentjs(user.last_seen).calendar() }}</em></p>
 | 
					        <p><em>{{ _('Last seen:') }} {{ momentjs(user.last_seen).calendar() }}</em></p>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
 | 
							<p> number of posts written: {{ user.posts.count() }} </p>
 | 
				
			||||||
        <p>{{ _('Followers:') }} {{ user.followers.count() - 1 }} | {{ _('Following:') }} {{ user.followed.count() - 1 }} |
 | 
					        <p>{{ _('Followers:') }} {{ user.followers.count() - 1 }} | {{ _('Following:') }} {{ user.followed.count() - 1 }} |
 | 
				
			||||||
        {% if user.id == g.user.id %}
 | 
					        {% if user.id == g.user.id %}
 | 
				
			||||||
            <a href="{{ url_for('edit') }}">{{ _('Edit your profile') }}</a>
 | 
					            <a href="{{ url_for('edit') }}">{{ _('Edit your profile') }}</a>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue