| 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"> |
| 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" href="/@repo.user_name/@repo.name/pull/@pr.id/files">%pr_files_changed</a> |
| 32 | <span class="pr-tab-link pr-tab-link--info">@commits.len %pr_commits_label</span> |
| 33 | </div> |
| 34 | </div> |
| 35 | |
| 36 | <div class="pr-body"> |
| 37 | <div class="avatar-with-user-info"> |
| 38 | <img src="@{app.prepare_user_avatar_url(author.avatar)}"> |
| 39 | <span> |
| 40 | <a href="/@author.username"><i>@author.username</i></a> |
| 41 | <p>@pr.description</p> |
| 42 | </span> |
| 43 | </div> |
| 44 | </div> |
| 45 | |
| 46 | @for entry in timeline |
| 47 | @if entry.kind == 'comment' |
| 48 | <div class="avatar-with-user-info issue-comment-post"> |
| 49 | <img src="@{app.prepare_user_avatar_url(entry.user.avatar)}"> |
| 50 | <span> |
| 51 | <a href="/@entry.user.username"><i>@entry.user.username</i></a> <i>%pr_commented @{entry.comment.relative()}</i> |
| 52 | <p>@entry.comment.text</p> |
| 53 | </span> |
| 54 | </div> |
| 55 | @else |
| 56 | <div class="pr-review-block"> |
| 57 | <div class="pr-review-header"> |
| 58 | <img src="@{app.prepare_user_avatar_url(entry.user.avatar)}"> |
| 59 | <span> |
| 60 | <a href="/@entry.user.username"><i>@entry.user.username</i></a> |
| 61 | @if entry.review.state == 1 |
| 62 | <i>%pr_review_approved @{entry.review.relative()}</i> |
| 63 | @else if entry.review.state == 2 |
| 64 | <i>%pr_review_changes_requested @{entry.review.relative()}</i> |
| 65 | @else |
| 66 | <i>%pr_review_commented @{entry.review.relative()}</i> |
| 67 | @end |
| 68 | </span> |
| 69 | </div> |
| 70 | @if entry.review.body != '' |
| 71 | <p class="pr-review-body">@entry.review.body</p> |
| 72 | @end |
| 73 | @if entry.rcomments.len > 0 |
| 74 | <ul class="pr-review-comments"> |
| 75 | @for rc in entry.rcomments |
| 76 | <li class="pr-review-comment"> |
| 77 | <code>@rc.item.file_path : @rc.item.line_number</code> |
| 78 | <p>@rc.item.text</p> |
| 79 | </li> |
| 80 | @end |
| 81 | </ul> |
| 82 | @end |
| 83 | </div> |
| 84 | @end |
| 85 | @end |
| 86 | |
| 87 | @if ctx.logged_in |
| 88 | <form method='post' class='form vertical-form comment-post-form' action='/@repo.user_name/@repo.name/pull/@pr.id/comments'> |
| 89 | <textarea class='input-comment' name='text' placeholder='%pr_leave_comment' required></textarea> |
| 90 | <input type='submit' class="comment-post-submit" name='submit' value='%pr_comment_button'> |
| 91 | </form> |
| 92 | @end |
| 93 | |
| 94 | @if ctx.logged_in |
| 95 | <div class="pr-actions"> |
| 96 | @if can_merge |
| 97 | <form method='post' action='/@repo.user_name/@repo.name/pull/@pr.id/merge' class='pr-action-form'> |
| 98 | <button type='submit' class='pr-action pr-action--merge'>%pr_merge</button> |
| 99 | </form> |
| 100 | @end |
| 101 | @if can_close |
| 102 | <form method='post' action='/@repo.user_name/@repo.name/pull/@pr.id/close' class='pr-action-form'> |
| 103 | <button type='submit' class='pr-action pr-action--close'>%pr_close</button> |
| 104 | </form> |
| 105 | @end |
| 106 | @if can_reopen |
| 107 | <form method='post' action='/@repo.user_name/@repo.name/pull/@pr.id/reopen' class='pr-action-form'> |
| 108 | <button type='submit' class='pr-action'>%pr_reopen</button> |
| 109 | </form> |
| 110 | @end |
| 111 | </div> |
| 112 | @end |
| 113 | </div> |
| 114 | |
| 115 | @include 'layout/footer.html' |
| 116 | </body> |
| 117 | </html> |
| 118 | |