OXYGENHUB
◆ v0.8.0 oxygenhub / templates / dashboard.html
4.5 KiB · HTML · last changed Live L4: the bell, the inbox and the dashboard (closes #206); /metrics, first slice (refs #212) 18 days ago source blame history raw
25ab8c73 Andy McCall ↶ 1
{% extends "base.html" %}
2
{% block title %}Dashboard{% endblock %}
3
{% block content %}
6246d1e5 Andy McCall ↶ 4
<script type="application/json" id="backdrop-data">{{ backdrop|safe }}</script>
0a3b244b Andy McCall ↶ 5
{% include "backdrop.html" %}
25ab8c73 Andy McCall ↶ 6
<div class="head">
7
  <h1>Dashboard <small>signed in as {% if let Some(u) = shell.user %}{{ u }}{% endif %}</small></h1>
8
</div>
6907a989 Andy McCall ↶ 9
<div class="side-layout rev dash" data-backdrop-avoid>
25ab8c73 Andy McCall ↶ 10
  <div>
8a48dd83 Andy McCall ↶ 11
  <div data-live="{{ live }}" data-fragment="cards">
f8cf54e9 Andy McCall ↶ 12
    <section class="card-box">
13
    <div class="card-head"><h2>Waiting for your review</h2><span class="count-chip">{{ reviews.len() }}</span></div>
25ab8c73 Andy McCall ↶ 14
    {% if reviews.is_empty() %}
15
    <p class="empty small">Nothing waits on you. Proposals by others in your repositories land here until you review them.</p>
16
    {% else %}
17
    <ul class="rows">
18
    {% for p in reviews %}
19
      <li>
20
        <div>
21
          <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>
22
          {% if p.conflicted %}<span class="tag bad">conflicts</span>{% endif %}
23
          <p class="small">by {{ p.author }}</p>
24
        </div>
25
        <div class="right small">updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></div>
26
      </li>
27
    {% endfor %}
28
    </ul>
29
    {% endif %}
f8cf54e9 Andy McCall ↶ 30
    </section>
25ab8c73 Andy McCall ↶ 31
32
    {% if !authored.is_empty() %}
f8cf54e9 Andy McCall ↶ 33
    <section class="card-box">
34
    <div class="card-head"><h2>Your proposals</h2><span class="count-chip">{{ authored.len() }}</span></div>
25ab8c73 Andy McCall ↶ 35
    <ul class="rows">
36
    {% for p in authored %}
37
      <li>
38
        <div>
39
          <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>
40
          {% if p.state == "draft" %}<span class="tag">draft</span>{% endif %}
41
          {% if p.conflicted %}<span class="tag bad">conflicts</span>{% endif %}
42
        </div>
43
        <div class="right small">updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></div>
44
      </li>
45
    {% endfor %}
46
    </ul>
f8cf54e9 Andy McCall ↶ 47
    </section>
25ab8c73 Andy McCall ↶ 48
    {% endif %}
49
50
    {% if !assigned.is_empty() %}
f8cf54e9 Andy McCall ↶ 51
    <section class="card-box">
52
    <div class="card-head"><h2>Issues assigned to you</h2><span class="count-chip">{{ assigned.len() }}</span></div>
25ab8c73 Andy McCall ↶ 53
    <ul class="rows">
54
    {% for i in assigned %}
55
      <li>
56
        <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>
57
        <div class="right small">updated <time title="{{ i.updated_ms|when_i }}">{{ i.updated_ms|ago_i }}</time></div>
58
      </li>
59
    {% endfor %}
60
    </ul>
f8cf54e9 Andy McCall ↶ 61
    </section>
25ab8c73 Andy McCall ↶ 62
    {% endif %}
63
8a48dd83 Andy McCall ↶ 64
  </div>
65
    <section class="card-box" data-live="{{ live }}" data-fragment="feed">
f8cf54e9 Andy McCall ↶ 66
    <div class="card-head"><h2>Recent activity</h2></div>
25ab8c73 Andy McCall ↶ 67
    {% if feed.is_empty() %}
68
    <p class="empty small">No activity yet. Push to a repository and it shows here.</p>
69
    {% else %}
70
    <ul class="feed">
71
    {% for a in feed %}
72
      <li>
10174045 Andy McCall ↶ 73
        <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>
25ab8c73 Andy McCall ↶ 74
        {% if a.kind == "push" %}pushed <span class="lbl lbl-bm">{{ a.event }}</span> to
75
        {% else if a.kind == "release" %}published <a href="{{ a.url() }}">{{ a.title }}</a> in
76
        {% else %}{{ a.event }} {{ a.kind }} <a href="{{ a.url() }}">#{{ a.number }} {{ a.title }}</a> in
77
        {% endif %}
78
        <a href="/{{ a.owner }}/{{ a.name }}">{{ a.owner }}/{{ a.name }}</a>
79
        <time class="mute small" title="{{ a.at_ms|when_i }}">{{ a.at_ms|ago_i }}</time>
80
      </li>
81
    {% endfor %}
82
    </ul>
83
    {% endif %}
f8cf54e9 Andy McCall ↶ 84
    </section>
25ab8c73 Andy McCall ↶ 85
  </div>
f8cf54e9 Andy McCall ↶ 86
  <aside class="side cards">
87
    <section class="side-card"><h3>Your repositories <span class="count-chip">{{ mine.len() }}</span><a class="more" href="/new">+ New</a></h3><div class="body">
25ab8c73 Andy McCall ↶ 88
    {% if mine.is_empty() %}
89
    <p class="small mute">None yet. <a href="/new">Create one</a>, or <a href="/explore">explore</a>.</p>
90
    {% else %}
f8cf54e9 Andy McCall ↶ 91
    <ul class="plain repo-list">
25ab8c73 Andy McCall ↶ 92
    {% for r in mine %}
f8cf54e9 Andy McCall ↶ 93
      <li><a href="/{{ r.owner }}/{{ r.name }}" title="{{ 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>
25ab8c73 Andy McCall ↶ 94
    {% endfor %}
95
    </ul>
96
    {% endif %}
f8cf54e9 Andy McCall ↶ 97
    </div></section>
25ab8c73 Andy McCall ↶ 98
  </aside>
99
</div>
100
{% endblock %}