profile--profile--teaser.html.twig in Open Social 8.3
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8.2 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8.4 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8.5 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8.6 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8.7 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
- 8.8 themes/socialbase/templates/profile/profile--profile--teaser.html.twig
Default theme implementation for profiles.
Available variables:
- content: Items for the content of the profile. Use 'content' to print them all, or print a subset such as 'content.title'. Use the following code to exclude the printing of a given child element:
{{ content|without('title') }}
- attributes: HTML attributes for the wrapper.
- profile: The profile object.
- url: The profile URL.
File
themes/socialbase/templates/profile/profile--profile--teaser.html.twigView source
- {#
- /**
- * @file
- *
- * Default theme implementation for profiles.
- *
- * Available variables:
- * - content: Items for the content of the profile.
- * Use 'content' to print them all, or print a subset such as
- * 'content.title'. Use the following code to exclude the
- * printing of a given child element:
- * @code
- * {{ content|without('title') }}
- * @endcode
- * - attributes: HTML attributes for the wrapper.
- * - profile: The profile object.
- * - url: The profile URL.
- *
- * @ingroup themeable
- */
- #}
- {{ attach_library('socialbase/teaser')}}
- <div class="card teaser">
- <a href="{{ profile_stream_url }}" class="teaser__image">
- {% if content.field_profile_image %}
- {{ content.field_profile_image }}
- {% endif %}
- </a>
- <div class="teaser__body">
- <div class="teaser__content">
- <h4 class="teaser__title">
- <a href="{{ profile_stream_url }}">
- {{ profile_name }}
- </a>
- </h4>
- {% if content.field_profile_function|render or content.field_profile_organization|render %}
- <div class="teaser__content-line">
- <svg class="teaser__content-type-icon">
- <use xlink:href="#icon-business_center"></use>
- </svg>
- <span class="teaser__content-text">
- {% if content.field_profile_organization|render %}
- {{ '@function at @organization'|t({'@function': content.field_profile_function|render, '@organization': content.field_profile_organization|render}) }}
- {% else %}
- {{ content.field_profile_function }}
- {% endif %}
- </span>
- </div>
- {% endif %}
-
- {% if content.field_profile_profile_tag['#items'] or badges %}
- <div style="margin-left: 30px; margin-top: 5px;">
- {% for badge in badges %}
- {% set badge_classes = badge.classes|merge(['badge']) %}
- <div{{ attributes.addClass(badge_classes) }}>{{ badge.label }}</div>
- {% endfor %}
- {% for item in content.field_profile_profile_tag['#items'] %}
- <div class="badge badge-default">{{ item.entity.label }}</div>
- {% endfor %}
- </div>
- {% endif %}
-
- </div>
-
- <div class="card__actionbar">
- <a href="{{ profile_contact_url }}" class="card__link">
- {% if profile_contact_label == 'private_message' %}
- {% trans %}Private message{% endtrans %}
- {% else %}
- {% trans %}View profile{% endtrans %}
- {% endif %}
- </a>
- <a href="{{ profile_stream_url }}" class="card__link hidden-for-phone-only">
- {% trans %}View activities{% endtrans %}
- </a>
- </div>
- </div>
- </div>