{% extends "squad/base.jinja2" %}

{% block content %}
<h2 class="page-header well">{{ _('All groups') }}</h2>

{% if user.is_authenticated %}
<div style='margin-top: 2em; margin-bottom: 2em;'>
    <a class='btn btn-default' href="{{url("new-group")}}">{{ _('New group') }}</a>
</div>

{% endif %}
<div class='highlight-row'>
{% for group in groups %}
<div class="row row-bordered project">
    <a href="{{group_url(group)}}">
    <div class="col-md-3 col-sm-3">
        <strong>
            {{group.display_name}}
        </strong>
    </div>
    <div class="col-md-6 col-sm-6">
        <p>
        {{group.description|default("")|truncatechars_html(250)}}
        </p>
    </div>
    <div class="col-md-3 col-sm-3">
        {{ (_('%s projects') % ('<span class="badge" data-toggle="tooltip" data-placement="top" title="">%d</span>' % group.project_count)) | safe}}
    </div>
    </a>
</div>
{% endfor %}
</div>

{% endblock %}
