OXYGENHUB
# a024e800af4e oxygenhub / templates / projects.html
2.0 KiB · HTML · last changed Projects: reachable from the site bar, every repository, and a New project button 27 days ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Projects · {{ owner }}{% endblock %}
3
{% block content %}
4
<div class="head"><h1>Projects <small><a href="/{{ owner }}">{{ owner }}</a></small></h1>{% if can_edit %}<a class="go" href="#new">+ NEW PROJECT</a>{% endif %}</div>
5
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
6
{% if !orgs.is_empty() %}<p class="small mute">Your organisations' projects: {% for o in orgs %}<a href="/projects/{{ o }}">{{ o }}</a>{% if !loop.last %} · {% endif %}{% endfor %}</p>{% endif %}
7
{% if projects.is_empty() %}<p class="empty">No projects yet.{% if can_edit %} A project is a board of issues, proposals and notes from {{ owner }}'s repositories: make one below.{% else %} Only {{ owner }}{% if shell.user.is_some() %} (or its members){% endif %} can make one.{% endif %}</p>{% else %}
8
<ul class="rows">
9
{% for p in projects %}
10
  <li><div><a class="name" href="/projects/{{ owner }}/{{ p.number }}">{{ p.title }}</a>{% if !p.public %} <span class="tag">private</span>{% endif %}{% if p.closed %} <span class="tag dim">closed</span>{% endif %}
11
  <p class="small mute">#{{ p.number }}{% if !p.description.is_empty() %} · {{ p.description }}{% endif %} · updated <time title="{{ p.updated_ms|when_i }}">{{ p.updated_ms|ago_i }}</time></p></div></li>
12
{% endfor %}
13
</ul>
14
{% endif %}
15
{% if can_edit %}
16
<form class="card" id="new" method="post" action="/projects/{{ owner }}">
17
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
18
  <h2>New project</h2>
19
  <label for="title">Title</label><input type="text" id="title" name="title" maxlength="100" required>
20
  <label for="description">Description</label><input type="text" id="description" name="description">
21
  <div class="choice"><label><input type="checkbox" name="private" value="1"> private (only {% if owner == shell.user.clone().unwrap_or_default() %}you{% else %}members of {{ owner }}{% endif %})</label></div>
22
  <button type="submit">CREATE</button>
23
  <p class="small mute">It starts with the columns Backlog, Doing and Done.</p>
24
</form>
25
{% endif %}
26
{% endblock %}