samjeston / openhub Public
Sam Jeston Working vertical 9aa3c45 · History
72 lines· 2.9 KB ·HTML
Raw
1{% extends "base.html" %}
2{% block title %}Dashboard · Openhub{% endblock %}
3{% block content %}
4<div class="layout-dashboard">
5 <aside class="dashboard-sidebar">
6 <div class="sidebar-header">
7 <h2>Your repositories</h2>
8 <a class="btn btn-sm btn-primary" href="/new">{{ crate::web::fmt::icon("plus")|safe }} New</a>
9 </div>
10 {% if repos.is_empty() %}
11 <p class="text-muted text-small">You don't have any repositories yet.</p>
12 {% else %}
13 <ul class="sidebar-repos">
14 {% for repo in repos %}
15 <li>
16 <a href="/{{ repo.owner }}/{{ repo.name }}">
17 {% if repo.is_private %}{{ crate::web::fmt::icon("lock")|safe }}{% else %}{{ crate::web::fmt::icon("book-marked")|safe }}{% endif %}
18 <span class="truncate">{{ repo.owner }}/<strong>{{ repo.name }}</strong></span>
19 </a>
20 </li>
21 {% endfor %}
22 </ul>
23 {% endif %}
24 </aside>
25 <div class="dashboard-main">
26 {% if repos.is_empty() %}
27 <div class="box welcome-box">
28 <div class="box-body">
29 <h2>Welcome to Openhub{% if let Some(u) = ctx.user %}, {{ u.name() }}{% endif %}</h2>
30 <p class="text-muted">Get set up in two steps.</p>
31 <ol class="steps">
32 <li><a href="/settings/keys">Add an SSH key</a> so you can push from the command line.</li>
33 <li><a href="/new">Create a repository</a> and push your code to it.</li>
34 </ol>
35 </div>
36 </div>
37 {% endif %}
38 <section class="section">
39 <div class="section-header"><h2>Open pull requests</h2></div>
40 {% if pulls.is_empty() %}
41 <div class="blankslate blankslate-sm box">
42 {{ crate::web::fmt::icon("git-pull-request")|safe }}
43 <p>No open pull requests in your repositories.</p>
44 </div>
45 {% else %}
46 <div class="box">
47 {% for (pr, owner, name) in pulls %}
48 <div class="box-row issue-row">
49 <span class="issue-icon state-color-open">{{ crate::web::fmt::icon("git-pull-request")|safe }}</span>
50 <div class="issue-main">
51 <a class="text-muted" href="/{{ owner }}/{{ name }}">{{ owner }}/{{ name }}</a>
52 <a class="issue-title" href="/{{ owner }}/{{ name }}/pull/{{ pr.number }}">{{ pr.title }}</a>
53 <div class="issue-meta">#{{ pr.number }} opened <time title="{{ crate::web::fmt::datetime_full(pr.created_at) }}">{{ crate::web::fmt::ago(pr.created_at) }}</time> by {{ pr.author }}</div>
54 </div>
55 </div>
56 {% endfor %}
57 </div>
58 {% endif %}
59 </section>
60 {% if !recent.is_empty() %}
61 <section class="section">
62 <div class="section-header">
63 <h2>Recently updated on this server</h2>
64 <a href="/explore">Explore {{ crate::web::fmt::icon("arrow-right")|safe }}</a>
65 </div>
66 {% let repos = recent %}
67 <div class="box">{% include "partials/repo_list.html" %}</div>
68 </section>
69 {% endif %}
70 </div>
71</div>
72{% endblock %}