|
|
|
@ -85,32 +85,34 @@
|
|
|
|
|
{{ctx.AvatarUtils.Avatar .SignedUser 40}}
|
|
|
|
|
</a>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<form class="ui segment form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
|
|
|
|
{{template "repo/issue/comment_tab" .}}
|
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
|
<div class="field footer">
|
|
|
|
|
<div class="text right">
|
|
|
|
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
|
|
|
|
{{if .Issue.IsClosed}}
|
|
|
|
|
<button id="status-button" class="ui primary basic button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.reopen_issue"}}
|
|
|
|
|
</button>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{$closeTranslationKey := "repo.issues.close"}}
|
|
|
|
|
{{if .Issue.IsPull}}
|
|
|
|
|
{{$closeTranslationKey = "repo.pulls.close"}}
|
|
|
|
|
<div class="ui segment">
|
|
|
|
|
<form class="ui form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
|
|
|
|
{{template "repo/issue/comment_tab" .}}
|
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
|
<div class="field footer">
|
|
|
|
|
<div class="text right">
|
|
|
|
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
|
|
|
|
{{if .Issue.IsClosed}}
|
|
|
|
|
<button id="status-button" class="ui primary basic button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.reopen_issue"}}
|
|
|
|
|
</button>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{$closeTranslationKey := "repo.issues.close"}}
|
|
|
|
|
{{if .Issue.IsPull}}
|
|
|
|
|
{{$closeTranslationKey = "repo.pulls.close"}}
|
|
|
|
|
{{end}}
|
|
|
|
|
<button id="status-button" class="ui red basic button" data-status="{{ctx.Locale.Tr $closeTranslationKey}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.close_comment_issue"}}" name="status" value="close">
|
|
|
|
|
{{ctx.Locale.Tr $closeTranslationKey}}
|
|
|
|
|
</button>
|
|
|
|
|
{{end}}
|
|
|
|
|
<button id="status-button" class="ui red basic button" data-status="{{ctx.Locale.Tr $closeTranslationKey}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.close_comment_issue"}}" name="status" value="close">
|
|
|
|
|
{{ctx.Locale.Tr $closeTranslationKey}}
|
|
|
|
|
</button>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
<button class="ui primary button">
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.create_comment"}}
|
|
|
|
|
</button>
|
|
|
|
|
<button class="ui primary button">
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.create_comment"}}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if .Repository.IsArchived}}
|
|
|
|
|