Skip to content
Snippets Groups Projects
Commit 53450d81 authored by vnech's avatar vnech Committed by Serhii Myronets
Browse files

Issue #3260424 by vnech: Display "Follow/Unfollow" button on user profile display modes

parent 4ca80c76
No related branches found
No related tags found
No related merge requests found
......@@ -94,16 +94,28 @@
<div class="card__actionbar">
{% block card_actionbar %}
<a href="{{ profile_contact_url }}" class="card__link">
{% if content.flag_follow_user %}
{{ attach_library('social_follow_user/button') }}
{{ content.flag_follow_user }}
{% endif %}
{% set follow_user_classes = [ content.flag_follow_user ? 'btn btn-default btn-sm' : 'card__link' ] %}
<a href="{{ profile_contact_url }}" {{ attributes.addClass(follow_user_classes) }}>
{% if profile_contact_label == 'private_message' %}
{% trans %}Private message{% endtrans %}
{% if content.flag_follow_user %}
{% trans %}Message{% endtrans %}
{% else %}
{% trans %}Private message{% endtrans %}
{% endif %}
{% else %}
{% trans %}View profile{% endtrans %}
{% endif %}
</a>
<a href="{{ profile_stream_url }}" class="card__link hidden-for-phone-only">
{% trans %}View activities{% endtrans %}
</a>
{% if not content.flag_follow_user %}
<a href="{{ profile_stream_url }}" class="card__link hidden-for-phone-only">
{% trans %}View activities{% endtrans %}
</a>
{% endif %}
{% endblock %}
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment