d23464c0 Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Bookmarks · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "bookmarks") %}{% endblock %}
6
{% block content %}
7
< div class = " head " > < h1 > Bookmarks < small > {{ bookmarks.len() }}</ small > </ h1 > </ div >
e271a37b Andy McCall 1 month ago ↶
8
{% if let Some(n) = notice %}< p class = " note " > {{ n }}</ p > {% endif %}
9
{% if let Some(e) = error %}< p class = " error " > {{ e }}</ p > {% endif %}
351cf57e Andy McCall 8 days ago ↶
10
{% if can_delete %}< details class = " panel " {% if bookmarks.is_empty () %} open {% endif %}> < summary > New bookmark</ summary >
11
< form class = " card " method = " post" action = " {{ repo.url }}/bookmarks/create" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" >
12
< label for = " bm-name" > Name</ label > < input type = " text" id = " bm-name " name = " name" maxlength = " 255" placeholder = " develop" required >
13
< label for = " bm-from" > From</ label > < input type = " text" id = " bm-from " name = " from" list = " bm-list" value = " {% for b in bookmarks %}{% if b.default %}{{ b.name }}{% endif %}{% endfor %}" placeholder = " a bookmark, tag or change" >
14
< datalist id = " bm-list " > {% for b in bookmarks %}< option value = " {{ b.name }}" > {% endfor %}</ datalist >
15
< p class = " small mute " > It starts at the same changes as what it is made from; nothing is copied.</ p >
16
< button type = " submit" > CREATE</ button >
17
</ form > </ details > {% endif %}
d23464c0 Andy McCall 1 month ago ↶
18
< div class = " table " > < table >
19
< tr > < th > Bookmark</ th > < th > Heads</ th > < th > Changes</ th > < th > Latest</ th > < th > </ th > </ tr >
20
{% for b in bookmarks %}
21
< tr >
22
< td class = " px " > < a href = " {{ repo.url }}/tree/{{ b.name }}" > {{ b.name }}</ a > {% if b.default %} < span class = " tag " > default</ span > {% endif %}{% if b.conflicted %} < span class = " tag bad " > conflicts</ span > {% endif %}</ td >
23
< td > {% for h in b.heads %}< a class = " chip " href = " {{ repo.url }}/change/{{ h }}" > {{ h|short }}</ a > {% endfor %}{% if b.heads.len() > 1 %}< span class = " tag warn " > {{ b.heads.len() }} heads</ span > {% endif %}</ td >
24
< td > {{ b.changes }}</ td >
25
< td > < time title = " {{ b.latest_ms|when }}" > {{ b.latest_ms|ago }}</ time > </ td >
4f692533 Andy McCall 1 month ago ↶
26
< td class = " small " > {% if can_run %}< form class = " inline " method = " post" action = " {{ repo.url }}/flow/start" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < input type = " hidden" name = " bookmark" value = " {{ b.name }}" > < button type = " submit" class = " small " title = " Run the pipeline of {{ b.name }}'s current state" > Run pipeline</ button > </ form > · {% endif %}< a href = " {{ repo.url }}/changes/{{ b.name }}" > history</ a > {% if !b.default %} · < a href = " {{ repo.url }}/compare/{{ repo.default_bookmark }}...{{ b.name }}" > compare with {{ repo.default_bookmark }}</ a > {% if can_delete %}
a7aa76ac Andy McCall 18 days ago
27
< form class = " inline " method = " post" action = " {{ repo.url }}/bookmarks/delete" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < input type = " hidden" name = " bookmark" value = " {{ b.name }}" > < button type = " submit" class = " small danger-btn " data-confirm = " Delete the bookmark {{ b.name }}? Its changes stay while anything else reaches them." > DELETE</ button > </ form > {% endif %}{% endif %}</ td >
d23464c0 Andy McCall 1 month ago ↶
28
</ tr >
29
{% endfor %}
30
</ table > </ div >
31
{% endblock %}