ggdgsdbsdbbb / templates / issue.html
62 lines · 55 sloc · 2.06 KB · f37c8784f5fa9d9ec6a444802eb6ec14526843ef
Raw
1<!DOCTYPE html>
2<html>
3 <head>
4 @include 'layout/head.html'
5 </head>
6 <body>
7 @include 'layout/header.html'
8
9 .form-error {
10 @ctx.form_error
11 }
12
13 <div class="content">
14 @include 'layout/repo_menu.html'
15
16 <div class="issue-header">
17 <h1 class="issue-header__title">@{issue.formatted_title()} <span class="issue-header__id">#@issue.id</span></h1>
18 </div>
19
20 <div class="issue-post">
21 <a href="/@issue_author.username" class="issue-post__avatar">
22 <img src="@{app.prepare_user_avatar_url(issue_author.avatar)}">
23 </a>
24 <div class="issue-post__body">
25 <div class="issue-post__meta">
26 <a href="/@issue_author.username" class="issue-post__author">@issue_author.username</a>
27 <span class="issue-post__time">%issue_opened @{issue.relative_time()}</span>
28 </div>
29 <div class="markdown-body issue-post__content">@{issue.formatted_body()}</div>
30 </div>
31 </div>
32
33 @for comment_with_user in comments_with_users
34 <div class="issue-post issue-post--comment">
35 <a href="/@comment_with_user.user.username" class="issue-post__avatar">
36 <img src="@{app.prepare_user_avatar_url(comment_with_user.user.avatar)}">
37 </a>
38 <div class="issue-post__body">
39 <div class="issue-post__meta">
40 <a href="/@comment_with_user.user.username" class="issue-post__author">@comment_with_user.user.username</a>
41 <span class="issue-post__time">%pr_commented @comment_with_user.item.relative()</span>
42 </div>
43 <div class="issue-post__content">@comment_with_user.item.text</div>
44 </div>
45 </div>
46 @end
47
48 @if ctx.logged_in
49 <form method='post' class='comment-form' action='/@repo.user_name/@repo.name/comments'>
50 <textarea class='comment-form__input' name='text' placeholder='%pr_leave_comment' required></textarea>
51 <input type='hidden' name='issue_id' value='@issue.id'>
52 <div class="comment-form__actions">
53 <input type='submit' class="comment-form__submit" name='submit' value='%pr_comment_button'>
54 </div>
55 </form>
56 @end
57 </div>
58
59 @js '/js/block-form.js'
60 @include 'layout/footer.html'
61 </body>
62</html>
63