e1ec9fbf Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% block title %}Projects · {{ owner }}{% endblock %}
3
{% block content %}
7b26e611 Andy McCall 25 days ago ↶
4
< div class = " head proj-head " >
5
< h1 > Projects < small > boards of issues, proposals and notes from < a href = " /{{ owner }}" > {{ owner }}</ a > 's repositories</ small > </ h1 >
6
</ div >
a024e800 Andy McCall 26 days ago ↶
7
{% 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 %}
7b26e611 Andy McCall 25 days ago ↶
8
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
9
< div class = " proj-bar " >
10
< form class = " proj-filter " method = " get" action = " /projects/{{ owner }}" role = " search" >
11
< svg viewBox = " 0 0 16 16" width = " 14" height = " 14" aria-hidden = " true" focusable = " false" > < circle cx = " 6.8" cy = " 6.8" r = " 4.6" fill = " none" stroke = " currentColor" stroke-width = " 1.6" /> < path d = " m10.3 10.3 4 4" stroke = " currentColor" stroke-width = " 1.6" stroke-linecap = " round" /> </ svg >
12
< input type = " search" id = " q " name = " q" value = " {{ q }}" placeholder = " Filter projects by title or description" aria-label = " Filter projects" >
13
{% if closed %}< input type = " hidden" name = " state" value = " closed" > {% endif %}
14
</ form >
7f283f8e Andy McCall 22 days ago ↶
15
{% if can_edit %}< a class = " go primary " href = " #new" > + NEW PROJECT</ a > {% endif %}
7b26e611 Andy McCall 25 days ago ↶
16
</ div >
e1ec9fbf Andy McCall 1 month ago ↶
17
{% if can_edit %}
7b26e611 Andy McCall 25 days ago ↶
18
< form class = " card proj-new{% if error.is_some() %} open{% endif %} " id = " new " method = " post" action = " /projects/{{ owner }}" >
e1ec9fbf Andy McCall 1 month ago ↶
19
< input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
20
< h2 > New project</ h2 >
21
< label for = " title" > Title</ label > < input type = " text" id = " title " name = " title" maxlength = " 100" required >
22
< label for = " description" > Description</ label > < input type = " text" id = " description " name = " description" >
23
< 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 >
7b26e611 Andy McCall 25 days ago ↶
24
< div class = " proj-new-actions " > < button type = " submit" > CREATE</ button > < a href = " /projects/{{ owner }}" > Cancel</ a > </ div >
e1ec9fbf Andy McCall 1 month ago ↶
25
< p class = " small mute " > It starts with the columns Backlog, Doing and Done.</ p >
26
</ form >
27
{% endif %}
7b26e611 Andy McCall 25 days ago ↶
28
< div class = " proj-list " >
29
< div class = " proj-tabs " role = " tablist" >
30
< a role = " tab" href = " /projects/{{ owner }}{% if !q.is_empty() %}?q={{ q|urlencode }}{% endif %}" {% if !closed %} class = " on " aria-selected = " true" {% endif %}> < svg viewBox = " 0 0 16 16" width = " 14" height = " 14" aria-hidden = " true" focusable = " false" > < rect x = " 1.75" y = " 2.25" width = " 12.5" height = " 11.5" rx = " 1.5" fill = " none" stroke = " currentColor" stroke-width = " 1.5" /> < path d = " M6.25 2.5v11M10.25 2.5v11" stroke = " currentColor" stroke-width = " 1.5" /> </ svg > Open < span class = " count-chip " > {{ open_count }}</ span > </ a >
31
< a role = " tab" href = " /projects/{{ owner }}?state=closed{% if !q.is_empty() %}& amp; q={{ q|urlencode }}{% endif %}" {% if closed %} class = " on " aria-selected = " true" {% endif %}> < svg viewBox = " 0 0 16 16" width = " 14" height = " 14" aria-hidden = " true" focusable = " false" > < path d = " m3 8.5 3 3 7-7" fill = " none" stroke = " currentColor" stroke-width = " 1.6" stroke-linecap = " round" stroke-linejoin = " round" /> </ svg > Closed < span class = " count-chip " > {{ closed_count }}</ span > </ a >
32
</ div >
33
{% if projects.is_empty() %}
34
< p class = " empty " > {% if !q.is_empty() %}No {% if closed %}closed{% else %}open{% endif %} project matches “{{ q }}”.{% else if closed %}No closed projects.{% else if open_count + closed_count == 0 %}No projects yet.{% if can_edit %} A project is a board of issues, proposals and notes from {{ owner }}'s repositories: < a href = " #new" > make one</ a > .{% else %} Only {{ owner }}{% if shell.user.is_some() %} (or its members){% endif %} can make one.{% endif %}{% else %}No open projects.{% endif %}</ p >
35
{% else %}
36
< ul class = " proj-rows " >
37
{% for p in projects %}
38
< li >
39
< svg class = " proj-icon " viewBox = " 0 0 16 16" width = " 16" height = " 16" aria-hidden = " true" focusable = " false" > < rect x = " 1.75" y = " 2.25" width = " 12.5" height = " 11.5" rx = " 1.5" fill = " none" stroke = " currentColor" stroke-width = " 1.5" /> < path d = " M6.25 2.5v11M10.25 2.5v11" stroke = " currentColor" stroke-width = " 1.5" /> </ svg >
40
< div class = " proj-main " >
41
< div class = " proj-title " > < a class = " name " href = " /projects/{{ owner }}/{{ p.number }}" > {{ p.title }}</ a > {% if !p.public %} < span class = " vis vis-private " > private</ span > {% endif %}{% if p.closed %} < span class = " tag dim " > closed</ span > {% endif %}</ div >
42
< p class = " small mute " > #{{ p.number }} · updated < time title = " {{ p.updated_ms|when_i }}" > {{ p.updated_ms|ago_i }}</ time > </ p >
43
{% if !p.description.is_empty() %}< p class = " proj-desc " > {{ p.description }}</ p > {% endif %}
44
</ div >
45
</ li >
46
{% endfor %}
47
</ ul >
48
{% endif %}
49
</ div >
e1ec9fbf Andy McCall 1 month ago ↶
50
{% endblock %}