Commit aa0c1fda authored by serhii.myronets's avatar serhii.myronets
Browse files

Issue #3260424 by agami4: Improve follow/message buttons on the profile teaser

parent a47aaef6
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
 */
#}


{{ attach_library('socialbase/teaser')}}

<div class="card teaser">
@@ -91,16 +92,23 @@
        {% if content.flag_follow_user %}
          {{ content.flag_follow_user }}
        {% endif %}
        <a href="{{ profile_contact_url }}" class="card__link">

        {% 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 not content.flag_follow_user %}
              {% trans %}Private{% endtrans %}
            {% endif %}
              {% trans %}message{% endtrans %}
          {% else %}
            {% trans %}View profile{% endtrans %}
            {% if not content.flag_follow_user %}{% trans %}View profile{% endtrans %}{% endif %}
          {% 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>