1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-24 11:18:36 +00:00

finish view comments on issue page

This commit is contained in:
Unknwon
2015-08-13 16:07:11 +08:00
parent d7d72b9e3c
commit 133b19d0c5
14 changed files with 388 additions and 284 deletions

View File

@@ -1 +1 @@
0.6.4.0812 Beta
0.6.4.0813 Beta

View File

@@ -1,10 +1,7 @@
{{with .Repository}}
<div class="ui container"><!-- start container -->
<div id="repoheader" class="ui vertically padded grid head"><!-- start grid -->
<div class="column"><!-- start column -->
<div class="ui black small compact menu floated right count labelled">
<a class="item{{if $.IsRepositoryOwner}} poping up{{end}}"{{if not $.IsRepositoryOwner}} href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
<i class="icon octicon octicon-repo-forked"></i>
@@ -41,9 +38,7 @@
</div>
</div><!-- end column -->
</div><!-- end grid -->
</div><!-- end container -->
<div class="ui divider"></div>

View File

@@ -50,20 +50,53 @@
</div>
</div>
{{range .Issue.Comments}}
{{ $createdStr:= TimeSince .Created $.Lang }}
<div class="comment">
<a class="avatar" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.AvatarLink}}">
</a>
<div class="content">
<div class="ui top attached header">
<span class="text"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
<div class="ui right actions">
</div>
</div>
<div class="ui attached segment markdown">
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
{{if .Attachments}}
<div class="ui bottom attached segment">
<div class="ui small images">
{{range .Attachments}}
<a target="_blank" href="/attachments/{{.UUID}}"><img class="ui image" src="/attachments/{{.UUID}}"></a>
{{end}}
</div>
</div>
{{end}}
</div>
</div>
{{end}}
<div class="comment form">
<a class="avatar" href="{{.SignedUser.HomeLink}}">
<img src="{{.SignedUser.AvatarLink}}">
</a>
<div class="content">
<form class="ui segment form" action="{{.Link}}" method="post">
<form class="ui segment form" action="{{.Link}}/comments" method="post">
{{template "repo/issue/comment_tab" .}}
{{.CsrfTokenHtml}}
<div class="text right">
<div class="ui red basic button" data-close="{{.i18n.Tr "repo.issues.close_issue"}}" data-close-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}">
{{.i18n.Tr "repo.issues.close_issue"}}
</div>
<div class="ui green button">
<button class="ui green button">
{{.i18n.Tr "repo.issues.create_comment"}}
</div>
</button>
</div>
</form>
</div>