{% extends "base.html" %}
{% load i18n %}
{% load markup %}

{% block title %}{% trans "Company" %}{% endblock %}

{% block page-title %}
  {{ company.name }}
{% endblock %}

{% block sub-navigation %}
  <ul>
    <li><a href="/company/phonelist">{% trans "Phone list" %}</a> |</li>
    <li><a href="/company/books">{% trans "Books" %}</a> |</li>
    <li><a href="/company/hardware">{% trans "Hardware" %}</a> |</li>
    <li><a href="/company/software">{% trans "Software" %}</a> |</li>
  </ul>
{% endblock %}

{% block content %}
  <table>
    <tr><td><h3>{% trans "Contact" %}</h3></td></tr>
    <tr>
      <th><label for="id_first_name">{% trans "Address" %}:</label></th>
      <td>{{ company.address.get_addressstring|markdown }}</td>
    </tr>
    {% if company.communication %}
      <tr><td><h3>{% trans "Communication" %}</h3></td></tr>
      {% if company.communication.url %}
        <tr>
          <th><label for="id_first_name">{% trans "Homepage" %}:</label></th>
          <td><a href="{{ company.communication.url }}">{{ company.communication.url }}</a></td>
        </tr>
      {% endif %}
      {% if company.communication.email %}
        <tr>
          <th><label for="id_first_name">{% trans "Email" %}:</label></th>
          <td><a href="mailto:{{ company.communication.email }}">{{ company.communication.email }}</a></td>
        </tr>
      {% endif %}
      {% if company.communication.phone_landline %}
        <tr>
          <th><label for="id_first_name">{% trans "Telephone" %}:</label></th>
          <td>{{ company.communication.phone_landline }}</td>
        </tr>
      {% endif %}
      {% if company.communication.phone_mobile %}
        <tr>
          <th><label for="id_first_name">{% trans "Telephone (mobile)" %}:</label></th>
          <td>{{ company.communication.phone_mobile }}</td>
        </tr>
      {% endif %}
      {% if company.communication.fax %}
        <tr>
          <th><label for="id_first_name">{% trans "Fax" %}:</label></th>
          <td>{{ company.communication.fax }}</td>
        </tr>
      {% endif %}
    {% endif %}
  </table>
{% endblock %}
