| 1 |
{% extends "base.html" %} |
| 2 |
{% block title %}{{ project.title }} · Projects · {{ project.owner }}{% endblock %} |
| 3 |
{% block mainclass %} class="wide"{% endblock %} |
| 4 |
{% block content %} |
| 5 |
<div class="head"><h1>{{ project.title }} <small><a href="/projects/{{ project.owner }}">{{ project.owner }}'s projects</a> · #{{ project.number }}{% if !project.public %} · private{% endif %}{% if project.closed %} · closed{% endif %}</small></h1> |
| 6 |
{% if !project.description.is_empty() %}<p class="mute">{{ project.description }}</p>{% endif %}</div> |
| 7 |
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %} |
| 8 |
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %} |
| 9 |
{% if archived %}<p class="note board-archive-note">Archived cards: off the board, kept and searchable{% if can_edit %}; restore one to put it back at the end of its column{% endif %}. <a href="/projects/{{ project.owner }}/{{ project.number }}">Back to the board</a></p>{% endif %} |
| 10 |
<form class="board-filter" method="get" action="/projects/{{ project.owner }}/{{ project.number }}" role="search">{% if archived %}<input type="hidden" name="archived" value="1">{% endif %} |
| 11 |
<label class="visually-hidden" for="board-q">Filter cards</label><input type="search" id="board-q" name="q" value="{{ q }}" placeholder="filter: words, label:bug, assignee:andy" title="Words in the title or reference; label:NAME, assignee:NAME and state:STATE as on the issue list"> |
| 12 |
<label class="visually-hidden" for="board-state">State</label><select id="board-state" name="state"><option value="">any state</option>{% for s in ["open", "closed", "landed", "draft"] %}<option{% if state == *s %} selected{% endif %}>{{ s }}</option>{% endfor %}</select> |
| 13 |
<button type="submit" class="small">FILTER</button>{% if filtered %} <a class="small" href="/projects/{{ project.owner }}/{{ project.number }}{% if archived %}?archived=1{% endif %}">clear</a>{% endif %} |
| 14 |
{% if !archived && archived_total > 0 %}<a class="small board-archived-link" href="/projects/{{ project.owner }}/{{ project.number }}?archived=1">{{ archived_total }} archived card{% if archived_total != 1 %}s{% endif %}</a>{% endif %} |
| 15 |
</form> |
| 16 |
<div class="board" role="list" aria-label="Columns"> |
| 17 |
{% for col in columns %} |
| 18 |
<section class="board-col" role="listitem" aria-labelledby="col-{{ col.column.id }}"> |
| 19 |
<header><h2 id="col-{{ col.column.id }}">{{ col.column.name }} <span class="count-chip">{% if filtered %}{{ col.cards.len() }} of {{ col.total }}{% else %}{{ col.total }}{% endif %}</span></h2> |
| 20 |
{% if can_edit && !archived %}<form class="tiny" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="column" value="{{ col.column.id }}"><button name="action" value="left" title="Move the column left" aria-label="Move {{ col.column.name }} left">←</button><button name="action" value="right" title="Move the column right" aria-label="Move {{ col.column.name }} right">→</button></form>{% endif %}</header> |
| 21 |
{% if let Some(d) = col.column.archive_after_days %}{% if !archived %}<p class="small mute col-archives">archives cards {{ d }} day{% if *d != 1 %}s{% endif %} after they reach it</p>{% endif %}{% endif %} |
| 22 |
{% if col.hidden > 0 && !filtered && !archived %}<p class="small mute col-hidden">{{ col.hidden }} older card{% if col.hidden != 1 %}s{% endif %} not shown · <a href="/projects/{{ project.owner }}/{{ project.number }}?all={{ col.column.id }}#col-{{ col.column.id }}">show all {{ col.total }}</a></p>{% endif %} |
| 23 |
<ul class="cards"> |
| 24 |
{% for c in col.cards %} |
| 25 |
<li class="card-item{% if c.card.kind == "note" %} note{% endif %}"> |
| 26 |
{% if c.card.kind == "note" %}<p>{{ c.title }}</p> |
| 27 |
{% else %}<a href="{{ c.url }}">{{ c.title }}</a> |
| 28 |
<p class="small mute"><span class="glyph" aria-hidden="true">{% if c.card.kind == "issue" %}◇{% else %}⇄{% endif %}</span> {{ c.reference }} · <span class="state-{{ c.state }}">{{ c.state }}</span>{% for a in c.assignees %} · <a class="card-who" href="/projects/{{ project.owner }}/{{ project.number }}?q=assignee:{{ a|urlencode }}" title="Cards assigned to {{ a }}">@{{ a }}</a>{% endfor %}</p> |
| 29 |
{% if !c.labels.is_empty() %}<p class="card-labels">{% for l in c.labels %}<a class="label" style="--c: {{ l.colour }}" href="/projects/{{ project.owner }}/{{ project.number }}?q=label:{{ l.name|urlencode }}" title="{% if l.description.is_empty() %}Cards labelled {{ l.name }}{% else %}{{ l.description }}{% endif %}">{{ l.name }}</a>{% endfor %}</p>{% endif %}{% endif %} |
| 30 |
{% if let Some(t) = c.card.archived_ms %}<p class="small mute">archived <time title="{{ t|when_i }}">{{ t|ago_i }}</time></p>{% endif %} |
| 31 |
{% if can_edit && archived %} |
| 32 |
<form class="tiny card-actions" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="card" value="{{ c.card.id }}"><button name="action" value="restore">restore</button></form> |
| 33 |
{% else if can_edit %} |
| 34 |
<form class="tiny card-actions" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="card" value="{{ c.card.id }}"> |
| 35 |
<label class="visually-hidden" for="mv-{{ c.card.id }}">Column</label> |
| 36 |
<select id="mv-{{ c.card.id }}" name="column">{% for o in columns %}<option value="{{ o.column.id }}"{% if o.column.id == col.column.id %} selected{% endif %}>{{ o.column.name }}</option>{% endfor %}</select> |
| 37 |
<button name="action" value="move">move</button><button name="action" value="up" aria-label="Up">↑</button><button name="action" value="down" aria-label="Down">↓</button><button name="action" value="archive" title="Archive: off the board, kept and restorable">archive</button><button name="action" value="remove" aria-label="Remove from the project" title="Remove from the project">✕</button> |
| 38 |
</form>{% endif %} |
| 39 |
</li> |
| 40 |
{% endfor %} |
| 41 |
</ul> |
| 42 |
{% if can_edit && !archived %} |
| 43 |
<details class="add-card"><summary class="small">add a card</summary> |
| 44 |
<form method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="column" value="{{ col.column.id }}"><input type="hidden" name="action" value="add"> |
| 45 |
<label for="ref-{{ col.column.id }}">Issue or proposal</label> |
| 46 |
<div class="inline-fields"><select name="repo" aria-label="Repository">{% for r in repos %}<option>{{ r }}</option>{% endfor %}</select><input type="text" id="ref-{{ col.column.id }}" name="reference" placeholder="#12 or repo#12"></div> |
| 47 |
<label for="note-{{ col.column.id }}">or a note</label><textarea id="note-{{ col.column.id }}" name="note" rows="2" maxlength="500"></textarea> |
| 48 |
<button type="submit" class="small">ADD</button> |
| 49 |
</form> |
| 50 |
</details> |
| 51 |
<details class="add-card"><summary class="small">column</summary> |
| 52 |
<form method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="column" value="{{ col.column.id }}"> |
| 53 |
<input type="text" name="name" value="{{ col.column.name }}" aria-label="Column name" maxlength="40"><button name="action" value="rename_column" class="small">RENAME</button> <button name="action" value="remove_column" class="small danger-btn" data-confirm="Remove this column? Its cards move to the first column.">REMOVE</button> |
| 54 |
</form> |
| 55 |
<form class="col-archive" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="column" value="{{ col.column.id }}"> |
| 56 |
<label for="older-{{ col.column.id }}">Archive cards here more than</label> |
| 57 |
<div class="inline-fields"><input type="number" id="older-{{ col.column.id }}" name="days" min="0" max="3650" value="14" required><span class="small mute">days</span><button name="action" value="archive_older" class="small">ARCHIVE</button></div> |
| 58 |
</form> |
| 59 |
<form class="col-archive" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="column" value="{{ col.column.id }}"> |
| 60 |
<label for="after-{{ col.column.id }}">Archive automatically after</label> |
| 61 |
<div class="inline-fields"><input type="number" id="after-{{ col.column.id }}" name="days" min="0" max="3650" placeholder="never"{% if let Some(d) = col.column.archive_after_days %} value="{{ d }}"{% endif %}><span class="small mute">days</span><button name="action" value="archive_after" class="small">SAVE</button></div> |
| 62 |
</form> |
| 63 |
</details> |
| 64 |
{% endif %} |
| 65 |
</section> |
| 66 |
{% endfor %} |
| 67 |
{% if can_edit && !archived %} |
| 68 |
<section class="board-col add-col"><form method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><label for="newcol">New column</label><input type="text" id="newcol" name="name" maxlength="40" required><button name="action" value="add_column" class="small">ADD COLUMN</button></form></section> |
| 69 |
{% endif %} |
| 70 |
</div> |
| 71 |
{% if can_manage %} |
| 72 |
<details class="panel"><summary>Settings</summary> |
| 73 |
<form class="card" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 74 |
<label for="ptitle">Title</label><input type="text" id="ptitle" name="title" value="{{ project.title }}" maxlength="100"> |
| 75 |
<label for="pdesc">Description</label><input type="text" id="pdesc" name="description" value="{{ project.description }}"> |
| 76 |
<div class="choice"><label><input type="checkbox" name="private" value="1"{% if !project.public %} checked{% endif %}> private</label> <label><input type="checkbox" name="closed" value="1"{% if project.closed %} checked{% endif %}> closed (read-only)</label></div> |
| 77 |
<button name="action" value="settings">SAVE</button> <button name="action" value="delete" class="danger-btn" data-confirm="Delete this project? Issues and proposals are not touched.">DELETE PROJECT</button> |
| 78 |
</form> |
| 79 |
{% if !transfer_to.is_empty() %} |
| 80 |
<form class="card" method="post" action="/projects/{{ project.owner }}/{{ project.number }}"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 81 |
<h3>Transfer</h3> |
| 82 |
<p class="small mute">Move this project to another owner. It takes the next number there, with its columns and cards; this address goes on redirecting to it.</p> |
| 83 |
<label for="pto">New owner</label> |
| 84 |
<select id="pto" name="to">{% for o in transfer_to %}<option value="{{ o }}">{{ o }}</option>{% endfor %}</select> |
| 85 |
<button name="action" value="transfer" data-confirm="Transfer this project?">TRANSFER</button> |
| 86 |
</form> |
| 87 |
{% endif %} |
| 88 |
</details> |
| 89 |
{% endif %} |
| 90 |
{% endblock %} |