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
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -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' %}
            {% if content.flag_follow_user %}
              {% trans %}Message{% endtrans %}
            {% else %}
              {% trans %}Private message{% endtrans %}
            {% endif %}
          {% else %}
            {% trans %}View profile{% endtrans %}
          {% endif %}
        </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>