repo-prs.html
HTML document, ASCII text
1{% extends "repo.html" %} 2{% set active_page = "prs" %} 3 4{% block title %} 5{% trans username=username, repository=repository %}PRs of {{ username }}/{{ repository }}{% endtrans %} 6{% endblock %} 7{% block content %} 8<x-vbox> 9{% if logged_in_user %} 10<x-frame style="--width: 896px;" class="flexible-space"> 11<form method="post"> 12<x-hbox> 13<input name="headroute" value="{{ repo_data.route }}" required> 14<input name="head" style="flex: 0 1 auto;" required placeholder="{% trans %}Head branch{% endtrans %}"> 15 16<iconify-icon icon="mdi-light:arrow-right" style="font-size: 2em;"></iconify-icon> 17 18<select name="base" style="flex: 0 1 auto;" required> 19<option value="" selected>{% trans %}Base branch{% endtrans %}</option> 20{% for branch in branches %} 21<option value="{{ branch }}">{{ branch }}</option> 22{% endfor %} 23</select> 24<button type="submit">{% trans %}Request merging{% endtrans %}</button> 25</x-hbox> 26</form> 27</x-frame> 28{% endif %} 29<x-frame style="--width: 896px;" class="flexible-space"> 30<x-vbox> 31{% for pr in repo_data.bases %} 32<article class="card card-horizontal"> 33{% if pr.state == 0 %} 34<div class="card-top state-label" style="background: var(--color-pending); color: var(--color-pending-text);"> 35{% trans %}pending{% endtrans %} 36</div> 37{% elif pr.state == 1 %} 38<div class="card-top state-label" style="background: var(--color-merged); color: var(--color-merged-text);"> 39{% trans %}merged{% endtrans %} 40</div> 41{% elif pr.state == 2 %} 42<div class="card-top state-label" style="background: var(--color-rejected); color: var(--color-rejected-text);"> 43{% trans %}rejected{% endtrans %} 44</div> 45{% endif %} 46<section class="card-main flexible-space"> 47<h3>{{ pr.head_route }} ({{ pr.head_branch }})<br>{{ pr.base_route }} ({{ pr.base_branch }})</h3> 48<p>{% trans %}Requested by{% endtrans %} <a href="/{{ pr.owner.username }}">{{ pr.owner.username }}</a> • {{ pr.timestamp | strftime("%A, %e %B %Y, %H:%M:%S") }}</p> 49{% if logged_in_user == pr.owner.username or get_permission_level(logged_in_user, username, repository) >= 1 %} 50<form class="vbox" method="post"> 51<input type="hidden" name="id" value="{{ pr.id }}"> 52<label> 53{% trans %}Resolves:{% endtrans %} 54<input type="text" name="resolves" value="{{ pr.resolves_list }}"> 55</label> 56{% trans %}To change: space-separated list of root post numbers{% endtrans %} 57<button type="submit">{% trans %}Save{% endtrans %}</button> 58</form> 59{% else %} 60{% trans %}Resolves:{% endtrans %} {{ pr.resolves_list }} 61{% endif %} 62</section> 63<section> 64<x-hbox> 65<form action="delete" method="post"> 66<input type="hidden" name="id" value="{{ pr.id }}"> 67<button type="submit" class="button-flat">{% trans %}Deny{% endtrans %}</button> 68</form> 69<form action="merge" method="post"> 70<input type="hidden" name="id" value="{{ pr.id }}"> 71<button type="submit">{% trans %}Merge{% endtrans %}</button> 72</form> 73</x-hbox> 74</section> 75</article> 76{% endfor %} 77</x-vbox> 78</x-frame> 79</x-vbox> 80{% endblock %} 81