{% extends "base.html" %}
{% block title %}{{ config.root_title }}{% endblock %}
{% block content %}
<div class="table-responsive">
<table class="repositories">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
{% if config.enable_index_owner %}
<th>Owner</th>
{% endif %}
<th>Idle</th>
{% if config.enable_index_links %}
<th>Links</th>
{% endif %}
</tr>
</thead>
<tbody>
{%- for (path, repositories) in repositories %}
{%- if let Some(path) = path %}
<tr><td class="repo-section" colspan="4">{{ path }}</td></tr>
{%- endif -%}
{%- for repository in repositories %}
{% set repository = repository.get() %}
<tr class="{% if path.is_some() %}has-parent{% endif %}">
<td>
<a href="/{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}">
{{- repository.name -}}
</a>
</td>
<td>
<a href="/{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}">
{%- if let Some(description) = repository.description -%}
{% if config.max_repo_desc_length > 0 %}
{{- description|truncate(config.max_repo_desc_length.clone()) -}}
{% else %}
{{- description -}}
{% endif %}
{%- else -%}
Unnamed repository; edit this file 'description' to name the repository.
{%- endif -%}
</a>
</td>
{% if config.enable_index_owner %}
<td>
<a href="/{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}">
{%- if let Some(owner) = repository.owner -%}
{{- owner -}}
{%- endif -%}
</a>
</td>
{% endif %}
<td>
<a href="/{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}">
<time datetime="{{ repository.last_modified|format_time }}" title="{{ repository.last_modified|format_time }}">
{{- repository.last_modified.clone()|timeago -}}
</time>
</a>
</td>
{% if config.enable_index_links %}
<td>
<a class="index-link" href="{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}">summary</a>
<a class="index-link" href="{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}/log">log</a>
<a class="index-link" href="{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}/tree">tree</a>
</td>
{% endif %}
</tr>
{%- endfor -%}
{%- endfor %}
</tbody>
</table>
</div>
{% endblock %}