{% load i18n %}
{% load permissions %}
{% load translations %}
{% load urlformat %}

<tr>
<th>{% trans "Project website" %}</th>
<td class="full-cell"><a href="{{ object.web }}">{{ object.web | urlformat }}</a></td>
</tr>

{% if object.mail %}
<tr>
<th>{% trans "Mailing list for translators" %}</th>
<td class="full-cell"><a href="mailto:{{ object.mail }}">{{ object.mail }}</a></td>
</tr>
{% endif %}

{% if object.instructions %}
<tr>
<th>{% trans "Instructions for translators" %}</th>
<td class="full-cell">{{ object.instructions|markdown }}</td>
</tr>
{% endif %}

{% perm 'billing.view' object as user_can_view_billing %}

{% if user_can_view_billing %}
{% if object.billings %}
<tr>
<th>{% trans "Billing" %}</th>
<td class="full-cell">
{% for billing in object.billings %}
  <a href="{{ billing.get_absolute_url }}">{{ billing.plan }}
    {% if billing.is_trial %}
      <span class="badge">{% trans "Trial" %}</span>
    {% endif %}
    {% if not billing.is_active %}
      <span class="badge">{% trans "Expired" %}</span>
    {% endif %}
  </a>
{% endfor %}
</td>
</tr>
{% endif %}
{% endif %}
