diff --git a/trombi/templates/trombi/user_tools.jinja b/trombi/templates/trombi/user_tools.jinja index 19056111..0a45742b 100644 --- a/trombi/templates/trombi/user_tools.jinja +++ b/trombi/templates/trombi/user_tools.jinja @@ -38,18 +38,18 @@
{{ u.user.get_display_name() }}
{% if trombi.show_profiles %} -
- {% trans %}Profile{% endtrans %} -
+
+ {% trans %}Profile{% endtrans %} +
{% endif %}
{% if can_comment %} - {% set comment = u.received_comments.filter(author__id=user.trombi_user.id).first() %} - {% if comment %} - {% trans %}Edit comment{% endtrans %} - {% else %} - {% trans %}Comment{% endtrans %} - {% endif %} + {% set comment = u.received_comments.filter(author__id=user.trombi_user.id).first() %} + {% if comment %} + {% trans %}Edit comment{% endtrans %} + {% else %} + {% trans %}Comment{% endtrans %} + {% endif %} {% endif %}
diff --git a/trombi/views.py b/trombi/views.py index 590d98fc..e5275799 100644 --- a/trombi/views.py +++ b/trombi/views.py @@ -462,8 +462,10 @@ class UserTrombiProfileView(TrombiTabsMixin, DetailView): def get(self, request, *args, **kwargs): self.object = self.get_object() + if ( - self.object.trombi.id != request.user.trombi_user.trombi.id + request.user.is_anonymous + or self.object.trombi.id != request.user.trombi_user.trombi.id or self.object.user.id == request.user.id or not self.object.trombi.show_profiles ):