OXYGENHUB
# 8597fb5ca16c oxygenhub / templates / bookmarks.html
2.1 KiB · HTML · last changed No inline code in pages, so the CSP can be enforced (#227) 18 days ago source blame history raw
d23464c0 Andy McCall ↶ 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 ↶ 8
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %}
9
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
d23464c0 Andy McCall ↶ 10
<div class="table"><table>
11
<tr><th>Bookmark</th><th>Heads</th><th>Changes</th><th>Latest</th><th></th></tr>
12
{% for b in bookmarks %}
13
<tr>
14
  <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>
15
  <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>
16
  <td>{{ b.changes }}</td>
17
  <td><time title="{{ b.latest_ms|when }}">{{ b.latest_ms|ago }}</time></td>
4f692533 Andy McCall ↶ 18
  <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 19
    <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 ↶ 20
</tr>
21
{% endfor %}
22
</table></div>
23
{% endblock %}