index : gitrs
A lightweight web interface for browsing Git repositories, implemented in Rust
about summary refs log tree commit diff
gitrs / templates / repositorys.html
-rw-r--r-- blob 93c40c7b815350b6d20ead32aa29d895d296d084 1742 bytes (plain)
1
{% extends "base.html" %}
2
3
{% block title %}y2w8 Repos{% endblock %}
4
5
{% block header %}
6
  {{ macros::header() }}
7
{% endblock %}
8
9
{% block tabs %}
10
<tr>
11
  <td>
12
    <a href="/" class="active">index</a>
13
    <a href="/about">about</a>
14
  </td>
15
  <td class="form">
16
    <form method="get" action="/">
17
      <input type="search" name="v" size="10" value="">
18
      <input type="submit" value="search">
19
    </form>
20
  </td>
21
</tr>
22
{% endblock %}
23
24
{% block content %}
25
<table>
26
    <thead>
27
        <tr>
28
          <th>Name</th>
29
          <th>Description</th>
30
          <th>Owner</th>
31
          <th class="sort-asc" aria-sort="ascending">Idle</th>
32
          <th>Links</th>
33
        </tr>
34
    </thead>
35
    <tbody>
36
        {% for repo in repos %}
37
        <tr>
38
            <td><a href="/{{ repo.name }}/">{{ repo.name }}</a></td>
39
            <td><a href="/{{ repo.name }}/">{{ repo.description }}</a></td>
40
            <td>{% if let Some(owner) = repo.owner %}{{ owner }}{% endif %}</td>
41
            {% let gix_repo = repo.gix() %}
42
            {% if let Some(last_commit) = repo.last_commit(gix_repo)? %}
43
              {% let time = last_commit.committer.time.format_relative() %}
44
              <td data-sort="-{{ last_commit.committer.time.seconds() }}">
45
                <span class="{{ time.1 }}" title="{{ last_commit.committer.time.format() }}">{{ time.0 }}</span>
46
              </td>
47
            {% else %}
48
              <td data-sort="999999999999">
49
                <span class="stale">Unknown</span>
50
              </td>
51
            {% endif %}
52
            <td><a href="/{{ repo.name }}/">summary</a><a href="/{{ repo.name }}/log/">log</a><a href="/{{ repo.name }}/tree/">tree</a></td>
53
        </tr>
54
        {% endfor %}
55
    </tbody>
56
</table>
57
{% endblock %}