forked from hinterland/hearth
feat: vendor gitea 1.16.2
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
PR: https://github.com/go-gitea/gitea/pull/32744
|
||||
|
||||
The Issue.Ref was added by Add possibility to record branch or tag information in an issue (#780)
|
||||
After 8 years, this "branch selector" does nothing more than saving the branch/tag name into database and displays it.
|
||||
After 8 years, this "branch selector" does nothing more than saving the branch/tag name into database and displays it,
|
||||
or sometimes auto-close a ref-matched issue by a commit message when CloseIssuesViaCommitInAnyBranch=false.
|
||||
|
||||
There are still users using it:
|
||||
* @didim99: it is a really useful feature to specify a branch in which issue found.
|
||||
@@ -38,7 +39,7 @@ Still needs to figure out:
|
||||
<div class="branch-tag-divider"></div>
|
||||
<div id="branch-list" class="scrolling menu reference-list-menu">
|
||||
{{if or .Reference (not .Issue)}}
|
||||
<div class="item text small" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
|
||||
<div class="item tw-text-xs" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
|
||||
{{end}}
|
||||
{{range .Branches}}
|
||||
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" title="{{.}}">{{.}}</div>
|
||||
@@ -48,7 +49,7 @@ Still needs to figure out:
|
||||
</div>
|
||||
<div id="tag-list" class="scrolling menu reference-list-menu tw-hidden">
|
||||
{{if or .Reference (not .Issue)}}
|
||||
<div class="item text small" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
|
||||
<div class="item tw-text-xs" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div>
|
||||
{{end}}
|
||||
{{range .Tags}}
|
||||
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
</div>
|
||||
<a class="issue-card-title muted issue-title tw-break-anywhere" href="{{.Link}}">{{.Title | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
|
||||
{{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}}
|
||||
<a role="button" class="issue-card-unpin muted tw-flex tw-items-center" data-tooltip-content={{ctx.Locale.Tr "repo.issues.unpin"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}">
|
||||
<a role="button" class="issue-card-unpin muted flex-text-inline" data-tooltip-content={{ctx.Locale.Tr "repo.issues.unpin"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}">
|
||||
{{svg "octicon-x" 16}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
<span class="text light grey muted-links">
|
||||
<span class="tw-text-grey-light muted-links">
|
||||
{{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}}
|
||||
{{$timeStr := DateUtils.TimeSince .GetLastEventTimestamp}}
|
||||
{{if .OriginalAuthor}}
|
||||
@@ -46,8 +46,8 @@
|
||||
{{range index $.Page.LinkedPRs .ID}}
|
||||
<div class="meta tw-my-1">
|
||||
<a href="{{.Repo.Link}}/pulls/{{.Index}}">
|
||||
<span class="tw-m-0 text {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "tw-mr-1 tw-align-middle"}}</span>
|
||||
<span class="tw-align-middle">{{.Title}} <span class="text light grey">#{{.Index}}</span></span>
|
||||
<span class="tw-m-0 {{if .PullRequest.HasMerged}}tw-text-purple{{else if .IsClosed}}tw-text-red{{else}}tw-text-green{{end}}">{{svg "octicon-git-merge" 16 "tw-mr-1 tw-align-middle"}}</span>
|
||||
<span class="tw-align-middle">{{.Title}} <span class="tw-text-grey-light">#{{.Index}}</span></span>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
<div class="field">
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"CustomInit" true
|
||||
"MarkdownPreviewInRepo" $.Repository
|
||||
"MarkdownPreviewMode" "comment"
|
||||
"MarkdownEditorContext" (ctx.MiscUtils.MarkdownEditorComment $.Repository)
|
||||
"TextareaName" "content"
|
||||
"TextareaContent" $textareaContent
|
||||
"TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.comment.placeholder")
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"CustomInit" true
|
||||
"ContainerClasses" "tw-hidden"
|
||||
"MarkdownPreviewInRepo" $.root.Repository
|
||||
"MarkdownPreviewMode" "comment"
|
||||
"MarkdownEditorContext" (ctx.MiscUtils.MarkdownEditorComment ctx.RootData.Repository)
|
||||
"TextareaContent" .item.Attributes.value
|
||||
"TextareaPlaceholder" .item.Attributes.placeholder
|
||||
"DropzoneParentContainer" ".combo-editor-dropzone"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{{/* Milestone filter dropdown partial
|
||||
* QueryLink: the base query link for building filter URLs
|
||||
* MilestoneID: the currently selected milestone ID (0=all, -1=none, >0=specific)
|
||||
* OpenMilestones: list of open milestones
|
||||
* ClosedMilestones: list of closed milestones
|
||||
*/}}
|
||||
{{$queryLink := .QueryLink}}
|
||||
<div class="item ui dropdown jump {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}}">
|
||||
<span class="text">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_milestone"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestone"}}">
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<a class="{{if not .MilestoneID}}active selected {{end}}item" href="{{QueryBuild $queryLink "milestone" NIL}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_all"}}</a>
|
||||
<a class="{{if .MilestoneID}}{{if eq .MilestoneID -1}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" -1}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_none"}}</a>
|
||||
{{if .OpenMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div>
|
||||
{{range .OpenMilestones}}
|
||||
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" .ID}}">
|
||||
{{svg "octicon-milestone" 16 "mr-2"}}
|
||||
{{.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ClosedMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_closed"}}</div>
|
||||
{{range .ClosedMilestones}}
|
||||
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" .ID}}">
|
||||
{{svg "octicon-milestone" 16 "mr-2"}}
|
||||
{{.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -10,7 +10,7 @@
|
||||
{{$queryLink := .QueryLink}}
|
||||
<div class="item ui dropdown jump {{if not .UserSearchList}}disabled{{end}}">
|
||||
{{$.TextFilterTitle}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<div class="menu flex-items-menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_user_placeholder"}}">
|
||||
|
||||
@@ -3,42 +3,12 @@
|
||||
{{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLink "SupportArchivedLabel" true}}
|
||||
|
||||
{{if not .Milestone}}
|
||||
<!-- Milestone -->
|
||||
<div class="item ui dropdown jump {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}}">
|
||||
<span class="text">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_milestone"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestone"}}">
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<a class="{{if not $.MilestoneID}}active selected {{end}}item" href="{{QueryBuild $queryLink "milestone" NIL}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_all"}}</a>
|
||||
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID -1}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" -1}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_none"}}</a>
|
||||
{{if .OpenMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div>
|
||||
{{range .OpenMilestones}}
|
||||
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" .ID}}">
|
||||
{{svg "octicon-milestone" 16 "mr-2"}}
|
||||
{{.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ClosedMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_closed"}}</div>
|
||||
{{range .ClosedMilestones}}
|
||||
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{QueryBuild $queryLink "milestone" .ID}}">
|
||||
{{svg "octicon-milestone" 16 "mr-2"}}
|
||||
{{.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "repo/issue/filter_item_milestone" dict
|
||||
"QueryLink" $queryLink
|
||||
"MilestoneID" $.MilestoneID
|
||||
"OpenMilestones" .OpenMilestones
|
||||
"ClosedMilestones" .ClosedMilestones
|
||||
}}
|
||||
{{end}}
|
||||
|
||||
<!-- Project -->
|
||||
@@ -133,11 +103,13 @@
|
||||
<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "leastcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||
<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "nearduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
|
||||
<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "farduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
|
||||
<div class="divider"></div>
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_label"}}</div>
|
||||
{{range $scope := .ExclusiveLabelScopes}}
|
||||
{{$sortType := (printf "scope-%s" $scope)}}
|
||||
<a class="{{if eq $.SortType $sortType}}active {{end}}item" href="{{QueryBuild $queryLink "sort" $sortType}}">{{$scope}}</a>
|
||||
{{if .ExclusiveLabelScopes}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_label"}}</div>
|
||||
{{range $scope := .ExclusiveLabelScopes}}
|
||||
{{$sortType := (printf "scope-%s" $scope)}}
|
||||
<a class="{{if eq $.SortType $sortType}}active {{end}}item" href="{{QueryBuild $queryLink "sort" $sortType}}">{{$scope}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<div class="header"></div>
|
||||
<div class="content">
|
||||
<form class="ui form ignore-dirty form-fetch-action" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input name="id" type="hidden">
|
||||
<div class="required field">
|
||||
<label for="name">{{ctx.Locale.Tr "repo.issues.label_title"}}</label>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="twelve wide computer column">
|
||||
<p>{{ctx.Locale.Tr "repo.issues.label_templates.info"}}</p>
|
||||
<form class="ui form center" action="{{.Link}}/initialize" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" name="template_name" value="Default">
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
{{if .PageIsIssueList}}
|
||||
<a class="ui small primary button issue-list-new" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
|
||||
{{else}}
|
||||
<a class="ui small primary button new-pr-button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
|
||||
<a class="ui small primary button new-pr-button issue-list-new {{if not .PullRequestCtx.CanCreateNewPull}}disabled{{end}}" href="{{.PullRequestCtx.MakeDefaultCompareLink .Repository.DefaultBranch}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{/* archived, view compare page only */}}
|
||||
{{if not .PageIsIssueList}}
|
||||
<a class="ui small primary small button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "action.compare_commits_general"}}</a>
|
||||
<a class="ui small primary small button issue-list-new" href="{{.PullRequestCtx.MakeDefaultCompareLink .Repository.DefaultBranch}}">{{ctx.Locale.Tr "action.compare_commits_general"}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
{{else}}
|
||||
|
||||
{{if .Milestone.DeadlineString}}
|
||||
<span{{if .IsOverdue}} class="text red"{{end}}>
|
||||
<span{{if .IsOverdue}} class="tw-text-red"{{end}}>
|
||||
{{svg "octicon-calendar"}}
|
||||
{{DateUtils.AbsoluteShort (.Milestone.DeadlineString|DateUtils.ParseLegacy)}}
|
||||
</span>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
</h2>
|
||||
{{template "base/alert" .}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{ctx.Locale.Tr "repo.milestones.title"}}</label>
|
||||
<input name="title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required maxlength="50">
|
||||
@@ -37,8 +36,7 @@
|
||||
<div class="field">
|
||||
<label>{{ctx.Locale.Tr "repo.milestones.desc"}}</label>
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"MarkdownPreviewInRepo" $.Repository
|
||||
"MarkdownPreviewMode" "comment"
|
||||
"MarkdownEditorContext" (ctx.MiscUtils.MarkdownEditorComment $.Repository)
|
||||
"TextareaName" "content"
|
||||
"TextareaContent" .content
|
||||
"TextareaPlaceholder" (ctx.Locale.Tr "repo.milestones.desc")
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
{{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
|
||||
{{else}}
|
||||
{{if .DeadlineString}}
|
||||
<span class="flex-text-inline {{if .IsOverdue}}text red{{end}}">
|
||||
<span class="flex-text-inline {{if .IsOverdue}}tw-text-red{{end}}">
|
||||
{{svg "octicon-calendar" 14}}
|
||||
{{DateUtils.AbsoluteShort (.DeadlineString|DateUtils.ParseLegacy)}}
|
||||
</span>
|
||||
@@ -76,7 +76,7 @@
|
||||
{{else}}
|
||||
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{ctx.Locale.Tr "repo.milestones.close"}}</a>
|
||||
{{end}}
|
||||
<a class="link-action flex-text-inline text red" href data-modal-confirm="#repo-milestone-delete-modal" data-url="{{$.RepoLink}}/milestones/delete?id={{.ID}}">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
|
||||
<a class="link-action flex-text-inline tw-text-red" href data-modal-confirm="#repo-milestone-delete-modal" data-url="{{$.RepoLink}}/milestones/delete?id={{.ID}}">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{{template "base/alert" .}}
|
||||
<form class="issue-content ui comment form form-fetch-action" id="new-issue" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="issue-content-left">
|
||||
<div class="ui comments">
|
||||
<div class="comment">
|
||||
<div class=" tw-mr-4 not-mobile">{{ctx.AvatarUtils.Avatar .SignedUser 40}}</div>
|
||||
<div class="ui segment content tw-my-0 avatar-content-left-arrow">
|
||||
<div class="field">
|
||||
<input name="title" data-global-init="initInputAutoFocusEnd" id="issue_title" required maxlength="255" autocomplete="off"
|
||||
<input name="title" data-global-init="autoFocusEnd" id="issue_title" required maxlength="255" autocomplete="off"
|
||||
placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}"
|
||||
value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}"
|
||||
>
|
||||
@@ -47,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="issue-content-right ui segment">
|
||||
<div class="issue-content-right ui segment" data-global-init="initRepoIssueSidebar">
|
||||
{{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
|
||||
|
||||
{{if .PageIsComparePull}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{{end}}
|
||||
{{template "shared/search/input" dict "Value" .Keyword}}
|
||||
{{if .PageIsIssueList}}
|
||||
<button id="issue-list-quick-goto" class="ui small icon button tw-hidden" data-tooltip-content="{{ctx.Locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button>
|
||||
<button id="issue-list-quick-goto" type="button" class="ui small icon button tw-hidden tw-mr-[-1px]" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash" 12}} {{ctx.Locale.Tr "repo.issues.quick_goto"}}</button>
|
||||
{{end}}
|
||||
{{template "shared/search/button"}}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{{$pageMeta := .}}
|
||||
{{$data := .AssigneesData}}
|
||||
{{$listBaseLink := print $pageMeta.RepoLink (Iif $pageMeta.IsPullRequest "/pulls" "/issues")}}
|
||||
{{/* TODO: it seems that the code keeps checking $pageMeta.Issue and assumes that it might not exist, need to figure out why */}}
|
||||
{{$issueAssignees := NIL}}{{if $pageMeta.Issue}}{{$issueAssignees = $pageMeta.Issue.Assignees}}{{end}}
|
||||
<div class="divider"></div>
|
||||
<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
|
||||
@@ -19,7 +21,7 @@
|
||||
<div class="item clear-selection" data-text="">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
|
||||
<div class="divider"></div>
|
||||
{{range $data.CandidateAssignees}}
|
||||
<a class="item" href="#" data-value="{{.ID}}">
|
||||
<a class="item" href="{{$listBaseLink}}?assignee={{.ID}}" data-value="{{.ID}}">
|
||||
<span class="item-check-mark">{{svg "octicon-check"}}</span>
|
||||
{{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
|
||||
</a>
|
||||
@@ -30,8 +32,8 @@
|
||||
<div class="ui relaxed list muted-links flex-items-block">
|
||||
<span class="item empty-list {{if $issueAssignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
|
||||
{{range $issueAssignees}}
|
||||
<a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
|
||||
{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
|
||||
<a class="item" href="{{$listBaseLink}}?assignee={{.ID}}">
|
||||
{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="ui form tw-mt-2">
|
||||
{{if .Issue.DeadlineUnix}}
|
||||
<div class="tw-flex tw-justify-between tw-items-center tw-gap-2">
|
||||
<div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}>
|
||||
<div class="due-date {{if .Issue.IsOverdue}}tw-text-red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}>
|
||||
{{svg "octicon-calendar"}} {{DateUtils.AbsoluteLong .Issue.DeadlineUnix}}
|
||||
</div>
|
||||
<div class="flex-text-block">
|
||||
@@ -21,7 +21,6 @@
|
||||
<form class="ui fluid action input issue-due-form form-fetch-action tw-mt-2 {{if .Issue.DeadlineUnix}}tw-hidden{{end}}"
|
||||
method="post" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline"
|
||||
>
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input required type="date" name="deadline" placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if .Issue.DeadlineUnix}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}}>
|
||||
<button class="ui icon button">{{Iif .Issue.DeadlineUnix (svg "octicon-pencil") (svg "octicon-plus")}}</button>
|
||||
</form>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<a class="muted issue-dependency-title gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
|
||||
#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
|
||||
</a>
|
||||
<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
|
||||
<div class="tw-text-xs gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
|
||||
{{.Repository.OwnerName}}/{{.Repository.Name}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
<a class="muted issue-dependency-title gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
|
||||
#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
|
||||
</a>
|
||||
<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
|
||||
<div class="tw-text-xs gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
|
||||
{{.Repository.OwnerName}}/{{.Repository.Name}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,7 +84,7 @@
|
||||
#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
|
||||
<div class="tw-text-xs gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
|
||||
{{.Repository.OwnerName}}/{{.Repository.Name}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,7 +110,6 @@
|
||||
{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
|
||||
<div>
|
||||
<form method="post" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<div class="ui fluid action input">
|
||||
<div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}" data-issue-cross-repo-search="{{.AllowCrossRepositoryDependencies}}">
|
||||
<input name="newDependency" type="hidden">
|
||||
@@ -131,7 +130,6 @@
|
||||
<form id="issue-remove-dependency-confirm" class="ui g-modal-confirm modal" method="post" action="{{.Issue.Link}}/dependency/delete">
|
||||
<div class="header">{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.dependency.remove_header"}}</div>
|
||||
<div class="content">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" value="" name="removeDependencyID" class="remove-dependency-id">
|
||||
<input type="hidden" value="" name="dependencyType" class="dependency-type">
|
||||
<p>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
{{/* Pin issue */}}
|
||||
{{if or .PinEnabled .Issue.IsPinned}}
|
||||
<form class="tw-mt-1 form-fetch-action single-button-form" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.max_pinned"}}"{{end}}>
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}">
|
||||
{{if not .Issue.IsPinned}}
|
||||
{{svg "octicon-pin"}}
|
||||
@@ -46,7 +45,6 @@
|
||||
</div>
|
||||
|
||||
<form class="ui form form-fetch-action" method="post" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}">
|
||||
{{.CsrfTokenHtml}}
|
||||
|
||||
{{if not .Issue.IsLocked}}
|
||||
<div class="field">
|
||||
@@ -103,7 +101,6 @@
|
||||
</p>
|
||||
</div>
|
||||
<form action="{{.Issue.Link}}/delete" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{template "base/modal_actions_confirm" .}}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{{$pageMeta := .}}
|
||||
{{$data := .LabelsData}}
|
||||
{{$listBaseLink := print $pageMeta.RepoLink (Iif $pageMeta.IsPullRequest "/pulls" "/issues")}}
|
||||
<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
|
||||
{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/labels?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
|
||||
>
|
||||
@@ -26,7 +27,7 @@
|
||||
<div class="divider" data-scope="{{.ExclusiveScope}}"></div>
|
||||
{{end}}
|
||||
{{$previousExclusiveScope = $exclusiveScope}}
|
||||
{{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
|
||||
{{template "repo/issue/sidebar/label_list_item" dict "Label" . "LabelLink" (print $listBaseLink "?labels=" .ID)}}
|
||||
{{end}}
|
||||
{{if and $data.RepoLabels $data.OrgLabels}}<div class="divider"></div>{{end}}
|
||||
{{$previousExclusiveScope = "_no_scope"}}
|
||||
@@ -36,7 +37,7 @@
|
||||
<div class="divider" data-scope="{{.ExclusiveScope}}"></div>
|
||||
{{end}}
|
||||
{{$previousExclusiveScope = $exclusiveScope}}
|
||||
{{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
|
||||
{{template "repo/issue/sidebar/label_list_item" dict "Label" . "LabelLink" (print $listBaseLink "?labels=" .ID)}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -47,7 +48,7 @@
|
||||
<span class="item empty-list {{if $data.SelectedLabelIDs}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_label"}}</span>
|
||||
{{range $data.AllLabels}}
|
||||
{{if .IsChecked}}
|
||||
<a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?labels={{.ID}}">
|
||||
<a class="item" href="{{$listBaseLink}}?labels={{.ID}}">
|
||||
{{- ctx.RenderUtils.RenderLabel . -}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{{$label := .Label}}
|
||||
<a class="item muted {{if $label.IsChecked}}checked{{else if $label.IsArchived}}tw-hidden{{end}}" href="#"
|
||||
{{$labelLink := or .LabelLink "#"}}
|
||||
<a class="item muted {{if $label.IsChecked}}checked{{else if $label.IsArchived}}tw-hidden{{end}}" href="{{$labelLink}}"
|
||||
data-scope="{{$label.ExclusiveScope}}" data-value="{{$label.ID}}" {{if $label.IsArchived}}data-is-archived{{end}}
|
||||
>
|
||||
<span class="item-check-mark">{{svg (Iif $label.ExclusiveScope "octicon-dot-fill" "octicon-check")}}</span>
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
<i class="icon">{{svg "octicon-search"}}</i>
|
||||
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestones"}}">
|
||||
</div>
|
||||
<div class="scrolling menu">
|
||||
<div class="scrolling menu flex-items-menu">
|
||||
<div class="item clear-selection" data-text="">{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||
<div class="divider"></div>
|
||||
{{if $data.OpenMilestones}}
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div>
|
||||
{{range $data.OpenMilestones}}
|
||||
<a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/milestone/{{.ID}}">
|
||||
{{svg "octicon-milestone" 18}} {{.Name}}
|
||||
{{svg "octicon-milestone" 18 "tw-shrink-0"}}<span class="tw-flex-1 tw-break-anywhere">{{.Name}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_closed"}}</div>
|
||||
{{range $data.ClosedMilestones}}
|
||||
<a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/milestone/{{.ID}}">
|
||||
{{svg "octicon-milestone" 18}} {{.Name}}
|
||||
{{svg "octicon-milestone" 18 "tw-shrink-0"}}<span class="tw-flex-1 tw-break-anywhere">{{.Name}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -47,7 +47,7 @@
|
||||
<span class="item empty-list {{if $issueMilestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
{{if $issueMilestone}}
|
||||
<a class="item" href="{{$pageMeta.RepoLink}}/milestone/{{$issueMilestone.ID}}">
|
||||
{{svg "octicon-milestone" 18}} {{$issueMilestone.Name}}
|
||||
{{svg "octicon-milestone" 18 "tw-shrink-0"}}<span class="tw-flex-1 tw-break-anywhere">{{$issueMilestone.Name}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="issue-sidebar-combo" data-selection-mode="single" data-update-algo="all"
|
||||
{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/projects?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
|
||||
>
|
||||
<input class="combo-value" name="project_id" type="hidden" value="{{$data.SelectedProjectID}}">
|
||||
<input class="combo-value" name="project_id" type="hidden" value="{{if and $pageMeta.CanModifyIssueOrPull $data.SelectedProjectIDs}}{{index $data.SelectedProjectIDs 0}}{{end}}">
|
||||
<div class="ui dropdown full-width {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
|
||||
<a class="fixed-text muted">
|
||||
<strong>{{ctx.Locale.Tr "repo.issues.new.projects"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
|
||||
@@ -17,14 +17,14 @@
|
||||
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_projects"}}">
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="scrolling menu">
|
||||
<div class="scrolling menu flex-items-menu">
|
||||
<div class="item clear-selection" data-text="">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
|
||||
<div class="divider"></div>
|
||||
{{if $data.OpenProjects}}
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.new.open_projects"}}</div>
|
||||
{{range $data.OpenProjects}}
|
||||
<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
|
||||
{{svg .IconName 18}} {{.Title}}
|
||||
{{svg .IconName 18 "tw-shrink-0"}}<span class="tw-flex-1 tw-break-anywhere">{{.Title}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}</div>
|
||||
{{range $data.ClosedProjects}}
|
||||
<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
|
||||
{{svg .IconName 18}} {{.Title}}
|
||||
{{svg .IconName 18 "tw-shrink-0"}}<span class="tw-flex-1 tw-break-anywhere">{{.Title}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -44,7 +44,7 @@
|
||||
<span class="item empty-list {{if $issueProject}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||
{{if $issueProject}}
|
||||
<a class="item" href="{{$issueProject.Link ctx}}">
|
||||
{{svg $issueProject.IconName 18}} {{$issueProject.Title}}
|
||||
{{svg $issueProject.IconName 18 "tw-shrink-0"}}<span class="tw-flex-1 tw-break-anywhere">{{$issueProject.Title}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
<span {{if .Review.TooltipContent}}data-tooltip-content="{{ctx.Locale.Tr .Review.TooltipContent}}"{{end}}>
|
||||
{{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
|
||||
{{svg (printf "octicon-%s" .Review.Type.Icon) 16 .Review.HTMLTypeColorClass}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@
|
||||
</div>
|
||||
<div class="flex-text-inline">
|
||||
<span {{if .TooltipContent}}data-tooltip-content="{{ctx.Locale.Tr .TooltipContent}}"{{end}}>
|
||||
{{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
|
||||
{{svg (printf "octicon-%s" .Type.Icon) 16 .HTMLTypeColorClass}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,7 +115,6 @@
|
||||
{{ctx.Locale.Tr "repo.issues.dismiss_review_warning"}}
|
||||
</div>
|
||||
<form class="ui form" action="{{$pageMeta.RepoLink}}/issues/dismiss_review" method="post">
|
||||
{{ctx.RootData.CsrfTokenHtml}}
|
||||
<input type="hidden" class="reviewer-id" name="review_id">
|
||||
<div class="field">
|
||||
<label for="issue-sidebar-dismiss-review-message">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</label>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.time_estimate_set"}}</div>
|
||||
<form method="post" class="ui form form-fetch-action" action="{{.Issue.Link}}/time_estimate">
|
||||
<div class="content">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input name="time_estimate" placeholder="1h 2m" value="{{TimeEstimateString .Issue.TimeEstimate}}">
|
||||
<div class="actions">
|
||||
<button class="ui cancel button">{{ctx.Locale.Tr "cancel"}}</button>
|
||||
@@ -54,7 +53,6 @@
|
||||
<div class="header">{{ctx.Locale.Tr "repo.issues.add_time_manually"}}</div>
|
||||
<form method="post" class="ui form form-fetch-action" action="{{.Issue.Link}}/times/add">
|
||||
<div class="content flex-text-block">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours">:
|
||||
<input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes">
|
||||
</div>
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
<div class="comment-header avatar-content-left-arrow" role="heading" aria-level="3">
|
||||
<div class="comment-header-left">
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<span class="text black tw-font-semibold">
|
||||
<span class="tw-text-text tw-font-semibold">
|
||||
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
|
||||
{{.Issue.OriginalAuthor}}
|
||||
</span>
|
||||
<span class="text grey muted-links">
|
||||
<span class="tw-text-text-light muted-links">
|
||||
{{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
|
||||
</span>
|
||||
<span class="text migrate">
|
||||
@@ -30,7 +30,7 @@
|
||||
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
|
||||
{{ctx.AvatarUtils.Avatar .Issue.Poster 24}}
|
||||
</a>
|
||||
<span class="text grey muted-links">
|
||||
<span class="tw-text-text-light muted-links">
|
||||
{{template "shared/user/authorlink" .Issue.Poster}}
|
||||
{{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
|
||||
</span>
|
||||
@@ -52,7 +52,7 @@
|
||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issue-{{.Issue.ID}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
|
||||
<div id="{{.Issue.HashTag}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
|
||||
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-content-version="{{.Issue.ContentVersion}}" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
|
||||
{{if .Issue.Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
|
||||
@@ -66,6 +66,7 @@
|
||||
</div>
|
||||
|
||||
{{template "repo/issue/view_content/comments" .}}
|
||||
<div class="timeline-item tw-hidden" id="timeline-comments-end"></div>
|
||||
|
||||
{{if and .Issue.IsPull (not $.Repository.IsArchived)}}
|
||||
{{template "repo/issue/view_content/pull_merge_box".}}
|
||||
@@ -81,23 +82,27 @@
|
||||
<div class="ui segment avatar-content-left-arrow">
|
||||
<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="flex-text-block tw-justify-end">
|
||||
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
||||
{{$btnIconColor := ""}}{{$btnIcon := ""}}{{$btnTextNoComment := ""}}{{$btnTextWithComment := ""}}{{$btnValue := ""}}
|
||||
{{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>
|
||||
{{$btnValue = "reopen"}}
|
||||
{{$btnIconColor = "tw-text-green"}}
|
||||
{{$btnIcon = Iif .Issue.IsPull "octicon-git-pull-request" "octicon-issue-reopened"}}
|
||||
{{$btnTextNoComment = ctx.Locale.Tr (Iif .Issue.IsPull "repo.pulls.reopen" "repo.issues.reopen_issue")}}
|
||||
{{$btnTextWithComment = ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}{{/* general: Reopen with Comment */}}
|
||||
{{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>
|
||||
{{$btnValue = "close"}}
|
||||
{{$btnIconColor = "tw-text-red"}}
|
||||
{{$btnIcon = Iif .Issue.IsPull "octicon-git-pull-request-closed" "octicon-issue-closed"}}
|
||||
{{$btnTextNoComment = ctx.Locale.Tr (Iif .Issue.IsPull "repo.pulls.close" "repo.issues.close")}}
|
||||
{{$btnTextWithComment = ctx.Locale.Tr "repo.issues.close_comment_issue"}}{{/* general: Close with Comment */}}
|
||||
{{end}}
|
||||
<button id="status-button" class="ui button" data-status="{{$btnTextNoComment}}" data-status-and-comment="{{$btnTextWithComment}}" name="status" value="{{$btnValue}}">
|
||||
<span class="status-button-icon {{$btnIconColor}}">{{svg $btnIcon}}</span>
|
||||
<span class="status-button-text">{{$btnTextNoComment}}</span>
|
||||
</button>
|
||||
{{end}}
|
||||
<button id="comment-button" class="ui primary button">
|
||||
{{ctx.Locale.Tr "repo.issues.create_comment"}}
|
||||
@@ -143,8 +148,7 @@
|
||||
<div class="field">
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"CustomInit" true
|
||||
"MarkdownPreviewInRepo" $.Repository
|
||||
"MarkdownPreviewMode" "comment"
|
||||
"MarkdownEditorContext" (ctx.MiscUtils.MarkdownEditorComment $.Repository)
|
||||
"TextareaName" "content"
|
||||
"DropzoneParentContainer" ".ui.form"
|
||||
)}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{if ctx.RootData.IsSigned}}
|
||||
<div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}">
|
||||
<div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}" aria-label="{{ctx.Locale.Tr "repo.reactions"}}">
|
||||
<a class="muted">{{svg "octicon-smiley"}}</a>
|
||||
<div class="menu">
|
||||
{{range $value := AllowedReactions}}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{{- range .Attachments -}}
|
||||
<div class="tw-flex">
|
||||
<div class="tw-flex-1 tw-p-2">
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}">
|
||||
<a target="_blank" href="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}">
|
||||
{{if FilenameIsImage .Name}}
|
||||
{{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}}
|
||||
{{$hasThumbnails = true}}
|
||||
@@ -18,8 +18,8 @@
|
||||
<span><strong>{{.Name}}</strong></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="tw-p-2 tw-flex tw-items-center">
|
||||
<span class="ui text grey">{{.Size | FileSize}}</span>
|
||||
<div class="flex-text-block tw-p-2">
|
||||
<span class="ui tw-text-text-light">{{.Size | FileSize}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{end -}}
|
||||
@@ -30,7 +30,7 @@
|
||||
{{- range .Attachments -}}
|
||||
{{if FilenameIsImage .Name}}
|
||||
{{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}}
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
|
||||
<a target="_blank" href="{{.DownloadURL}}">
|
||||
<img loading="lazy" alt="{{.Name}}" src="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}">
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{template "base/alert"}}
|
||||
{{range .Issue.Comments}}
|
||||
{{range $comment := .Issue.Comments}}
|
||||
{{if call $.ShouldShowCommentType .Type}}
|
||||
{{$createdStr:= DateUtils.TimeSince .CreatedUnix}}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="comment-header avatar-content-left-arrow" role="heading" aria-level="3">
|
||||
<div class="comment-header-left">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black tw-font-semibold tw-mr-1">
|
||||
<span class="tw-text-text tw-font-semibold tw-mr-1">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
@@ -67,7 +67,7 @@
|
||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div id="{{.HashTag}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||
@@ -96,7 +96,7 @@
|
||||
</div>
|
||||
{{else if eq .Type 2}}
|
||||
<div class="timeline-item event" id="{{.HashTag}}">
|
||||
<span class="badge tw-bg-red tw-text-white">{{svg "octicon-circle-slash"}}</span>
|
||||
<span class="badge tw-bg-red tw-text-white">{{svg "octicon-issue-closed"}}</span>
|
||||
{{if not .OriginalAuthor}}
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
{{end}}
|
||||
@@ -142,12 +142,12 @@
|
||||
<div class="timeline-item event" id="{{.HashTag}}">
|
||||
<span class="badge">{{svg "octicon-bookmark"}}</span>
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
{{if eq .RefAction 3}}<del>{{end}}
|
||||
<span class="comment-text-line">
|
||||
{{if eq .RefAction 3}}<del>{{end}}
|
||||
{{template "shared/user/authorlink" .Poster}}
|
||||
{{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}}
|
||||
{{if eq .RefAction 3}}</del>{{end}}
|
||||
</span>
|
||||
{{if eq .RefAction 3}}</del>{{end}}
|
||||
|
||||
<div class="detail flex-text-block">
|
||||
<span class="comment-text-line"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span>
|
||||
@@ -220,11 +220,11 @@
|
||||
</div>
|
||||
{{else if eq .Type 10}}
|
||||
<div class="timeline-item event" id="{{.HashTag}}">
|
||||
<span class="badge">{{svg "octicon-pencil"}}</span>
|
||||
<span class="badge">{{ctx.RenderUtils.RenderTimelineEventBadge $comment}}</span>
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
<span class="comment-text-line">
|
||||
{{template "shared/user/authorlink" .Poster}}
|
||||
{{ctx.Locale.Tr "repo.issues.change_title_at" (.OldTitle|ctx.RenderUtils.RenderEmoji) (.NewTitle|ctx.RenderUtils.RenderEmoji) $createdStr}}
|
||||
{{ctx.RenderUtils.RenderTimelineEventComment $comment $createdStr}}
|
||||
</span>
|
||||
</div>
|
||||
{{else if eq .Type 11}}
|
||||
@@ -403,7 +403,7 @@
|
||||
{{end}}
|
||||
<span class="comment-text-line">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black tw-font-semibold">
|
||||
<span class="tw-text-text tw-font-semibold">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
@@ -432,7 +432,7 @@
|
||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div id="{{.HashTag}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||
@@ -447,7 +447,7 @@
|
||||
{{end}}
|
||||
|
||||
{{if and .Review .Review.CodeComments}}
|
||||
<div class="timeline-item event">
|
||||
<div class="timeline-item event code-comments-list">
|
||||
{{range $filename, $lines := .Review.CodeComments}}
|
||||
{{range $line, $comms := $lines}}
|
||||
{{template "repo/issue/view_content/conversation" dict "." $ "comments" $comms}}
|
||||
@@ -514,32 +514,20 @@
|
||||
{{else if eq .Type 27}}
|
||||
<div class="timeline-item event" id="{{.HashTag}}">
|
||||
<span class="badge">{{svg "octicon-eye"}}</span>
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
<span class="comment-text-line">
|
||||
{{template "shared/user/authorlink" .Poster}}
|
||||
{{if (gt .AssigneeID 0)}}
|
||||
{{if .RemovedAssignee}}
|
||||
{{if eq .PosterID .AssigneeID}}
|
||||
{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" .Assignee.GetDisplayName $createdStr}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "repo.issues.review.add_review_request" .Assignee.GetDisplayName $createdStr}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
<!-- If the assigned team is deleted, just displaying "Ghost Team" in the comment -->
|
||||
{{$teamName := "Ghost Team"}}
|
||||
{{if .AssigneeTeam}}
|
||||
{{$teamName = .AssigneeTeam.Name}}
|
||||
{{end}}
|
||||
{{if .RemovedAssignee}}
|
||||
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" $teamName $createdStr}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "repo.issues.review.add_review_request" $teamName $createdStr}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</span>
|
||||
{{$specialDoerHtml := .MetaSpecialDoerTr ctx.Locale}}
|
||||
{{$timelineRequestedReviewHtml := .TimelineRequestedReviewTr ctx.Locale $createdStr}}
|
||||
{{if $specialDoerHtml}}
|
||||
<span class="comment-text-line">
|
||||
{{$specialDoerHtml}}
|
||||
{{$timelineRequestedReviewHtml}}
|
||||
</span>
|
||||
{{else}}
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
<span class="comment-text-line">
|
||||
{{template "shared/user/authorlink" .Poster}}
|
||||
{{$timelineRequestedReviewHtml}}
|
||||
</span>
|
||||
{{end}}
|
||||
</div>
|
||||
{{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}}
|
||||
<!-- If PR is closed, the comments whose type is CommentTypePullRequestPush(29) after latestCloseCommentID won't be rendered. //-->
|
||||
@@ -557,7 +545,7 @@
|
||||
{{end}}
|
||||
</span>
|
||||
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
|
||||
<a class="ui label comment-text-label tw-float-right" href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
||||
<a class="ui label comment-text-label tw-ml-auto" href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if not .IsForcePush}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{if .comment.OriginalAuthor}}
|
||||
<span class="text black">
|
||||
<span class="tw-text-text">
|
||||
{{svg (MigrationIcon .ctxData.Repository.GetOriginalURLHostname)}}
|
||||
{{.comment.OriginalAuthor}}
|
||||
</span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{if and .comment.Time (.ctxData.Repository.IsTimetrackerEnabled ctx)}} {{/* compatibility with time comments made before v1.14 */}}
|
||||
{{if (not .comment.Time.Deleted)}}
|
||||
{{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}}
|
||||
<span class="tw-float-right">
|
||||
<span class="tw-ml-auto">
|
||||
<button class="ui icon button compact mini link-action" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.del_time"}}"
|
||||
data-url="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete?id={{.comment.Time.ID}}"
|
||||
data-modal-confirm="{{ctx.Locale.Tr "repo.issues.del_time"}}"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
{{$referenceUrl = printf "%s/files#%s" ctx.RootData.Issue.Link .item.HashTag}}
|
||||
{{end}}
|
||||
<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{ctx.Locale.Tr "repo.issues.context.copy_link"}}</div>
|
||||
<div class="item context js-aria-clickable" data-clipboard-target="#{{.item.HashTag}}-raw">{{ctx.Locale.Tr "repo.issues.context.copy_source"}}</div>
|
||||
{{if ctx.RootData.IsSigned}}
|
||||
{{$needDivider := false}}
|
||||
{{if not ctx.RootData.Repository.IsArchived}}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
{{/* FIXME: DIFF-CONVERSATION-DATA: in the future this template should be refactor to avoid called by {{... "." $}}
|
||||
At the moment, two kinds of request handler call this template:
|
||||
* ExcerptBlob -> blob_excerpt.tmpl -> this
|
||||
* Other compare and diff pages -> ... -> {section_unified.tmpl|section_split.tmpl} -> this)
|
||||
The variables in "ctx.Data" are different in each case, making this template fragile, hard to read and maintain. */}}
|
||||
{{if len .comments}}
|
||||
{{$comment := index .comments 0}}
|
||||
{{$invalid := $comment.Invalidated}}
|
||||
@@ -64,9 +69,9 @@
|
||||
{{ctx.AvatarUtils.Avatar .Poster 20}}
|
||||
</a>
|
||||
{{end}}
|
||||
<span class="text grey muted-links">
|
||||
<span class="tw-text-text-light muted-links">
|
||||
{{if .OriginalAuthor}}
|
||||
<span class="text black">
|
||||
<span class="tw-text-text">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
@@ -95,7 +100,7 @@
|
||||
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div id="{{.HashTag}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
||||
|
||||
@@ -8,32 +8,33 @@
|
||||
data-pull-link="{{.Issue.Link}}"
|
||||
{{end}}
|
||||
>
|
||||
<div class="timeline-avatar text {{if .Issue.PullRequest.HasMerged}}purple
|
||||
{{- else if .Issue.IsClosed}}grey
|
||||
{{- else if .IsPullWorkInProgress}}grey
|
||||
{{- else if .IsFilesConflicted}}grey
|
||||
{{- else if .IsPullRequestBroken}}red
|
||||
{{- else if .IsBlockedByApprovals}}red
|
||||
{{- else if .IsBlockedByRejection}}red
|
||||
{{- else if .IsBlockedByOfficialReviewRequests}}red
|
||||
{{- else if .IsBlockedByOutdatedBranch}}red
|
||||
{{- else if .IsBlockedByChangedProtectedFiles}}red
|
||||
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
|
||||
{{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
|
||||
{{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red
|
||||
{{- else if .Issue.PullRequest.IsChecking}}yellow
|
||||
{{- else if .Issue.PullRequest.IsEmpty}}grey
|
||||
{{- else if .Issue.PullRequest.CanAutoMerge}}green
|
||||
{{- else}}red{{end}}">{{svg "octicon-git-merge" 40}}</div>
|
||||
{{$statusCheckData := .StatusCheckData}}
|
||||
{{$requiredStatusCheckState := $statusCheckData.RequiredChecksState}}
|
||||
<div class="timeline-avatar {{if .Issue.PullRequest.HasMerged}}tw-text-purple
|
||||
{{- else if .Issue.IsClosed}}tw-text-text-light
|
||||
{{- else if .IsPullWorkInProgress}}tw-text-text-light
|
||||
{{- else if .IsFilesConflicted}}tw-text-text-light
|
||||
{{- else if .IsPullRequestBroken}}tw-text-red
|
||||
{{- else if .IsBlockedByApprovals}}tw-text-red
|
||||
{{- else if .IsBlockedByRejection}}tw-text-red
|
||||
{{- else if .IsBlockedByOfficialReviewRequests}}tw-text-red
|
||||
{{- else if .IsBlockedByOutdatedBranch}}tw-text-red
|
||||
{{- else if .IsBlockedByChangedProtectedFiles}}tw-text-red
|
||||
{{- else if and .EnableStatusCheck (or $requiredStatusCheckState.IsFailure $requiredStatusCheckState.IsError)}}tw-text-red
|
||||
{{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) $requiredStatusCheckState.IsPending $requiredStatusCheckState.IsWarning)}}tw-text-yellow
|
||||
{{- else if and .AllowMerge .RequireSigned (not .WillSign)}}tw-text-red
|
||||
{{- else if .Issue.PullRequest.IsChecking}}tw-text-yellow
|
||||
{{- else if .Issue.PullRequest.IsEmpty}}tw-text-text-light
|
||||
{{- else if .Issue.PullRequest.CanAutoMerge}}tw-text-green
|
||||
{{- else}}tw-text-red{{end}}">{{svg "octicon-git-merge" 40}}</div>
|
||||
<div class="content">
|
||||
{{if .LatestCommitStatus}}
|
||||
<div class="ui attached segment fitted">
|
||||
{{template "repo/pulls/status" (dict
|
||||
"CommitStatus" .LatestCommitStatus
|
||||
"CommitStatuses" .LatestCommitStatuses
|
||||
"MissingRequiredChecks" .MissingRequiredChecks
|
||||
"ShowHideChecks" true
|
||||
"is_context_required" .is_context_required
|
||||
"StatusCheckData" $statusCheckData
|
||||
)}}
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -81,6 +82,8 @@
|
||||
<ul>
|
||||
{{range .ConflictedFiles}}
|
||||
<li>{{.}}</li>
|
||||
{{else}}
|
||||
<li>{{ctx.Locale.Tr "repo.pulls.files_conflicted_no_listed_files"}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else if .IsPullRequestBroken}}
|
||||
@@ -146,12 +149,12 @@
|
||||
<li>{{.}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
|
||||
{{else if and .EnableStatusCheck (or $requiredStatusCheckState.IsError $requiredStatusCheckState.IsFailure)}}
|
||||
<div class="item">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}}
|
||||
</div>
|
||||
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
|
||||
{{else if and .EnableStatusCheck (not $requiredStatusCheckState.IsSuccess)}}
|
||||
<div class="item">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.required_status_check_missing"}}
|
||||
@@ -167,7 +170,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOfficialReviewRequests .IsBlockedByOutdatedBranch .IsBlockedByChangedProtectedFiles (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
|
||||
{{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOfficialReviewRequests .IsBlockedByOutdatedBranch .IsBlockedByChangedProtectedFiles (and .EnableStatusCheck (not $requiredStatusCheckState.IsSuccess))}}
|
||||
|
||||
{{/* admin can merge without checks, writer can merge when checks succeed */}}
|
||||
{{$canMergeNow := and (or (and (not $.ProtectedBranch.BlockAdminMergeOverride) $.IsRepoAdmin) (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}}
|
||||
@@ -187,7 +190,7 @@
|
||||
{{end}}
|
||||
{{if .WillSign}}
|
||||
<div class="item">
|
||||
{{svg "octicon-lock" 16 "text green"}}
|
||||
{{svg "octicon-lock" 16 "tw-text-green"}}
|
||||
{{ctx.Locale.Tr "repo.signing.will_sign" .SigningKeyMergeDisplay}}
|
||||
</div>
|
||||
{{else if .IsSigned}}
|
||||
@@ -218,6 +221,7 @@
|
||||
{{end}}
|
||||
<div class="divider"></div>
|
||||
<script type="module">
|
||||
(() => {
|
||||
const defaultMergeTitle = {{.DefaultMergeMessage}};
|
||||
const defaultSquashMergeTitle = {{.DefaultSquashMergeMessage}};
|
||||
const defaultMergeMessage = {{.DefaultMergeBody}};
|
||||
@@ -296,14 +300,16 @@
|
||||
}
|
||||
];
|
||||
window.config.pageData.pullRequestMergeForm = mergeForm;
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{$showGeneralMergeForm = true}}
|
||||
<div id="pull-request-merge-form"></div>
|
||||
{{/* The merge form is a Vue component. After mounted, it has a button for choosing merge style, so make it have min-height to avoid layout shifting */}}
|
||||
<div id="pull-request-merge-form" class="tw-min-h-[40px]"></div>
|
||||
{{else}}
|
||||
{{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}}
|
||||
<div class="divider"></div>
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.no_merge_desc"}}
|
||||
</div>
|
||||
@@ -323,27 +329,27 @@
|
||||
{{else}}
|
||||
{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
|
||||
{{if .IsBlockedByApprovals}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}}
|
||||
</div>
|
||||
{{else if .IsBlockedByRejection}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.blocked_by_rejection"}}
|
||||
</div>
|
||||
{{else if .IsBlockedByOfficialReviewRequests}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.blocked_by_official_review_requests"}}
|
||||
</div>
|
||||
{{else if .IsBlockedByOutdatedBranch}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.blocked_by_outdated_branch"}}
|
||||
</div>
|
||||
{{else if .IsBlockedByChangedProtectedFiles}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}}
|
||||
</div>
|
||||
@@ -352,18 +358,18 @@
|
||||
<li>{{.}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
|
||||
<div class="item text red">
|
||||
{{else if and .EnableStatusCheck (not $requiredStatusCheckState.IsSuccess)}}
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.required_status_check_failed"}}
|
||||
</div>
|
||||
{{else if and .RequireSigned (not .WillSign)}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.require_signed_wont_sign"}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item text red">
|
||||
<div class="item tw-text-red">
|
||||
{{svg "octicon-x"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.cannot_auto_merge_desc"}}
|
||||
</div>
|
||||
@@ -385,7 +391,6 @@
|
||||
{{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
|
||||
<div class="divider"></div>
|
||||
<form class="ui form form-fetch-action" action="{{.Issue.Link}}/merge" method="post">{{/* another similar form is in PullRequestMergeForm.vue*/}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<input type="text" name="merge_commit_id" placeholder="{{ctx.Locale.Tr "repo.pulls.merge_commit_id"}}">
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="ui secondary segment tw-font-mono">
|
||||
{{$gitRemoteName := ctx.RootData.SystemConfig.Repository.GitGuideRemoteName.Value ctx}}
|
||||
{{if eq .PullRequest.Flow 0}}
|
||||
<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></origin-url>{{else}}{{$gitRemoteName}}{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
|
||||
<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{ctx.AppFullLink .PullRequest.HeadRepo.Link}}{{else}}{{$gitRemoteName}}{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
|
||||
{{else}}
|
||||
<div>git fetch -u {{$gitRemoteName}} {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}</div>
|
||||
{{end}}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="bottom-reactions" data-action-url="{{$.ActionURL}}">
|
||||
<div class="bottom-reactions" data-action-url="{{$.ActionURL}}" role="group" aria-label="{{ctx.Locale.Tr "repo.reactions"}}">
|
||||
{{range $key, $value := .Reactions}}
|
||||
{{$hasReacted := $value.HasUser ctx.RootData.SignedUserID}}
|
||||
<a role="button" class="ui label basic{{if $hasReacted}} primary{{end}}{{if not ctx.RootData.IsSigned}} disabled{{end}}"
|
||||
data-global-click="onCommentReactionButtonClick"
|
||||
data-tooltip-content title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
|
||||
aria-label="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
|
||||
aria-label="{{$key}}: {{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
|
||||
data-tooltip-placement="bottom-start"
|
||||
data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
|
||||
<span class="reaction">{{ReactionToEmoji $key}}</span>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<form class="ui form form-fetch-action" action="{{.Repository.Link}}/issues/new" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label><strong>{{ctx.Locale.Tr "repository"}}</strong></label>
|
||||
<div class="ui search selection dropdown issue_reference_repository_search ellipsis-text-items">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="issue-content-right ui segment">
|
||||
<div class="issue-content-right ui segment" data-global-init="initRepoIssueSidebar">
|
||||
{{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
|
||||
|
||||
{{if .Issue.IsPull}}
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
{{end}}
|
||||
{{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}}
|
||||
<form action="{{$.Issue.Link}}/update" method="post" class="ui update-branch-form">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button class="ui compact button">
|
||||
<span class="ui text">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</span>
|
||||
</button>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}">
|
||||
<button class="fluid ui button">
|
||||
{{if $.IssueWatch.IsWatching}}
|
||||
{{svg "octicon-mute" 16 "tw-mr-2"}}
|
||||
{{svg "octicon-mute" 16}}
|
||||
{{ctx.Locale.Tr "repo.issues.unsubscribe"}}
|
||||
{{else}}
|
||||
{{svg "octicon-unmute" 16 "tw-mr-2"}}
|
||||
{{svg "octicon-unmute" 16}}
|
||||
{{ctx.Locale.Tr "repo.issues.subscribe"}}
|
||||
{{end}}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user