本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
3.1KB

  1. <div class="sixteen wide column title">
  2. <div class="ui grid">
  3. <h1 class="twelve wide column">
  4. <span class="index">#{{.Issue.Index}}</span> <span id="issue-title" class="has-emoji">{{.Issue.Title}}</span>
  5. <div id="edit-title-input" class="ui input" style="display: none">
  6. <input value="{{.Issue.Title}}">
  7. </div>
  8. </h1>
  9. {{if and (or .IsIssueWriter .IsIssuePoster) (not .Repository.IsArchived)}}
  10. <div class="four wide column">
  11. <div class="edit-zone text right">
  12. <div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
  13. <div id="cancel-edit-title" class="ui basic blue in-edit button" style="display: none">{{.i18n.Tr "repo.issues.cancel"}}</div>
  14. <div id="save-edit-title" class="ui green in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">{{.i18n.Tr "repo.issues.save"}}</div>
  15. </div>
  16. </div>
  17. {{end}}
  18. </div>
  19. {{if .HasMerged}}
  20. <div class="ui purple large label"><i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls.merged"}}</div>
  21. {{else if .Issue.IsClosed}}
  22. <div class="ui red large label"><i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.closed_title"}}</div>
  23. {{else}}
  24. <div class="ui green large label"><i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_title"}}</div>
  25. {{end}}
  26. {{if .Issue.IsPull}}
  27. {{if .Issue.PullRequest.HasMerged}}
  28. {{ $mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.Lang }}
  29. {{if .Issue.OriginalAuthor }}
  30. {{.Issue.OriginalAuthor}}
  31. <span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}}</span>
  32. {{else}}
  33. <a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.GetDisplayName}}</a>
  34. <span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}}</span>
  35. {{end}}
  36. {{else}}
  37. {{if .Issue.OriginalAuthor }}
  38. {{.Issue.OriginalAuthor}}
  39. <span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
  40. {{else}}
  41. <a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
  42. <span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
  43. {{end}}
  44. {{end}}
  45. {{else}}
  46. {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }}
  47. <span class="time-desc">
  48. {{if .Issue.OriginalAuthor }}
  49. {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.OriginalAuthor | Safe}}
  50. {{else if gt .Issue.Poster.ID 0}}
  51. {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink (.Issue.Poster.GetDisplayName|Escape) | Safe}}
  52. {{else}}
  53. {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}}
  54. {{end}}
  55. ·
  56. {{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
  57. </span>
  58. {{end}}
  59. <div class="ui divider"></div>
  60. </div>
上海开阖软件有限公司 沪ICP备12045867号-1