group--statistic.html.twig 3.81 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% block group_statistics %}
  <div class="card__counter">
    <ul>
      <li>
        <span class="card__counter-quantity">{{ group_members }}</span>
        <span class="card__counter-text">{% trans %}member{% plural group_members %}members{% endtrans %}</span>
      </li>
      <li>
        <span class="card__counter-quantity">{{ group_events }}</span>
        <span class="card__counter-text">{{ group_events_label }}</span>
      </li>
      <li>
        <span class="card__counter-quantity">{{ group_topics }}</span>
        <span class="card__counter-text">{{ group_topics_label }}</span>
      </li>
    </ul>
  </div>
{% endblock %}
{% block group_statistics_operations %}
  {% if group_operations_url %}
    <div class="hero-footer__cta">
      {# We probably don't need .btn-group here but I can't figure out why it's needed
         so it's only removed for the new user_is_invited set-up #}
      {% if user_is_invited %}
        <div class="dropdown form-group-inline">
      {% else %}
        <div class="btn-group">
      {% endif %}
      {#The above was intentionally not merged with the below!#}
          {% if user_is_invited %}
31

32
33
            <a href="{{ group_invite_accept_operations_url }}" class="form-item btn btn-accent btn-lg btn-raised" title="{% trans %}Join{% endtrans %}">{% trans %}Accept{% endtrans %}</a>
            <button type="button" autocomplete="off" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-accent btn-lg btn-raised waves-effect waves-btn waves-light margin-left-m dropdown-toggle"><span class="caret"></span></button>
34
            <ul class="dropdown-menu dropdown-menu-right">
35
                <li><a href="{{ group_invite_decline_operations_url }}">{% trans %}Decline{% endtrans %}</a></li>
36
            </ul>
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
          {% elseif joined %}
          <button type="button" autocomplete="off" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-accent btn-block 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 %}
          {% if allow_request %}
            {% if requested %}
              <button type="button" autocomplete="off" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-accent  btn-block btn-lg btn-raised dropdown-toggle">{% trans %}Request sent{% endtrans %}<span class="caret"></span></button>
              <ul class="dropdown-menu dropdown-menu-right">
                <li><a href="{{ group_operations_url }}">{% trans %}Cancel request{% endtrans %}</a></li>
              </ul>
            {% else %}
              <a href="{{ group_operations_url }}" class="btn btn-accent btn-block use-ajax" title="{% trans %}Request to join{% endtrans %}">{% trans %}Request to join{% endtrans %}</a>
            {% endif %}
52
          {% else %}
53
            <a href="{{ group_operations_url }}" class="btn btn-accent btn-block disabled" title="{{ cta }}">{{ cta }}</a>
54
          {% endif %}
55
56
        {% elseif anonymous_request %}
          <a href="{{ group_operations_url }}" class="btn btn-accent btn-block use-ajax" title="{% trans %}Request to join{% endtrans %}">{% trans %}Request to join{% endtrans %}</a>
57
        {% else %}
58
          <a href="{{ group_operations_url }}" class="btn btn-accent btn-block" title="{% trans %}Join{% endtrans %}">{% trans %}Join{% endtrans %}</a>
59
        {% endif %}
60
      </div>
61
    </div>
62
63
64
65
  {% endif %}
{% endblock %}
{% block group_statistics_footer %}
  <footer class="card__actionbar">
66
    <a href="{{ about_url }}" class="card__link">
67
68
69
      {% trans %}See group information{% endtrans %}
    </a>
  </footer>
70
{% endblock %}