Skip to content
Snippets Groups Projects
Commit acc92bda authored by Taras Kruts's avatar Taras Kruts
Browse files

Issue #3083877 by ribel: Add group statistic block

parent aecccddc
No related branches found
No related tags found
No related merge requests found
{{ attach_library('socialbase/hero') }}
{{ attach_library('socialblue/hero--sky') }}
{% set cover_classes = [
'cover hero__group',
group_hero_styled_image_url ? 'cover-img cover-img-gradient',
] %}
<div{{ attributes.addClass(cover_classes) }} {% if group_hero_styled_image_url %} style="background-image: url('{{ group_hero_styled_image_url }}');" {% endif %}>
<div class="hero__bgimage-overlay"></div>
{% if group_edit_url %}
<div class="hero-action-button">
<a href="{{ group_edit_url }}" title="{% trans %}Edit group{% endtrans %}" class="btn btn-default btn-floating">
<svg class="icon-gray icon-medium">
<use xlink:href="#icon-edit"></use>
</svg>
</a>
</div>
{% endif %}
<div class="cover-wrap">
<header class="page-title">
{% if group_type %}
<div class="teaser__tag">
{{ group_type }}
</div>
{% endif %}
<h1>{{ content.label }}</h1>
</header>
<footer class="hero-footer">
<div class="hero-footer__text">
{% if content.field_group_location|render is not empty and content.field_group_address|render is not empty %}
<svg class="hero-footer-icon">
<use xlink:href="#icon-location"></use>
</svg>
{% endif %}
<span class="inline-center">
{{ content.field_group_location }}
{% if content.field_group_location|render is not empty and content.field_group_address|render is not empty %} &bullet;{% endif %}
{{ content.field_group_address }} </span>
</div>
</footer>
</div> {# cover-wrap #}
</div> {# cover #}
<div class="card__counter">
<ul>
<li>
<span class="card__counter-quantity">{{ group_events }}</span>
<span class="card__counter-text">{% trans %}event{% plural group_events %}events{% endtrans %}</span>
</li>
<li>
<span class="card__counter-quantity">{{ group_topics }}</span>
<span class="card__counter-text">{% trans %}topic{% plural group_topics %}topics{% endtrans %}</span>
</li>
<li>
<span class="card__counter-quantity">{{ group_members }}</span>
<span class="card__counter-text">{% trans %}member{% plural group_members %}members{% endtrans %}</span>
</li>
</ul>
</div>
{% if group_operations_url %}
<div class="hero-footer__cta">
<div class="btn-group">
{% if joined %}
<button type="button" autocomplete="off" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-accent btn-lg btn-raised dropdown-toggle">{% trans with {'context': 'Is a member'} %}Joined{% endtrans %}<span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="{{ group_operations_url }}">{% trans %}Leave group{% endtrans %}</a></li>
</ul>
{% elseif closed_group %}
<a href="{{ group_operations_url }}" class="btn btn-accent disabled" title="{{ cta }}">{{ cta }}</a>
{% else %}
<a href="{{ group_operations_url }}" class="btn btn-accent" title="{% trans %}Join{% endtrans %}">{% trans %}Join{% endtrans %}</a>
{% endif %}
</div>
</div>
{% endif %}
{% if group_stream_url %}
<footer class="card__actionbar">
<a href="{{ group_stream_url }}" class="card__link card__link-arrow">
{% trans %}See group stream{% endtrans %}
</a>
</footer>
{% endif %}
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