OXYGENHUB
◆ v0.3.1 oxygenhub / templates / projects.html
1.6 KiB · HTML · last changed Projects: boards of issues, proposals and notes across an owner's repositories, with columns, cards moved without JavaScript, private projects, and the projects shown on issues and proposals 1 month 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></div>
5
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
6
{% 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.{% endif %}</p>{% else %}
7
<ul class="rows">
8
{% for p in projects %}
9
  <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 %}
10
  <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>
11
{% endfor %}
12
</ul>
13
{% endif %}
14
{% if can_edit %}
15
<form class="card" method="post" action="/projects/{{ owner }}">
16
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
17
  <h2>New project</h2>
18
  <label for="title">Title</label><input type="text" id="title" name="title" maxlength="100" required>
19
  <label for="description">Description</label><input type="text" id="description" name="description">
20
  <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>
21
  <button type="submit">CREATE</button>
22
  <p class="small mute">It starts with the columns Backlog, Doing and Done.</p>
23
</form>
24
{% endif %}
25
{% endblock %}