repo-prs.html
HTML document, ASCII text
1{% extends "repo.html" %} 2{% set active_page = "prs" %} 3 4{% block title %} 5PRs of {{ username }}/{{ repository }} 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="Head branch"> 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>Base branch</option> 20{% for branch in branches %} 21<option value="{{ branch }}">{{ branch }}</option> 22{% endfor %} 23</select> 24<button type="submit">Request merging</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);"> 35pending 36</div> 37{% elif pr.state == 1 %} 38<div class="card-top state-label" style="background: var(--color-merged); color: var(--color-merged-text);"> 39merged 40</div> 41{% elif pr.state == 2 %} 42<div class="card-top state-label" style="background: var(--color-rejected); color: var(--color-rejected-text);"> 43rejected 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>Requested by <a href="/{{ pr.owner.username }}">{{ pr.owner.username }}</a> • {{ pr.timestamp | strftime("%A, %e %B %Y, %H:%M:%S") }}</p> 49</section> 50<section> 51<x-hbox> 52<form action="delete" method="post"> 53<input type="hidden" name="id" value="{{ pr.id }}"> 54<button type="submit" class="button-flat">Deny</button> 55</form> 56<form action="merge" method="post"> 57<input type="hidden" name="id" value="{{ pr.id }}"> 58<button type="submit">Merge</button> 59</form> 60</x-hbox> 61</section> 62</article> 63{% endfor %} 64</x-vbox> 65</x-frame> 66</x-vbox> 67{% endblock %} 68