2015-08-12 14:34:23 +05:30
|
|
|
<div class="ui grid">
|
|
|
|
{{if .Flash}}
|
|
|
|
<div class="sixteen wide column">
|
|
|
|
{{template "base/alert" .}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<div class="sixteen wide column title">
|
2015-08-19 20:44:57 +05:30
|
|
|
<div class="ui grid">
|
|
|
|
<h1 class="twelve wide column">
|
|
|
|
<span class="index">#{{.Issue.Index}}</span> <span id="issue-title">{{.Issue.Name}}</span>
|
|
|
|
<div id="edit-title-input" class="ui input" style="display: none">
|
|
|
|
<input value="{{.Issue.Name}}">
|
|
|
|
</div>
|
|
|
|
</h1>
|
|
|
|
{{if .IsIssueOwner}}
|
|
|
|
<div class="four wide column">
|
|
|
|
<div class="edit-zone text right">
|
|
|
|
<div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
|
|
|
|
<div id="cancel-edit-title" class="ui basic blue in-edit button" style="display: none">{{.i18n.Tr "repo.issues.cancel"}}</div>
|
|
|
|
<div id="save-edit-title" class="ui green in-edit button" style="display: none" data-update-url="{{.Link}}/title">{{.i18n.Tr "repo.issues.save"}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2015-08-12 14:34:23 +05:30
|
|
|
{{if .Issue.IsClosed}}
|
|
|
|
<div class="ui red large label"><i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.closed_title"}}</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="ui green large label"><i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_title"}}</div>
|
|
|
|
{{end}}
|
|
|
|
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
|
|
|
<span class="time-desc">
|
2015-08-15 00:24:39 +05:30
|
|
|
{{if gt .Issue.Poster.Id 0}}
|
2015-08-14 22:12:43 +05:30
|
|
|
{{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.Name | Safe}}
|
2015-08-15 00:24:39 +05:30
|
|
|
{{else}}
|
|
|
|
{{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
|
|
|
|
{{end}}
|
2015-08-12 14:34:23 +05:30
|
|
|
·
|
|
|
|
{{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
|
|
|
|
</span>
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
</div>
|
|
|
|
<div class="twelve wide column comment-list">
|
|
|
|
<ui class="ui comments">
|
|
|
|
<div class="comment">
|
2015-08-15 00:24:39 +05:30
|
|
|
<a class="avatar" {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
2015-08-14 00:13:40 +05:30
|
|
|
<img src="{{.Issue.Poster.AvatarLink}}">
|
2015-08-12 14:34:23 +05:30
|
|
|
</a>
|
|
|
|
<div class="content">
|
|
|
|
<div class="ui top attached header">
|
2015-08-15 00:24:39 +05:30
|
|
|
<span class="text grey"><a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
|
2015-08-12 14:34:23 +05:30
|
|
|
<div class="ui right actions">
|
2015-08-19 20:44:57 +05:30
|
|
|
{{if .IsIssueOwner}}
|
|
|
|
<a class="item" href="#"><i class="octicon octicon-pencil"></i></a>
|
|
|
|
{{end}}
|
2015-08-12 14:34:23 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui attached segment markdown">
|
2015-08-12 16:14:09 +05:30
|
|
|
{{if .Issue.RenderedContent}}
|
2015-08-12 14:34:23 +05:30
|
|
|
{{.Issue.RenderedContent|Str2html}}
|
2015-08-12 16:14:09 +05:30
|
|
|
{{else}}
|
|
|
|
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
|
|
|
|
{{end}}
|
2015-08-12 14:34:23 +05:30
|
|
|
</div>
|
|
|
|
{{if .Issue.Attachments}}
|
|
|
|
<div class="ui bottom attached segment">
|
|
|
|
<div class="ui small images">
|
|
|
|
{{range .Issue.Attachments}}
|
2015-08-12 16:14:09 +05:30
|
|
|
<a target="_blank" href="/attachments/{{.UUID}}"><img class="ui image" src="/attachments/{{.UUID}}"></a>
|
2015-08-12 14:34:23 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-12 16:14:09 +05:30
|
|
|
|
2015-08-13 13:37:11 +05:30
|
|
|
{{range .Issue.Comments}}
|
|
|
|
{{ $createdStr:= TimeSince .Created $.Lang }}
|
2015-08-13 20:51:43 +05:30
|
|
|
|
|
|
|
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, 5 = COMMENT_REF, 6 = PULL_REF -->
|
|
|
|
{{if eq .Type 0}}
|
2015-08-13 13:37:11 +05:30
|
|
|
<div class="comment">
|
2015-08-15 00:18:05 +05:30
|
|
|
<a class="avatar" {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
2015-08-13 13:37:11 +05:30
|
|
|
<img src="{{.Poster.AvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<div class="content">
|
|
|
|
<div class="ui top attached header">
|
2015-08-15 00:18:05 +05:30
|
|
|
<span class="text grey"><a {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
|
2015-08-13 13:37:11 +05:30
|
|
|
<div class="ui right actions">
|
2015-08-14 00:13:40 +05:30
|
|
|
{{if gt .ShowTag 0}}
|
2015-08-19 20:44:57 +05:30
|
|
|
<div class="item tag">
|
2015-08-14 00:13:40 +05:30
|
|
|
{{if eq .ShowTag 1}}
|
|
|
|
{{$.i18n.Tr "repo.issues.poster"}}
|
|
|
|
{{else if eq .ShowTag 2}}
|
|
|
|
{{$.i18n.Tr "repo.issues.admin"}}
|
|
|
|
{{else if eq .ShowTag 3}}
|
|
|
|
{{$.i18n.Tr "repo.issues.owner"}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-08-19 20:44:57 +05:30
|
|
|
{{if or $.IsRepositoryAdmin (eq .Poster.Id $.SignedUserID)}}
|
|
|
|
<a class="item" href="#"><i class="octicon octicon-pencil"></i></a>
|
|
|
|
{{end}}
|
2015-08-13 13:37:11 +05:30
|
|
|
</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>
|
2015-08-13 20:51:43 +05:30
|
|
|
{{else if eq .Type 1}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.AvatarLink}}">
|
|
|
|
</a>
|
2015-08-14 00:13:40 +05:30
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
|
2015-08-13 20:51:43 +05:30
|
|
|
</div>
|
|
|
|
{{else if eq .Type 2}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-circle-slash"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.AvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2015-08-13 13:37:11 +05:30
|
|
|
{{end}}
|
|
|
|
|
2015-08-14 00:13:40 +05:30
|
|
|
{{if .IsSigned}}
|
2015-08-12 16:14:09 +05:30
|
|
|
<div class="comment form">
|
|
|
|
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
|
|
|
<img src="{{.SignedUser.AvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<div class="content">
|
2015-08-13 20:51:43 +05:30
|
|
|
<form class="ui segment form" id="comment-form" action="{{.Link}}/comments" method="post">
|
2015-08-12 16:14:09 +05:30
|
|
|
{{template "repo/issue/comment_tab" .}}
|
2015-08-13 13:37:11 +05:30
|
|
|
{{.CsrfTokenHtml}}
|
2015-08-13 20:51:43 +05:30
|
|
|
<input id="status" name="status" type="hidden">
|
2015-08-12 16:14:09 +05:30
|
|
|
<div class="text right">
|
2015-08-15 00:18:05 +05:30
|
|
|
{{if .IsIssueOwner}}
|
2015-08-13 20:51:43 +05:30
|
|
|
{{if .Issue.IsClosed}}
|
|
|
|
<div id="status-button" class="ui green basic button" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
|
|
|
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div id="status-button" class="ui red basic button" data-status="{{.i18n.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
|
2015-08-12 16:14:09 +05:30
|
|
|
{{.i18n.Tr "repo.issues.close_issue"}}
|
|
|
|
</div>
|
2015-08-13 20:51:43 +05:30
|
|
|
{{end}}
|
2015-08-15 00:18:05 +05:30
|
|
|
{{end}}
|
2015-08-13 13:37:11 +05:30
|
|
|
<button class="ui green button">
|
2015-08-12 16:14:09 +05:30
|
|
|
{{.i18n.Tr "repo.issues.create_comment"}}
|
2015-08-13 13:37:11 +05:30
|
|
|
</button>
|
2015-08-12 16:14:09 +05:30
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-14 00:13:40 +05:30
|
|
|
{{else}}
|
|
|
|
<div class="ui warning message">
|
|
|
|
<a href="/user/sign_up" class="ui green button">{{.i18n.Tr "repo.issues.sign_up_for_free"}}</a>
|
|
|
|
{{.i18n.Tr "repo.issues.sign_in_require_desc" "/user/login" | Safe}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-08-12 14:34:23 +05:30
|
|
|
</ui>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="four wide column">
|
|
|
|
<div class="ui segment metas">
|
2015-08-14 22:12:43 +05:30
|
|
|
<div class="ui {{if not .IsRepositoryAdmin}}disabled{{end}} jump select-label dropdown">
|
2015-08-12 14:34:23 +05:30
|
|
|
<span class="text">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
|
|
|
<span class="octicon octicon-gear"></span>
|
|
|
|
</span>
|
2015-08-14 22:12:43 +05:30
|
|
|
<div class="filter menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/label">
|
2015-08-12 14:34:23 +05:30
|
|
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
|
|
|
{{range .Labels}}
|
|
|
|
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui labels list">
|
|
|
|
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
|
2015-08-14 22:12:43 +05:30
|
|
|
{{range .Labels}}
|
|
|
|
<a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
|
2015-08-12 14:34:23 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
2015-08-14 22:12:43 +05:30
|
|
|
<div class="ui {{if not .IsRepositoryAdmin}}disabled{{end}} jump select-milestone dropdown">
|
2015-08-12 14:34:23 +05:30
|
|
|
<span class="text">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
|
|
|
<span class="octicon octicon-gear"></span>
|
|
|
|
</span>
|
2015-08-14 22:12:43 +05:30
|
|
|
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/milestone">
|
2015-08-12 14:34:23 +05:30
|
|
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
|
|
|
{{if .OpenMilestones}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="header">
|
|
|
|
<i class="octicon octicon-milestone"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
|
|
|
</div>
|
|
|
|
{{range .OpenMilestones}}
|
|
|
|
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{if .ClosedMilestones}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="header">
|
|
|
|
<i class="octicon octicon-milestone"></i>
|
|
|
|
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
|
|
|
</div>
|
|
|
|
{{range .ClosedMilestones}}
|
|
|
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui select-milestone list">
|
|
|
|
<span class="no-select item {{if .Issue.Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
|
|
|
|
<div class="selected">
|
|
|
|
{{if .Issue.Milestone}}
|
|
|
|
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
|
2015-08-14 22:12:43 +05:30
|
|
|
<div class="ui {{if not .IsRepositoryAdmin}}disabled{{end}} jump select-assignee dropdown">
|
2015-08-12 14:34:23 +05:30
|
|
|
<span class="text">
|
|
|
|
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
|
|
|
|
<span class="octicon octicon-gear"></span>
|
|
|
|
</span>
|
2015-08-14 22:12:43 +05:30
|
|
|
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee">
|
2015-08-12 14:34:23 +05:30
|
|
|
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
|
|
|
|
{{range .Assignees}}
|
2015-08-15 08:54:41 +05:30
|
|
|
<div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
|
2015-08-12 14:34:23 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui select-assignee list">
|
|
|
|
<span class="no-select item {{if .Issue.Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
|
|
|
|
<div class="selected">
|
|
|
|
{{if .Issue.Assignee}}
|
2015-08-15 08:54:41 +05:30
|
|
|
<a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.Id}}"><img class="ui avatar image" src="{{.Issue.Assignee.AvatarLink}}"> {{.Issue.Assignee.Name}}</a>
|
2015-08-12 14:34:23 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|