Fix logged-out user page
This commit is contained in:
parent
361d3fc33a
commit
2f64c87d56
1 changed files with 14 additions and 12 deletions
|
@ -79,6 +79,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_media %}
|
{% block js_media %}
|
||||||
|
{% if request.user.is_authenticated %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#message-button").on("click", function() {
|
$("#message-button").on("click", function() {
|
||||||
|
@ -92,6 +93,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
{% block user_js_media %}{% endblock %}
|
{% block user_js_media %}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -102,7 +104,7 @@
|
||||||
<img src="{{ gravatar(user, 145) }}" width="145px" height="145px">
|
<img src="{{ gravatar(user, 145) }}" width="145px" height="145px">
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
{% if request.user != user.user %}
|
{% if request.user.is_authenticated and request.profile != user %}
|
||||||
<form method="post" action="{{ url('user_toggle_follow', user.username) }}">
|
<form method="post" action="{{ url('user_toggle_follow', user.username) }}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button class="small {{ 'unfollow' if followed else 'follow' }}" style="width:145px">
|
<button class="small {{ 'unfollow' if followed else 'follow' }}" style="width:145px">
|
||||||
|
|
Loading…
Reference in a new issue