{% load i18n sizeformat %}

<div class="detail">
  <dl class="dl-horizontal">
      <dt>{% trans "Name" %}</dt>
      <dd>{{ job.name }}</dd>
      <dt>{% trans "Project ID" %}</dt>
      {% if job.tenant_id %}
      <dd>{{ job.tenant_id }}</dd>
      {% else %}
      <dd>{{ job.project_id }}</dd>
      {% endif %}
      <dt>{% trans "ID" %}</dt>
      <dd>{{ job.id }}</dd>
      <dt>{% trans "Type" %}</dt>
      <dd>{{ job.type }}</dd>
      <dt>{% trans "Description" %}</dt>
      <dd>{{ job.description|default:_("None") }}</dd>
      <dt>{% trans "Public" %}</dt>
      <dd>{{ job.is_public|yesno }}</dd>
      <dt>{% trans "Protected" %}</dt>
      <dd>{{ job.is_protected|yesno }}</dd>
      <dt>{% trans "Mains" %}</dt>
      {% for main in job.mains %}
        <dd><a href="{% url 'horizon:project:data_processing.jobs:jb-details' main.id  %}">{{ main.name }}</a></dd>
      {% empty %}
        <dd>{% trans "None" %}</dd>
      {% endfor %}
      <dt>{% trans "Libs" %}</dt>
      {% for lib in job.libs %}
        <dd><a href="{% url 'horizon:project:data_processing.jobs:jb-details' lib.id  %}">{{ lib.name }}</a></dd>
      {% empty %}
        <dd>{% trans "None" %}</dd>
      {% endfor %}
      <dt>{% trans "Created time" %}</dt>
      <dd>{{ job.created_at|parse_isotime }}</dd>
      <dt>{% trans "Updated time" %}</dt>
      <dd>{{ job.updated_at|parse_isotime|default:_("Never") }}</dd>
  </dl>
</div>
