| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | @include 'layout/head.html' |
| 5 | </head> |
| 6 | <body> |
| 7 | @include 'layout/header.html' |
| 8 | |
| 9 | <div class="content pr-files-content"> |
| 10 | @include 'layout/repo_menu.html' |
| 11 | |
| 12 | <div class="pr-header"> |
| 13 | <h1 class="pr-header__title">@{pr.formatted_title()} <span class="pr-header__num">#@pr.id</span></h1> |
| 14 | <div class="pr-header__meta"> |
| 15 | @if pr.is_open() |
| 16 | <span class="pr-status-badge pr-status--open">%pr_status_open</span> |
| 17 | @else if pr.is_merged() |
| 18 | <span class="pr-status-badge pr-status--merged">%pr_status_merged</span> |
| 19 | @else |
| 20 | <span class="pr-status-badge pr-status--closed">%pr_status_closed</span> |
| 21 | @end |
| 22 | <a class="issue-row__author" href="/@author.username">@author.username</a> |
| 23 | <span>%pr_wants_to_merge</span> |
| 24 | <code>@pr.head_branch</code> |
| 25 | <span>%pr_into</span> |
| 26 | <code>@pr.base_branch</code> |
| 27 | <span>· @{pr.relative_time()}</span> |
| 28 | </div> |
| 29 | <div class="pr-header__actions"> |
| 30 | <a class="pr-tab-link" href="/@repo.user_name/@repo.name/pull/@pr.id">%pr_conversation</a> |
| 31 | <a class="pr-tab-link pr-tab-link--active" href="/@repo.user_name/@repo.name/pull/@pr.id/files">%pr_files_changed <span class="pr-tab-link__count">@file_diffs.len</span></a> |
| 32 | </div> |
| 33 | </div> |
| 34 | |
| 35 | @if file_diffs.len == 0 |
| 36 | <div class="issues-empty">%pr_no_file_changes</div> |
| 37 | @else |
| 38 | @if ctx.logged_in |
| 39 | <form method='post' class='pr-review-form' action='/@repo.user_name/@repo.name/pull/@pr.id/review'> |
| 40 | @end |
| 41 | |
| 42 | <div class="pr-files-toolbar"> |
| 43 | <div class="pr-files-toolbar__summary"> |
| 44 | <strong>@file_diffs.len</strong> %pr_files_changed_label |
| 45 | <span class="pr-files-toolbar__add">+@all_adds</span> |
| 46 | <span class="pr-files-toolbar__del">-@all_dels</span> |
| 47 | </div> |
| 48 | @if ctx.logged_in |
| 49 | <button type='submit' class='pr-action pr-action--review pr-files-toolbar__submit'>%pr_submit_review</button> |
| 50 | @end |
| 51 | </div> |
| 52 | |
| 53 | <div class="pr-files-layout"> |
| 54 | <aside class="pr-files-sidebar" aria-label="%pr_files_changed"> |
| 55 | <div class="pr-files-sidebar__header"> |
| 56 | <span>%pr_files_changed</span> |
| 57 | <span data-pr-files-count>@file_diffs.len</span> |
| 58 | </div> |
| 59 | <div class="pr-files-filter"> |
| 60 | <span class="pr-files-filter__icon"> |
| 61 | <svg aria-hidden="true" focusable="false" viewBox="0 0 16 16"><path fill="currentColor" d="M10.68 11.74a6 6 0 1 1 1.06-1.06l3.04 3.04a.75.75 0 1 1-1.06 1.06ZM11.5 7a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z"/></svg> |
| 62 | </span> |
| 63 | <input type="search" class="pr-files-filter__input" data-pr-files-filter placeholder="Filter files..." autocomplete="off"> |
| 64 | <button type="button" class="pr-files-filter__clear" data-pr-files-filter-clear aria-label="Clear file filter"> |
| 65 | <svg aria-hidden="true" focusable="false" viewBox="0 0 16 16"><path fill="currentColor" d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"/></svg> |
| 66 | </button> |
| 67 | </div> |
| 68 | <nav class="pr-files-sidebar__list" data-pr-files-tree> |
| 69 | @{render_pr_file_tree(file_tree)} |
| 70 | </nav> |
| 71 | <div class="pr-files-filter-empty" data-pr-files-filter-empty hidden>No files match the filter.</div> |
| 72 | </aside> |
| 73 | |
| 74 | <section class="pr-files-diffs" data-line-comment-placeholder="@line_comment_placeholder"> |
| 75 | @for fd in file_diffs |
| 76 | @{render_pr_file_diff(fd, comments_by_key, can_comment, ctx.lang)} |
| 77 | @end |
| 78 | </section> |
| 79 | </div> |
| 80 | |
| 81 | @if ctx.logged_in |
| 82 | <div class='pr-review-submit'> |
| 83 | <textarea name='body' placeholder='%pr_overall_review_placeholder' rows='3'></textarea> |
| 84 | <div class='pr-review-actions'> |
| 85 | <label><input type='radio' name='state' value='comment' checked> %pr_review_action_comment</label> |
| 86 | <label><input type='radio' name='state' value='approved'> %pr_review_action_approve</label> |
| 87 | <label><input type='radio' name='state' value='changes_requested'> %pr_review_action_request_changes</label> |
| 88 | <button type='submit' class='pr-action pr-action--review'>%pr_submit_review</button> |
| 89 | </div> |
| 90 | </div> |
| 91 | </form> |
| 92 | @end |
| 93 | @end |
| 94 | </div> |
| 95 | |
| 96 | @include 'layout/footer.html' |
| 97 | </body> |
| 98 | </html> |
| 99 | |