OXYGENHUB
◆ run-one-job oxygenhub / templates / dashboard.html
3.8 KiB · HTML · last changed Profile and organisation pages, with identicons 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Dashboard{% endblock %}
3
{% block content %}
4
<div class="head">
5
  <h1>Dashboard <small>signed in as {% if let Some(u) = shell.user %}{{ u }}{% endif %}</small></h1>
6
</div>
7
<div class="side-layout dash">
8
  <div>
9
    <h2>Waiting for your review <small>{{ reviews.len() }}</small></h2>
10
    {% if reviews.is_empty() %}
11
    <p class="empty small">Nothing waits on you. Proposals by others in your repositories land here until you review them.</p>
12
    {% else %}
13
    <ul class="rows">
14
    {% for p in reviews %}
15
      <li>
16
        <div>
17
          <a class="name" href="/{{ p.owner }}/{{ p.name }}/proposal/{{ p.number }}"><span class="mute">{{ p.owner }}/{{ p.name }} #{{ p.number }}</span> <strong>{{ p.title }}</strong></a>
18
          {% if p.conflicted %}<span class="tag bad">conflicts</span>{% endif %}
19
          <p class="small">by {{ p.author }}</p>
20
        </div>
21
        <div class="right small">updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></div>
22
      </li>
23
    {% endfor %}
24
    </ul>
25
    {% endif %}
26
27
    {% if !authored.is_empty() %}
28
    <h2>Your proposals <small>{{ authored.len() }}</small></h2>
29
    <ul class="rows">
30
    {% for p in authored %}
31
      <li>
32
        <div>
33
          <a class="name" href="/{{ p.owner }}/{{ p.name }}/proposal/{{ p.number }}"><span class="mute">{{ p.owner }}/{{ p.name }} #{{ p.number }}</span> <strong>{{ p.title }}</strong></a>
34
          {% if p.state == "draft" %}<span class="tag">draft</span>{% endif %}
35
          {% if p.conflicted %}<span class="tag bad">conflicts</span>{% endif %}
36
        </div>
37
        <div class="right small">updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></div>
38
      </li>
39
    {% endfor %}
40
    </ul>
41
    {% endif %}
42
43
    {% if !assigned.is_empty() %}
44
    <h2>Issues assigned to you <small>{{ assigned.len() }}</small></h2>
45
    <ul class="rows">
46
    {% for i in assigned %}
47
      <li>
48
        <div><a class="name" href="/{{ i.owner }}/{{ i.name }}/issue/{{ i.number }}"><span class="mute">{{ i.owner }}/{{ i.name }} #{{ i.number }}</span> <strong>{{ i.title }}</strong></a></div>
49
        <div class="right small">updated <time title="{{ i.updated_ms|when_i }}">{{ i.updated_ms|ago_i }}</time></div>
50
      </li>
51
    {% endfor %}
52
    </ul>
53
    {% endif %}
54
55
    <h2>Recent activity</h2>
56
    {% if feed.is_empty() %}
57
    <p class="empty small">No activity yet. Push to a repository and it shows here.</p>
58
    {% else %}
59
    <ul class="feed">
60
    {% for a in feed %}
61
      <li>
62
        <span class="who">{% if a.actor.is_empty() %}the hub{% else %}<img class="avatar xs" src="/avatar/{{ a.actor }}" alt=""> <a href="/{{ a.actor }}">{{ a.actor }}</a>{% endif %}</span>
63
        {% if a.kind == "push" %}pushed <span class="lbl lbl-bm">{{ a.event }}</span> to
64
        {% else if a.kind == "release" %}published <a href="{{ a.url() }}">{{ a.title }}</a> in
65
        {% else %}{{ a.event }} {{ a.kind }} <a href="{{ a.url() }}">#{{ a.number }} {{ a.title }}</a> in
66
        {% endif %}
67
        <a href="/{{ a.owner }}/{{ a.name }}">{{ a.owner }}/{{ a.name }}</a>
68
        <time class="mute small" title="{{ a.at_ms|when_i }}">{{ a.at_ms|ago_i }}</time>
69
      </li>
70
    {% endfor %}
71
    </ul>
72
    {% endif %}
73
  </div>
74
  <aside class="side">
75
    <div class="bar"><h3>Your repositories</h3><a class="go small" href="/new">new</a></div>
76
    {% if mine.is_empty() %}
77
    <p class="small mute">None yet. <a href="/new">Create one</a>, or <a href="/explore">explore</a>.</p>
78
    {% else %}
79
    <ul class="plain">
80
    {% for r in mine %}
81
      <li><a href="/{{ r.owner }}/{{ r.name }}"><span class="mute">{{ r.owner }} /</span> {{ r.name }}</a>{% if r.visibility != "public" %} <span class="tag">{{ r.visibility }}</span>{% endif %}</li>
82
    {% endfor %}
83
    </ul>
84
    {% endif %}
85
  </aside>
86
</div>
87
{% endblock %}