diff options
Diffstat (limited to 'templates/repo/issue')
40 files changed, 408 insertions, 388 deletions
diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl index 9183b7b46a..c8b67490ac 100644 --- a/templates/repo/issue/branch_selector_field.tmpl +++ b/templates/repo/issue/branch_selector_field.tmpl @@ -14,7 +14,7 @@ Still needs to figure out: */}} {{if and (not .Issue.IsPull) (not .PageIsComparePull)}} <input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}"> -<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}" +<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-text-items {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}" data-no-results="{{ctx.Locale.Tr "no_results_found"}}" {{if and .Issue (or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}data-url-update-issueref="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref"{{end}} > diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl index 2e19e86d7a..6dae49c455 100644 --- a/templates/repo/issue/card.tmpl +++ b/templates/repo/issue/card.tmpl @@ -4,7 +4,7 @@ {{if $attachments}} <div class="card-attachment-images"> {{range $attachments}} - <img src="{{.DownloadURL}}" alt="{{.Name}}" /> + <img loading="lazy" src="{{.DownloadURL}}" alt="{{.Name}}" /> {{end}} </div> {{end}} @@ -16,7 +16,7 @@ </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_issue"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}"> + <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}}"> {{svg "octicon-x" 16}} </a> {{end}} @@ -45,7 +45,7 @@ {{if $.Page.LinkedPRs}} {{range index $.Page.LinkedPRs .ID}} <div class="meta tw-my-1"> - <a href="{{$.Issue.Repo.Link}}/pulls/{{.Index}}"> + <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> </a> @@ -63,16 +63,21 @@ {{if or .Labels .Assignees}} <div class="issue-card-bottom"> - <div class="labels-list"> - {{range .Labels}} - <a target="_blank" href="{{$.Issue.Repo.Link}}/issues?labels={{.ID}}">{{ctx.RenderUtils.RenderLabel .}}</a> + {{/* the labels container must always be present, to help the assignees list right-aligned */}} + <div class="issue-card-bottom-part labels-list"> + {{range $label := .Labels}} + {{$link := print $.Issue.Repo.Link "/issues"}} + {{$link = QueryBuild $link "labels" $label.ID}} + {{ctx.RenderUtils.RenderLabelWithLink $label $link}} {{end}} </div> - <div class="issue-card-assignees"> + {{if .Assignees}} + <div class="issue-card-bottom-part tw-justify-end"> {{range .Assignees}} - <a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{ctx.Locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 28}}</a> + <a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{ctx.Locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 24}}</a> {{end}} </div> + {{end}} </div> {{end}} {{end}} diff --git a/templates/repo/issue/choose.tmpl b/templates/repo/issue/choose.tmpl index 38cf9e485f..e3314f4260 100644 --- a/templates/repo/issue/choose.tmpl +++ b/templates/repo/issue/choose.tmpl @@ -10,11 +10,11 @@ {{range .IssueTemplates}} <div class="ui attached segment"> <div class="ui two column grid"> - <div class="column left aligned"> + <div class="column"> <strong>{{.Name}}</strong> <br>{{.About}} </div> - <div class="column right aligned"> + <div class="column tw-text-right"> <a href="{{$.RepoLink}}/issues/new?template={{.FileName}}{{if $.milestone}}&milestone={{$.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui primary button">{{ctx.Locale.Tr "repo.issues.choose.get_started"}}</a> </div> </div> @@ -23,11 +23,11 @@ {{range .IssueConfig.ContactLinks}} <div class="ui attached segment"> <div class="ui two column grid"> - <div class="column left aligned"> + <div class="column"> <strong>{{.Name}}</strong> <br>{{.About}} </div> - <div class="column right aligned"> + <div class="column tw-text-right"> <a href="{{.URL}}" class="ui primary button">{{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues.choose.open_external_link"}}</a> </div> </div> @@ -36,11 +36,11 @@ {{if .IssueConfig.BlankIssuesEnabled}} <div class="ui attached segment"> <div class="ui two column grid"> - <div class="column left aligned"> + <div class="column"> <strong>{{ctx.Locale.Tr "repo.issues.choose.blank"}}</strong> <br/>{{ctx.Locale.Tr "repo.issues.choose.blank_about"}} </div> - <div class="column right aligned"> + <div class="column tw-text-right"> <a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui primary button">{{ctx.Locale.Tr "repo.issues.choose.get_started"}}</a> </div> </div> diff --git a/templates/repo/issue/fields/markdown.tmpl b/templates/repo/issue/fields/markdown.tmpl index da8f5e6bdf..dbf4b71ba8 100644 --- a/templates/repo/issue/fields/markdown.tmpl +++ b/templates/repo/issue/fields/markdown.tmpl @@ -1,3 +1,3 @@ <div class="field {{if not .item.VisibleOnForm}}tw-hidden{{end}}"> - <div class="markup">{{ctx.RenderUtils.MarkdownToHtml .item.Attributes.value}}</div> + <div class="render-content markup">{{ctx.RenderUtils.MarkdownToHtml .item.Attributes.value}}</div> </div> diff --git a/templates/repo/issue/filter_item_label.tmpl b/templates/repo/issue/filter_item_label.tmpl index 0883d93804..04c3605a6a 100644 --- a/templates/repo/issue/filter_item_label.tmpl +++ b/templates/repo/issue/filter_item_label.tmpl @@ -22,7 +22,7 @@ <span class="label-filter-exclude-info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude"}}</span> <div class="divider"></div> <a class="item label-filter-query-default" href="{{QueryBuild $queryLink "labels" NIL}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a> - <a class="item label-filter-query-not-set" href="{{QueryBuild $queryLink "labels" 0}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a> + <a class="item label-filter-query-not-set" href="{{QueryBuild $queryLink "labels" "0"}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a> {{/* The logic here is not the same as the label selector in the issue sidebar. The one in the issue sidebar renders "repo labels | divider | org labels". Maybe the logic should be updated to be consistent.*/}} diff --git a/templates/repo/issue/filter_item_user_assign.tmpl b/templates/repo/issue/filter_item_user_assign.tmpl index 4f1db71d57..42886edaa0 100644 --- a/templates/repo/issue/filter_item_user_assign.tmpl +++ b/templates/repo/issue/filter_item_user_assign.tmpl @@ -4,8 +4,8 @@ * UserSearchList * SelectedUserId: 0 or empty means default, -1 means "no user is set" * TextFilterTitle -* TextZeroValue: the text for "all issues" -* TextNegativeOne: the text for "issues with no assignee" +* TextFilterMatchNone: the text for "issues with no assignee" +* TextFilterMatchAny: the text for "issues with any assignee" */}} {{$queryLink := .QueryLink}} <div class="item ui dropdown jump {{if not .UserSearchList}}disabled{{end}}"> @@ -15,16 +15,24 @@ <i class="icon">{{svg "octicon-search" 16}}</i> <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_user_placeholder"}}"> </div> - {{if $.TextZeroValue}} - <a class="item {{if not .SelectedUserId}}selected{{end}}" href="{{QueryBuild $queryLink $.QueryParamKey NIL}}">{{$.TextZeroValue}}</a> + {{if $.TextFilterMatchNone}} + {{$isSelected := eq .SelectedUserId "(none)"}} + <a class="item" href="{{QueryBuild $queryLink $.QueryParamKey (Iif $isSelected NIL "(none)")}}"> + {{svg "octicon-check" 14 (Iif $isSelected "" "tw-invisible")}} {{$.TextFilterMatchNone}} + </a> {{end}} - {{if $.TextNegativeOne}} - <a class="item {{if eq .SelectedUserId -1}}selected{{end}}" href="{{QueryBuild $queryLink $.QueryParamKey -1}}">{{$.TextNegativeOne}}</a> + {{if $.TextFilterMatchAny}} + {{$isSelected := eq .SelectedUserId "(any)"}} + <a class="item" href="{{QueryBuild $queryLink $.QueryParamKey (Iif $isSelected NIL "(any)")}}"> + {{svg "octicon-check" 14 (Iif $isSelected "" "tw-invisible")}} {{$.TextFilterMatchAny}} + </a> {{end}} <div class="divider"></div> - {{range .UserSearchList}} - <a class="item {{if eq $.SelectedUserId .ID}}selected{{end}}" href="{{QueryBuild $queryLink $.QueryParamKey .ID}}"> - {{ctx.AvatarUtils.Avatar . 20}}{{template "repo/search_name" .}} + {{range $user := .UserSearchList}} + {{$isSelected := eq $.SelectedUserId (print $user.ID)}} + <a class="item" href="{{QueryBuild $queryLink $.QueryParamKey (Iif $isSelected NIL $user.ID)}}"> + {{svg "octicon-check" 14 (Iif $isSelected "" "tw-invisible")}} + {{ctx.AvatarUtils.Avatar $user 20}}{{template "repo/search_name" .}} </a> {{end}} </div> diff --git a/templates/repo/issue/filter_list.tmpl b/templates/repo/issue/filter_list.tmpl index 7612d93b21..bfdf94513e 100644 --- a/templates/repo/issue/filter_list.tmpl +++ b/templates/repo/issue/filter_list.tmpl @@ -15,7 +15,7 @@ <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" 0}}">{{ctx.Locale.Tr "repo.issues.filter_milestone_all"}}</a> + <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> @@ -94,8 +94,8 @@ "UserSearchList" $.Assignees "SelectedUserId" $.AssigneeID "TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_assignee") - "TextZeroValue" (ctx.Locale.Tr "repo.issues.filter_assginee_no_select") - "TextNegativeOne" (ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee") + "TextFilterMatchNone" (ctx.Locale.Tr "repo.issues.filter_assignee_no_assignee") + "TextFilterMatchAny" (ctx.Locale.Tr "repo.issues.filter_assignee_any_assignee") }} {{if .IsSigned}} @@ -106,7 +106,7 @@ </span> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> - <a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "all"}}">{{ctx.Locale.Tr "repo.issues.filter_type.all_issues"}}</a> + <a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "all"}}">{{if .PageIsPullList}}{{ctx.Locale.Tr "repo.issues.filter_type.all_pull_requests"}}{{else}}{{ctx.Locale.Tr "repo.issues.filter_type.all_issues"}}{{end}}</a> <a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "assigned"}}">{{ctx.Locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a> <a class="{{if eq .ViewType "created_by"}}active {{end}}item" href="{{QueryBuild $queryLink "type" "created_by"}}">{{ctx.Locale.Tr "repo.issues.filter_type.created_by_you"}}</a> {{if .PageIsPullList}} @@ -133,5 +133,11 @@ <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> + {{end}} </div> </div> diff --git a/templates/repo/issue/filters.tmpl b/templates/repo/issue/filters.tmpl index 06e7c1aa6c..409ec876e6 100644 --- a/templates/repo/issue/filters.tmpl +++ b/templates/repo/issue/filters.tmpl @@ -9,7 +9,7 @@ <div class="ui compact tiny secondary menu"> <span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'> {{svg "octicon-clock"}} - {{.TotalTrackedTime | Sec2Time}} + {{.TotalTrackedTime | Sec2Hour}} </span> </div> {{end}} diff --git a/templates/repo/issue/label_precolors.tmpl b/templates/repo/issue/label_precolors.tmpl index 80007662c0..7be3f40350 100644 --- a/templates/repo/issue/label_precolors.tmpl +++ b/templates/repo/issue/label_precolors.tmpl @@ -1,22 +1,27 @@ <div class="precolors"> - <div class="tw-flex"> - <a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a> - <a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a> - <a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a> - <a class="color" style="background-color:#009800" data-color-hex="#009800"></a> - <a class="color" style="background-color:#006b75" data-color-hex="#006b75"></a> - <a class="color" style="background-color:#207de5" data-color-hex="#207de5"></a> - <a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a> - <a class="color" style="background-color:#5319e7" data-color-hex="#5319e7"></a> - </div> - <div class="tw-flex"> - <a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a> - <a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a> - <a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a> - <a class="color" style="background-color:#bfe5bf" data-color-hex="#bfe5bf"></a> - <a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a> - <a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a> - <a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a> - <a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a> + <button type="button" class="ui button generate-random-color"> + {{svg "octicon-sync"}} + </button> + <div> + <div class="tw-flex"> + <a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a> + <a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a> + <a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a> + <a class="color" style="background-color:#009800" data-color-hex="#009800"></a> + <a class="color" style="background-color:#006b75" data-color-hex="#006b75"></a> + <a class="color" style="background-color:#207de5" data-color-hex="#207de5"></a> + <a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a> + <a class="color" style="background-color:#5319e7" data-color-hex="#5319e7"></a> + </div> + <div class="tw-flex"> + <a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a> + <a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a> + <a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a> + <a class="color" style="background-color:#bfe5bf" data-color-hex="#bfe5bf"></a> + <a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a> + <a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a> + <a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a> + <a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a> + </div> </div> </div> diff --git a/templates/repo/issue/labels/label_edit_modal.tmpl b/templates/repo/issue/labels/label_edit_modal.tmpl index 527b7ff900..ec57de2f3f 100644 --- a/templates/repo/issue/labels/label_edit_modal.tmpl +++ b/templates/repo/issue/labels/label_edit_modal.tmpl @@ -5,7 +5,7 @@ > <div class="header"></div> <div class="content"> - <form class="ui form ignore-dirty" method="post"> + <form class="ui form ignore-dirty form-fetch-action" method="post"> {{.CsrfTokenHtml}} <input name="id" type="hidden"> <div class="required field"> @@ -24,7 +24,13 @@ <div class="desc tw-ml-1 tw-mt-2 tw-hidden label-exclusive-warning"> {{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}} </div> - <br> + <div class="field label-exclusive-order-input-field tw-mt-2"> + <label class="flex-text-block"> + {{ctx.Locale.Tr "repo.issues.label_exclusive_order"}} + <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.label_exclusive_order_tooltip"}}">{{svg "octicon-info"}}</span> + </label> + <input class="label-exclusive-order-input" name="exclusive_order" type="number" maxlength="4"> + </div> </div> <div class="field label-is-archived-input-field"> <div class="ui checkbox"> @@ -43,8 +49,9 @@ </div> <div class="field"> <label for="color">{{ctx.Locale.Tr "repo.issues.label_color"}}</label> - <div class="column js-color-picker-input"> - <input name="color" value="#70c24a"placeholder="#c320f6" required maxlength="7"> + <div class="color-picker-combo" data-global-init="initColorPicker"> + <!-- the "#" is optional because backend NormalizeColor is able to handle it, API also accepts both formats, and it is easier for users to directly copy-paste a hex value --> + <input name="color" value="#70c24a" placeholder="#c320f6" required pattern="^#?([\dA-Fa-f]{3}|[\dA-Fa-f]{6})$" maxlength="7"> {{template "repo/issue/label_precolors"}} </div> </div> diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl index 822567301e..c8a6b46cc4 100644 --- a/templates/repo/issue/labels/label_list.tmpl +++ b/templates/repo/issue/labels/label_list.tmpl @@ -26,7 +26,7 @@ <div class="divider"></div> {{end}} - <ul class="issue-label-list"> + <ul class="issue-label-list muted-links"> {{$canEditLabel := and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} {{$canEditLabel = or $canEditLabel $.PageIsOrgSettingsLabels}} {{range .Labels}} @@ -42,34 +42,31 @@ <a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a> {{end}} </div> - <div class="label-operation tw-flex"> + <div class="label-operation"> {{template "repo/issue/labels/label_archived" .}} - <div class="tw-flex tw-ml-auto"> {{if $canEditLabel}} <a class="edit-label-button" href="#" data-label-id="{{.ID}}" data-label-name="{{.Name}}" data-label-color="{{.Color}}" data-label-exclusive="{{.Exclusive}}" data-label-is-archived="{{gt .ArchivedUnix 0}}" data-label-num-issues="{{.NumIssues}}" data-label-description="{{.Description}}" + data-label-exclusive-order="{{.ExclusiveOrder}}" >{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a> <a class="link-action" href="#" data-url="{{$.Link}}/delete?id={{.ID}}" data-modal-confirm-header="{{ctx.Locale.Tr "repo.issues.label_deletion"}}" data-modal-confirm-content="{{ctx.Locale.Tr "repo.issues.label_deletion_desc"}}" >{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}}</a> {{end}} - </div> </div> </li> {{end}} {{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}} <li class="item"> - <div class="ui grid middle aligned"> - <div class="ten wide column"> - {{ctx.Locale.Tr "repo.org_labels_desc"}} - {{if .IsOrganizationOwner}} - <a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>: - {{end}} - </div> + <div>{{/* parent is flex, so use block here to keep sentence spaces */}} + {{ctx.Locale.Tr "repo.org_labels_desc"}} + {{if .IsOrganizationOwner}} + <a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>: + {{end}} </div> </li> diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 01b610b39d..1fe220e1b8 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -4,6 +4,8 @@ <div class="ui container"> {{template "base/alert" .}} + {{template "repo/code/recently_pushed_new_branches" dict "RecentBranchesPromptData" .RecentBranchesPromptData}} + {{if .PinnedIssues}} <div id="issue-pins" {{if .IsRepoAdmin}}data-is-repo-admin{{end}}> {{range .PinnedIssues}} @@ -14,9 +16,10 @@ </div> {{end}} - <div class="list-header"> - {{template "repo/issue/navbar" .}} + <div class="list-header flex-text-block"> {{template "repo/issue/search" .}} + <a class="ui small button" href="{{.RepoLink}}/labels">{{ctx.Locale.Tr "repo.labels"}}</a> + <a class="ui small button" href="{{.RepoLink}}/milestones">{{ctx.Locale.Tr "repo.milestones"}}</a> {{if not .Repository.IsArchived}} {{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> @@ -40,7 +43,7 @@ <div class="ui compact tiny secondary menu"> <span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'> {{svg "octicon-clock"}} - {{.TotalTrackedTime | Sec2Time}} + {{.TotalTrackedTime | Sec2Hour}} </span> </div> {{end}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 4fc6057117..591820080f 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -3,10 +3,10 @@ {{template "repo/header" .}} <div class="ui container"> {{template "base/alert" .}} - <div class="tw-flex"> - <h1 class="tw-mb-2">{{.Milestone.Name}}</h1> + <div class="flex-text-block tw-flex-wrap tw-mb-2"> + <h1 class="tw-flex-1 tw-m-0">{{.Milestone.Name}}</h1> {{if not .Repository.IsArchived}} - <div class="text right tw-flex-1"> + <div> {{if or .CanWriteIssues .CanWritePulls}} {{if .Milestone.IsClosed}} <a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}} @@ -22,14 +22,14 @@ {{end}} </div> {{if .Milestone.RenderedContent}} - <div class="markup content tw-mb-4"> + <div class="render-content markup tw-mb-4"> {{.Milestone.RenderedContent}} </div> {{end}} <div class="tw-flex tw-flex-col tw-gap-2"> <progress class="milestone-progress-big" value="{{.Milestone.Completeness}}" max="100"></progress> - <div class="tw-flex tw-gap-4"> - <div classs="tw-flex tw-items-center"> + <div class="flex-text-block tw-gap-4"> + <div class="flex-text-inline"> {{$closedDate:= DateUtils.TimeSince .Milestone.ClosedDateUnix}} {{if .IsClosed}} {{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} @@ -46,11 +46,11 @@ {{end}} {{end}} </div> - <div class="tw-mr-2">{{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness}}</div> + <div>{{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness}}</div> {{if .TotalTrackedTime}} <div data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'> {{svg "octicon-clock"}} - {{.TotalTrackedTime | Sec2Time}} + {{.TotalTrackedTime | Sec2Hour}} </div> {{end}} </div> diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl index 4809149a21..9bcced6f54 100644 --- a/templates/repo/issue/milestone_new.tmpl +++ b/templates/repo/issue/milestone_new.tmpl @@ -44,7 +44,7 @@ "TextareaPlaceholder" (ctx.Locale.Tr "repo.milestones.desc") )}} </div> - <div class="tw-text-right"> + <div class="flex-text-block tw-justify-end"> {{if .PageIsEditMilestone}} <a class="ui primary basic button" href="{{.RepoLink}}/milestones"> {{ctx.Locale.Tr "repo.milestones.cancel"}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index 9515acfb8e..8805c709a0 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -41,7 +41,7 @@ {{if .TotalTrackedTime}} <div class="flex-text-block"> {{svg "octicon-clock"}} - {{.TotalTrackedTime|Sec2Time}} + {{.TotalTrackedTime|Sec2Hour}} </div> {{end}} {{if .UpdatedUnix}} @@ -76,14 +76,12 @@ {{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="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a> + <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> </div> {{end}} </div> {{if .Content}} - <div class="markup content"> - {{.RenderedContent}} - </div> + <div class="render-content markup">{{.RenderedContent}}</div> {{end}} </li> {{end}} @@ -94,15 +92,11 @@ </div> {{if or .CanWriteIssues .CanWritePulls}} - <div class="ui g-modal-confirm delete modal"> - <div class="header"> - {{svg "octicon-trash"}} - {{ctx.Locale.Tr "repo.milestones.deletion"}} - </div> - <div class="content"> - <p>{{ctx.Locale.Tr "repo.milestones.deletion_desc"}}</p> - </div> + <div class="ui small modal" id="repo-milestone-delete-modal"> + <div class="header">{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.milestones.deletion"}}</div> + <div class="content"><p>{{ctx.Locale.Tr "repo.milestones.deletion_desc"}}</p></div> {{template "base/modal_actions_confirm" .}} </div> {{end}} + {{template "base/footer" .}} diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index dd4c7617ce..b63cbcfc0d 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -1,15 +1,16 @@ -{{if .Flash}} {{template "base/alert" .}} -{{end}} <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"> - {{ctx.AvatarUtils.Avatar .SignedUser 40}} - <div class="ui segment content tw-my-0"> + <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" class="js-autofocus-end" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" required maxlength="255" autocomplete="off"> + <input name="title" data-global-init="initInputAutoFocusEnd" 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}}" + > {{if .PageIsComparePull}} <div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0)}}</div> {{end}} @@ -32,7 +33,7 @@ {{else}} {{template "repo/issue/comment_tab" .}} {{end}} - <div class="text right"> + <div class="flex-text-block tw-justify-end"> <button class="ui primary button"> {{if .PageIsComparePull}} {{ctx.Locale.Tr "repo.pulls.create"}} diff --git a/templates/repo/issue/openclose.tmpl b/templates/repo/issue/openclose.tmpl index b9dd04a7db..00a31b5fad 100644 --- a/templates/repo/issue/openclose.tmpl +++ b/templates/repo/issue/openclose.tmpl @@ -17,7 +17,7 @@ {{ctx.Locale.PrettyNumber .OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}} </a> <a class="{{if eq .State "closed"}}active {{end}}item flex-text-inline" href="{{if eq .State "closed"}}{{$allStatesLink}}{{else}}{{$closedLink}}{{end}}"> - {{svg "octicon-check"}} + {{svg "octicon-issue-closed"}} {{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}} </a> </div> diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl index 07732ab5e7..de6c194ee8 100644 --- a/templates/repo/issue/search.tmpl +++ b/templates/repo/issue/search.tmpl @@ -8,6 +8,7 @@ <input type="hidden" name="project" value="{{$.ProjectID}}"> <input type="hidden" name="assignee" value="{{$.AssigneeID}}"> <input type="hidden" name="poster" value="{{$.PosterUsername}}"> + <input type="hidden" name="sort" value="{{$.SortType}}"> {{end}} {{template "shared/search/input" dict "Value" .Keyword}} {{if .PageIsIssueList}} diff --git a/templates/repo/issue/sidebar/allow_maintainer_edit.tmpl b/templates/repo/issue/sidebar/allow_maintainer_edit.tmpl index ad4ce96a47..f584f9076c 100644 --- a/templates/repo/issue/sidebar/allow_maintainer_edit.tmpl +++ b/templates/repo/issue/sidebar/allow_maintainer_edit.tmpl @@ -1,13 +1,18 @@ -{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} - {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}} +{{- $isHeadForkedRepo := and .Issue.PullRequest .Issue.PullRequest.HeadRepo (ne .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName) -}} +{{if $isHeadForkedRepo}} + {{- $isPullPoster := and .Issue.IsPull .IsIssuePoster -}} + {{- $isPullEditable := and .Issue.PullRequest (not .Issue.IsClosed) (not .Repository.IsArchived) -}} + {{- $allowToChange := and $isPullPoster $isPullEditable -}} <div class="divider"></div> - <div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers" + <div class="ui checkbox {{if not $allowToChange}}disabled{{end}} loading-icon-2px" + {{if $allowToChange}} + id="allow-edits-from-maintainers" data-url="{{.Issue.Link}}" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}" data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}" + {{end}} > <label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> - <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}> + <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}} {{if not $allowToChange}}disabled{{end}}> </div> - {{end}} {{end}} diff --git a/templates/repo/issue/sidebar/assignee_list.tmpl b/templates/repo/issue/sidebar/assignee_list.tmpl index d8ccd73387..1d2279a45d 100644 --- a/templates/repo/issue/sidebar/assignee_list.tmpl +++ b/templates/repo/issue/sidebar/assignee_list.tmpl @@ -6,8 +6,8 @@ {{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/assignee?issue_ids={{$pageMeta.Issue.ID}}"{{end}} > <input class="combo-value" name="assignee_ids" type="hidden" value="{{$data.SelectedAssigneeIDs}}"> - <div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> - <a class="text muted"> + <div class="ui dropdown full-width {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> + <a class="fixed-text muted"> <strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}} </a> <div class="menu"> @@ -15,10 +15,11 @@ <i class="icon">{{svg "octicon-search" 16}}</i> <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}"> </div> - <div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div> - <div class="scrolling menu"> + <div class="scrolling menu flex-items-block"> + <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 muted" href="#" data-value="{{.ID}}"> + <a class="item" href="#" data-value="{{.ID}}"> <span class="item-check-mark">{{svg "octicon-check"}}</span> {{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}} </a> @@ -26,10 +27,10 @@ </div> </div> </div> - <div class="ui list tw-flex tw-flex-row tw-gap-2"> + <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 muted" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?assignee={{.ID}}"> + <a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?assignee={{.ID}}"> {{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}} </a> {{end}} diff --git a/templates/repo/issue/sidebar/issue_dependencies.tmpl b/templates/repo/issue/sidebar/issue_dependencies.tmpl index 837bcd5670..bbae011958 100644 --- a/templates/repo/issue/sidebar/issue_dependencies.tmpl +++ b/templates/repo/issue/sidebar/issue_dependencies.tmpl @@ -22,7 +22,7 @@ {{range .BlockingDependencies}} <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between"> <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis"> - <a class="muted gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}"> + <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}}"> @@ -31,7 +31,9 @@ </div> <div class="item-right tw-flex tw-items-center tw-m-1"> {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> + <a class="muted show-modal" data-modal="#issue-remove-dependency-confirm" + data-modal-remove-dependency-id="{{.Issue.ID}}" data-modal-dependency-type="blocking" + data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> {{svg "octicon-trash" 16}} </a> {{end}} @@ -54,7 +56,7 @@ {{range .BlockedByDependencies}} <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between"> <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis"> - <a class="muted gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}"> + <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}}"> @@ -63,7 +65,9 @@ </div> <div class="item-right tw-flex tw-items-center tw-m-1"> {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> + <a class="muted show-modal" data-modal="#issue-remove-dependency-confirm" + data-modal-remove-dependency-id="{{.Issue.ID}}" data-modal-dependency-type="blockedBy" + data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> {{svg "octicon-trash" 16}} </a> {{end}} @@ -76,7 +80,7 @@ <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis"> <div class="gt-ellipsis"> <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> - <span class="gt-ellipsis" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}"> + <span class="gt-ellipsis issue-dependency-title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}"> #{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}} </span> </div> @@ -86,7 +90,9 @@ </div> <div class="item-right tw-flex tw-items-center tw-m-1"> {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> + <a class="muted show-modal" data-modal="#issue-remove-dependency-confirm" + data-modal-remove-dependency-id="{{.Issue.ID}}" data-modal-dependency-type="blocking" + data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> {{svg "octicon-trash" 16}} </a> {{end}} @@ -106,7 +112,7 @@ <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}}"> + <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"> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <input type="text" class="search"> @@ -122,28 +128,19 @@ </div> {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} - <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}"> - - <div class="ui g-modal-confirm modal remove-dependency"> - <div class="header"> - {{svg "octicon-trash"}} - {{ctx.Locale.Tr "repo.issues.dependency.remove_header"}} - </div> + <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"> - <form method="post" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> - {{$.CsrfTokenHtml}} - <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> - <input type="hidden" value="" name="dependencyType" id="dependencyType"> - </form> - <p>{{if .Issue.IsPull}} - {{ctx.Locale.Tr "repo.issues.dependency.pr_remove_text"}} - {{else}} - {{ctx.Locale.Tr "repo.issues.dependency.issue_remove_text"}} - {{end}}</p> + {{$.CsrfTokenHtml}} + <input type="hidden" value="" name="removeDependencyID" class="remove-dependency-id"> + <input type="hidden" value="" name="dependencyType" class="dependency-type"> + <p> + {{ctx.Locale.Tr (Iif .Issue.IsPull "repo.issues.dependency.pr_remove_text" "repo.issues.dependency.issue_remove_text")}} + </p> + {{$ModalButtonCancelText := ctx.Locale.Tr "repo.issues.dependency.cancel"}} + {{$ModalButtonOkText := ctx.Locale.Tr "repo.issues.dependency.remove"}} + {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}} </div> - {{$ModalButtonCancelText := ctx.Locale.Tr "repo.issues.dependency.cancel"}} - {{$ModalButtonOkText := ctx.Locale.Tr "repo.issues.dependency.remove"}} - {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}} - </div> + </form> {{end}} {{end}} diff --git a/templates/repo/issue/sidebar/issue_management.tmpl b/templates/repo/issue/sidebar/issue_management.tmpl index 76edf16e03..8876a5054e 100644 --- a/templates/repo/issue/sidebar/issue_management.tmpl +++ b/templates/repo/issue/sidebar/issue_management.tmpl @@ -1,6 +1,7 @@ {{if and .IsRepoAdmin (not .Repository.IsArchived)}} <div class="divider"></div> + {{/* 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}} @@ -16,16 +17,15 @@ </form> {{end}} - <button class="tw-mt-1 fluid ui show-modal button{{if .Issue.IsLocked}} red{{end}}" data-modal="#lock"> + {{/* Lock/unlock conversation */}} + <button class="tw-mt-1 fluid ui show-modal button{{if .Issue.IsLocked}} red{{end}}" data-modal="#lock-conversation"> {{if .Issue.IsLocked}} - {{svg "octicon-key"}} - {{ctx.Locale.Tr "repo.issues.unlock"}} + {{svg "octicon-key"}} {{ctx.Locale.Tr "repo.issues.unlock"}} {{else}} - {{svg "octicon-lock"}} - {{ctx.Locale.Tr "repo.issues.lock"}} + {{svg "octicon-lock"}} {{ctx.Locale.Tr "repo.issues.lock"}} {{end}} </button> - <div class="ui tiny modal" id="lock"> + <div class="ui tiny modal" id="lock-conversation"> <div class="header"> {{if .Issue.IsLocked}} {{ctx.Locale.Tr "repo.issues.unlock.title"}} @@ -45,29 +45,20 @@ {{end}} </div> - <form class="ui form form-fetch-action" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}" - method="post"> + <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"> - <strong> {{ctx.Locale.Tr "repo.issues.lock.reason"}} </strong> + <strong>{{ctx.Locale.Tr "repo.issues.lock.reason"}}</strong> </div> <div class="field"> <div class="ui fluid dropdown selection"> - - <select name="reason"> - <option value=""> </option> - {{range .LockReasons}} - <option value="{{.}}">{{.}}</option> - {{end}} - </select> - {{svg "octicon-triangle-down" 14 "dropdown icon"}} - - <div class="default text"> </div> - + <input type="hidden" name="reason"> + <div class="text"></div> {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> + <div class="item" data-value=""></div> {{range .LockReasons}} <div class="item" data-value="{{.}}">{{.}}</div> {{end}} @@ -76,9 +67,10 @@ </div> {{end}} - <div class="text right actions"> + <div class="actions"> <button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button> - <button class="ui red button"> + {{/* explicitly focus the submit button, to avoid Fomantic modal focuses and popups the dropdown */}} + <button class="ui red button" autofocus> {{if .Issue.IsLocked}} {{ctx.Locale.Tr "repo.issues.unlock_confirm"}} {{else}} diff --git a/templates/repo/issue/sidebar/label_list.tmpl b/templates/repo/issue/sidebar/label_list.tmpl index 9dd83ba188..15c8760d1a 100644 --- a/templates/repo/issue/sidebar/label_list.tmpl +++ b/templates/repo/issue/sidebar/label_list.tmpl @@ -4,8 +4,8 @@ {{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/labels?issue_ids={{$pageMeta.Issue.ID}}"{{end}} > <input class="combo-value" name="label_ids" type="hidden" value="{{$data.SelectedLabelIDs}}"> - <div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> - <a class="text muted"> + <div class="ui dropdown full-width {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> + <a class="fixed-text muted"> <strong>{{ctx.Locale.Tr "repo.issues.new.labels"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}} </a> <div class="menu"> @@ -16,8 +16,9 @@ <i class="icon">{{svg "octicon-search" 16}}</i> <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_labels"}}"> </div> - <a class="item clear-selection" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a> <div class="scrolling menu"> + <a class="item clear-selection" data-text="" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a> + <div class="divider"></div> {{$previousExclusiveScope := "_no_scope"}} {{range $data.RepoLabels}} {{$exclusiveScope := .ExclusiveScope}} @@ -42,7 +43,7 @@ </div> </div> - <div class="ui list labels-list tw-my-2 tw-flex tw-gap-2"> + <div class="ui list labels-list"> <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}} diff --git a/templates/repo/issue/sidebar/milestone_list.tmpl b/templates/repo/issue/sidebar/milestone_list.tmpl index 8b3e5b0eee..5bc961ed3c 100644 --- a/templates/repo/issue/sidebar/milestone_list.tmpl +++ b/templates/repo/issue/sidebar/milestone_list.tmpl @@ -6,8 +6,8 @@ {{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/milestone?issue_ids={{$pageMeta.Issue.ID}}"{{end}} > <input class="combo-value" name="milestone_id" type="hidden" value="{{$data.SelectedMilestoneID}}"> - <div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> - <a class="text muted"> + <div class="ui dropdown full-width {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> + <a class="fixed-text muted"> <strong>{{ctx.Locale.Tr "repo.issues.new.milestone"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}} </a> <div class="menu"> @@ -18,13 +18,13 @@ <i class="icon">{{svg "octicon-search"}}</i> <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestones"}}"> </div> - <div class="divider"></div> - <div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}</div> <div class="scrolling 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}}/issues?milestone={{.ID}}"> + <a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/milestone/{{.ID}}"> {{svg "octicon-milestone" 18}} {{.Name}} </a> {{end}} @@ -33,7 +33,7 @@ {{if $data.ClosedMilestones}} <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}}/issues?milestone={{.ID}}"> + <a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/milestone/{{.ID}}"> {{svg "octicon-milestone" 18}} {{.Name}} </a> {{end}} @@ -43,10 +43,10 @@ </div> </div> - <div class="ui list"> + <div class="ui list muted-links flex-items-block"> <span class="item empty-list {{if $issueMilestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span> {{if $issueMilestone}} - <a class="item muted" href="{{$pageMeta.RepoLink}}/milestone/{{$issueMilestone.ID}}"> + <a class="item" href="{{$pageMeta.RepoLink}}/milestone/{{$issueMilestone.ID}}"> {{svg "octicon-milestone" 18}} {{$issueMilestone.Name}} </a> {{end}} diff --git a/templates/repo/issue/sidebar/project_list.tmpl b/templates/repo/issue/sidebar/project_list.tmpl index 0cbbdce760..a212261a22 100644 --- a/templates/repo/issue/sidebar/project_list.tmpl +++ b/templates/repo/issue/sidebar/project_list.tmpl @@ -6,8 +6,8 @@ {{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}}"> - <div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}"> - <a class="text muted"> + <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}} </a> <div class="menu"> @@ -17,8 +17,9 @@ <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_projects"}}"> </div> {{end}} - <div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div> <div class="scrolling 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}} @@ -39,10 +40,10 @@ </div> </div> </div> - <div class="ui list"> + <div class="ui list muted-links flex-items-block"> <span class="item empty-list {{if $issueProject}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span> {{if $issueProject}} - <a class="item muted" href="{{$issueProject.Link ctx}}"> + <a class="item" href="{{$issueProject.Link ctx}}"> {{svg $issueProject.IconName 18}} {{$issueProject.Title}} </a> {{end}} diff --git a/templates/repo/issue/sidebar/reference_link.tmpl b/templates/repo/issue/sidebar/reference_link.tmpl index 6b8f120c7b..ad7c0f6bc0 100644 --- a/templates/repo/issue/sidebar/reference_link.tmpl +++ b/templates/repo/issue/sidebar/reference_link.tmpl @@ -1,8 +1,6 @@ <div class="divider"></div> -<div class="ui equal width compact grid"> - {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} - <div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}"> - <span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> - <button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> - </div> +{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} +<div class="flex-text-block" data-tooltip-content="{{$issueReferenceLink}}"> + <span class="tw-flex-1 gt-ellipsis">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> + <button class="ui compact tiny icon button" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> </div> diff --git a/templates/repo/issue/sidebar/reviewer_list.tmpl b/templates/repo/issue/sidebar/reviewer_list.tmpl index b3d9590d58..2b5ca80fe7 100644 --- a/templates/repo/issue/sidebar/reviewer_list.tmpl +++ b/templates/repo/issue/sidebar/reviewer_list.tmpl @@ -6,8 +6,8 @@ {{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/request_review?issue_ids={{$pageMeta.Issue.ID}}"{{end}} > <input type="hidden" class="combo-value" name="reviewer_ids">{{/* match CreateIssueForm */}} - <div class="ui dropdown {{if or (not $hasCandidates) (not $data.CanChooseReviewer)}}disabled{{end}}"> - <a class="text muted"> + <div class="ui dropdown full-width {{if or (not $hasCandidates) (not $data.CanChooseReviewer)}}disabled{{end}}"> + <a class="fixed-text muted"> <strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong> {{if $data.CanChooseReviewer}}{{svg "octicon-gear"}}{{end}} </a> <div class="menu flex-items-menu"> @@ -43,7 +43,7 @@ </div> </div> - <div class="ui relaxed list flex-items-block tw-my-4"> + <div class="ui relaxed list flex-items-block"> <span class="item empty-list {{if or $data.OriginalReviews $data.CurrentPullReviewers}}tw-hidden{{end}}"> {{ctx.Locale.Tr "repo.issues.new.no_reviewers"}} </span> @@ -51,9 +51,9 @@ <div class="item"> <div class="flex-text-inline tw-flex-1"> {{if .User}} - <a class="muted flex-text-inline" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}} {{.User.GetDisplayName}}</a> + <a class="muted flex-text-inline tw-gap-2" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}} {{.User.GetDisplayName}}</a> {{else if .Team}} - {{svg "octicon-people" 20}} {{$repoOwnerName}}/{{.Team.Name}} + <span class="flex-text-inline tw-gap-2">{{svg "octicon-people" 20}} {{$repoOwnerName}}/{{.Team.Name}}</span> {{end}} </div> <div class="flex-text-inline"> @@ -92,7 +92,7 @@ <div class="flex-text-inline tw-flex-1"> {{$originalURLHostname := $pageMeta.Repository.GetOriginalURLHostname}} {{$originalURL := $pageMeta.Repository.OriginalURL}} - <a class="muted flex-text-inline" href="{{$originalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $originalURLHostname}}"> + <a class="muted flex-text-inline tw-gap-2" href="{{$originalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $originalURLHostname}}"> {{svg (MigrationIcon $originalURLHostname) 20}} {{.OriginalAuthor}} </a> </div> @@ -121,7 +121,7 @@ <label for="issue-sidebar-dismiss-review-message">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</label> <input id="issue-sidebar-dismiss-review-message" name="message"> </div> - <div class="text right actions"> + <div class="actions"> <button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button> <button class="ui red button" type="submit">{{ctx.Locale.Tr "ok"}}</button> </div> diff --git a/templates/repo/issue/sidebar/stopwatch_timetracker.tmpl b/templates/repo/issue/sidebar/stopwatch_timetracker.tmpl index f107dc5ef5..6168b06e17 100644 --- a/templates/repo/issue/sidebar/stopwatch_timetracker.tmpl +++ b/templates/repo/issue/sidebar/stopwatch_timetracker.tmpl @@ -2,32 +2,28 @@ {{if and .CanUseTimetracker (not .Repository.IsArchived)}} <div class="divider"></div> <div> - <div class="ui dropdown jump"> - <a class="text muted"> - <strong>{{ctx.Locale.Tr "repo.issues.tracker"}}</strong> {{svg "octicon-gear"}} - {{if $.IsStopwatchRunning}}{{svg "octicon-stopwatch"}}{{end}} - </a> - <div class="menu"> - <a class="item issue-set-time-estimate show-modal" data-modal="#issue-time-set-estimate-modal"> - {{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.time_estimate_set"}} - </a> - <div class="divider"></div> - {{if $.IsStopwatchRunning}} - <a class="item issue-stop-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/toggle"> - {{svg "octicon-stopwatch"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_stop"}} - </a> - <a class="item issue-cancel-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/cancel"> - {{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_discard"}} - </a> - {{else}} - <a class="item issue-start-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/toggle"> - {{svg "octicon-stopwatch"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_start"}} - </a> - <a class="item issue-add-time show-modal" data-modal="#issue-time-manually-add-modal"> - {{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_manually_add"}} - </a> - {{end}} - </div> + <div class="flex-text-block"> + <strong class="tw-flex-1">{{ctx.Locale.Tr "repo.issues.tracker"}}</strong> + <button class="btn interact-fg show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.time_estimate_set"}}" data-modal="#issue-time-set-estimate-modal"> + {{svg "octicon-pencil"}} + </button> + </div> + <div class="ui buttons tw-mt-2 tw-w-full"> + {{if $.IsStopwatchRunning}} + <button class="ui button tw-flex-1 issue-stop-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/stop"> + {{svg "octicon-stopwatch"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_stop"}} + </button> + <button class="ui icon button issue-cancel-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/cancel" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.timetracker_timer_discard"}}"> + {{svg "octicon-trash"}} + </button> + {{else}} + <button class="ui button tw-flex-1 issue-start-time link-action" data-url="{{.Issue.Link}}/times/stopwatch/start"> + {{svg "octicon-stopwatch"}} {{ctx.Locale.Tr "repo.issues.timetracker_timer_start"}} + </button> + <button class="ui icon button issue-add-time show-modal" data-modal="#issue-time-manually-add-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.timetracker_timer_manually_add"}}"> + {{svg "octicon-plus"}} + </button> + {{end}} </div> {{if and (not $.IsStopwatchRunning) .HasUserStopwatch}} @@ -71,23 +67,19 @@ </div> {{end}} {{if .WorkingUsers}} - <div class="ui comments tw-mt-2"> - {{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}} - <div> - {{range $user, $trackedtime := .WorkingUsers}} - <div class="comment tw-mt-2"> - <a class="avatar"> - {{ctx.AvatarUtils.Avatar $user}} - </a> - <div class="content"> - {{template "shared/user/authorlink" $user}} - <div class="text"> - {{$trackedtime|Sec2Time}} - </div> - </div> + <div class="tw-mt-2"> + {{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Hour)}} + </div> + <div class="ui list flex-items-block"> + {{range $user, $trackedtime := .WorkingUsers}} + <div class="item tw-gap-3"> + {{template "shared/user/avatarlink" dict "user" $user}} + <div> + {{template "shared/user/authorlink" $user}} + <div class="text">{{$trackedtime|Sec2Hour}}</div> </div> - {{end}} - </div> + </div> + {{end}} </div> {{end}} {{end}} diff --git a/templates/repo/issue/sidebar/wip_switch.tmpl b/templates/repo/issue/sidebar/wip_switch.tmpl index 06a3be0d8f..8c40908f62 100644 --- a/templates/repo/issue/sidebar/wip_switch.tmpl +++ b/templates/repo/issue/sidebar/wip_switch.tmpl @@ -1,7 +1,5 @@ {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}} - <div class="toggle-wip tw-mt-2" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title"> - <a class="muted"> - {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}} - </a> - </div> + <a data-global-init="initPullRequestWipToggle" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title"> + {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}} + </a> {{end}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 1a68781ecd..a51a7f4fb1 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -13,8 +13,8 @@ </a> {{end}} <div class="content comment-container"> - <div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3"> - <div class="comment-header-left tw-flex tw-items-center"> + <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"> {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} @@ -36,7 +36,7 @@ </span> {{end}} </div> - <div class="comment-header-right actions tw-flex tw-items-center"> + <div class="comment-header-right"> {{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}} {{if not $.Repository.IsArchived}} {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}} @@ -68,7 +68,7 @@ {{template "repo/issue/view_content/comments" .}} {{if and .Issue.IsPull (not $.Repository.IsArchived)}} - {{template "repo/issue/view_content/pull".}} + {{template "repo/issue/view_content/pull_merge_box".}} {{end}} {{if .IsSigned}} @@ -78,12 +78,12 @@ {{ctx.AvatarUtils.Avatar .SignedUser 40}} </a> <div class="content"> - <div class="ui segment"> + <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="text right"> + <div class="flex-text-block tw-justify-end"> {{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"> @@ -157,7 +157,7 @@ {{end}} <div class="field"> - <div class="text right edit"> + <div class="flex-text-block tw-justify-end"> <button type="button" class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> <button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button> </div> diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl index 6baded8fe9..2f5764d964 100644 --- a/templates/repo/issue/view_content/add_reaction.tmpl +++ b/templates/repo/issue/view_content/add_reaction.tmpl @@ -3,7 +3,7 @@ <a class="muted">{{svg "octicon-smiley"}}</a> <div class="menu"> {{range $value := AllowedReactions}} - <a class="item emoji comment-reaction-button" data-tooltip-content="{{$value}}" aria-label="{{$value}}" data-reaction-content="{{$value}}">{{ReactionToEmoji $value}}</a> + <a class="item emoji" data-tooltip-content="{{$value}}" aria-label="{{$value}}" data-reaction-content="{{$value}}" data-global-click="onCommentReactionButtonClick">{{ReactionToEmoji $value}}</a> {{end}} </div> </div> diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index 2155f78656..e865050559 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -31,7 +31,7 @@ {{if FilenameIsImage .Name}} {{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}} <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> - <img alt="{{.Name}}" src="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}"> + <img loading="lazy" alt="{{.Name}}" src="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}"> </a> {{end}} {{end}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 2e1a67edcc..089cdf2ccd 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -26,14 +26,14 @@ </a> {{end}} <div class="content comment-container"> - <div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3"> - <div class="comment-header-left tw-flex tw-items-center"> + <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"> {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} </span> - <span class="text grey muted-links"> + <span class="comment-text-line"> {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} {{if $.Repository.OriginalURL}} </span> <span class="text migrate"> @@ -45,13 +45,13 @@ {{ctx.AvatarUtils.Avatar .Poster 24}} </a> {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} </span> {{end}} </div> - <div class="comment-header-right actions tw-flex tw-items-center"> + <div class="comment-header-right"> {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} {{if not $.Repository.IsArchived}} {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} @@ -85,7 +85,7 @@ {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if .Issue.IsPull}} {{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}} @@ -100,7 +100,7 @@ {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if .Issue.IsPull}} {{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}} @@ -115,7 +115,7 @@ {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}} {{if eq $.Issue.PullRequest.Status 3}} @@ -143,35 +143,36 @@ <span class="badge">{{svg "octicon-bookmark"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} {{if eq .RefAction 3}}<del>{{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}} </span> {{if eq .RefAction 3}}</del>{{end}} <div class="detail flex-text-block"> - <span class="text grey muted-links"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span> + <span class="comment-text-line"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span> </div> </div> {{else if eq .Type 4}} <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-bookmark"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}} </span> <div class="detail flex-text-block"> {{svg "octicon-git-commit"}} - <span class="text grey muted-links">{{.Content | SanitizeHTML}}</span> + {{/* the content is a link like <a href="{RepoLink}/commit/{CommitID}">message title</a> (from CreateRefComment) */}} + <span class="comment-text-line">{{.Content | SanitizeHTML}}</span> </div> </div> {{else if eq .Type 7}} {{if or .AddedLabels .RemovedLabels}} - <div class="timeline-item event" id="{{.HashTag}}"> + <div class="timeline-item event with-labels-list-inline" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-tag"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{if and .AddedLabels (not .RemovedLabels)}} {{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (ctx.RenderUtils.RenderLabels .AddedLabels $.RepoLink .Issue) $createdStr}} @@ -187,7 +188,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-milestone"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" .OldMilestone.Name .Milestone.Name $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" .OldMilestone.Name $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" .Milestone.Name $createdStr}}{{end}} </span> @@ -197,7 +198,7 @@ <span class="badge">{{svg "octicon-person"}}</span> {{if .RemovedAssignee}} {{template "shared/user/avatarlink" dict "user" .Assignee}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Assignee}} {{if eq .Poster.ID .Assignee.ID}} {{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}} @@ -207,7 +208,7 @@ </span> {{else}} {{template "shared/user/avatarlink" dict "user" .Assignee}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Assignee}} {{if eq .Poster.ID .AssigneeID}} {{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}} @@ -221,7 +222,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-pencil"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <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}} </span> @@ -230,7 +231,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-git-branch"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$oldRef := HTMLFormat `<span class="tw-line-through">%s</span>` .OldRef}} {{ctx.Locale.Tr "repo.issues.delete_branch_at" $oldRef $createdStr}} @@ -240,7 +241,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr}} </span> @@ -249,10 +250,10 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}} - {{if not $timeStr}}{{$timeStr = .Content|Sec2Time}}{{end}} + {{if not $timeStr}}{{$timeStr = .Content|Sec2Hour}}{{end}} {{ctx.Locale.Tr "repo.issues.stop_tracking_history" $timeStr $createdStr}} </span> {{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}} @@ -261,10 +262,10 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}} - {{if not $timeStr}}{{$timeStr = .Content|Sec2Time}}{{end}} + {{if not $timeStr}}{{$timeStr = .Content|Sec2Hour}}{{end}} {{ctx.Locale.Tr "repo.issues.add_time_history" $timeStr $createdStr}} </span> {{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}} @@ -273,7 +274,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr}} </span> @@ -282,7 +283,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$dueDate := DateUtils.AbsoluteLong (.Content|DateUtils.ParseLegacy)}} {{ctx.Locale.Tr "repo.issues.due_date_added" $dueDate $createdStr}} @@ -292,7 +293,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$parsedDeadline := StringUtils.Split .Content "|"}} {{if eq (len $parsedDeadline) 2}} @@ -306,7 +307,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$dueDate := DateUtils.AbsoluteLong (.Content|DateUtils.ParseLegacy)}} {{ctx.Locale.Tr "repo.issues.due_date_remove" $dueDate $createdStr}} @@ -316,14 +317,14 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-package-dependents"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr}} </span> {{if .DependentIssue}} <div class="detail flex-text-block"> {{svg "octicon-plus"}} - <span class="text grey muted-links"> + <span class="comment-text-line"> <a href="{{.DependentIssue.Link}}"> {{if eq .DependentIssue.RepoID .Issue.RepoID}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}} @@ -339,14 +340,14 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-package-dependents"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr}} </span> {{if .DependentIssue}} <div class="detail flex-text-block"> {{svg "octicon-trash"}} - <span class="text grey muted-links"> + <span class="comment-text-line"> <a href="{{.DependentIssue.Link}}"> {{if eq .DependentIssue.RepoID .Issue.RepoID}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}} @@ -374,7 +375,7 @@ <span class="badge tw-text-white{{if eq $reviewType 1}}{{if .Review.Official}} tw-bg-green {{else}} tw-bg-grey{{end}}{{else if eq $reviewType 3}} tw-bg-red{{end}}"> {{if .Review}}{{svg (printf "octicon-%s" .Review.Type.Icon)}}{{end}} </span> - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if eq $reviewType 1}} {{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}} @@ -393,20 +394,20 @@ {{if or .Content .Attachments}} <div class="timeline-item comment"> <div class="content comment-container"> - <div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between"> - <div class="comment-header-left tw-flex tw-items-center"> + <div class="comment-header avatar-content-left-arrow"> + <div class="comment-header-left"> {{if gt .Poster.ID 0}} <a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}"> {{ctx.AvatarUtils.Avatar .Poster 24}} </a> {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{if .OriginalAuthor}} <span class="text black tw-font-semibold"> {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} </span> - <span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span> + <span class="comment-text-line"> {{if $.Repository.OriginalURL}}</span> <span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}</span> {{else}} {{template "shared/user/authorlink" .Poster}} @@ -415,7 +416,7 @@ {{ctx.Locale.Tr "repo.issues.review.left_comment"}} </span> </div> - <div class="comment-header-right actions tw-flex tw-items-center"> + <div class="comment-header-right"> {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} {{if not $.Repository.IsArchived}} {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} @@ -460,12 +461,12 @@ <span class="badge">{{svg "octicon-lock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} {{if .Content}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr}} </span> {{else}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr}} </span> @@ -475,7 +476,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-key"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr}} </span> @@ -486,7 +487,7 @@ {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}} </span> @@ -495,7 +496,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr}} @@ -504,9 +505,9 @@ {{svg "octicon-clock"}} {{if .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}} - <span class="text grey muted-links">{{.RenderedContent}}</span> + <span class="comment-text-line">{{.RenderedContent}}</span> {{else}} - <span class="text grey muted-links">- {{.Content|Sec2Time}}</span> + <span class="comment-text-line">- {{.Content|Sec2Hour}}</span> {{end}} </div> </div> @@ -514,7 +515,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-eye"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{if (gt .AssigneeID 0)}} {{if .RemovedAssignee}} @@ -547,7 +548,7 @@ {{end}} <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-repo-push"}}</span> - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{if .IsForcePush}} {{ctx.Locale.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr}} @@ -556,9 +557,7 @@ {{end}} </span> {{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}} - <span class="tw-float-right comparebox"> - <a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a> - </span> + <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> {{end}} </div> {{if not .IsForcePush}} @@ -568,7 +567,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-project"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$oldProjectDisplayHtml := "Unknown Project"}} {{if .OldProject}} @@ -600,7 +599,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-project"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$newProjectDisplay := .CommentMetaData.ProjectTitle}} {{if .Project}} @@ -615,10 +614,10 @@ <div class="timeline-item-group"> <div class="timeline-item event" id="{{.HashTag}}"> <a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}> - <img src="{{.Poster.AvatarLink ctx}}" width="40" height="40"> + {{ctx.AvatarUtils.Avatar .Poster 40}} </a> <span class="badge grey">{{svg "octicon-x" 16}}</span> - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$reviewerName := ""}} {{if .Review}} @@ -633,18 +632,18 @@ </div> {{if .Content}} <div class="timeline-item comment"> - <div class="content"> - <div class="ui top attached header comment-header-left tw-flex tw-items-center arrow-top"> + <div class="content comment-container"> + <div class="comment-header avatar-content-left-arrow arrow-top"> {{if gt .Poster.ID 0}} <a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}"> {{ctx.AvatarUtils.Avatar .Poster 24}} </a> {{end}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{ctx.Locale.Tr "action.review_dismissed_reason"}} </span> </div> - <div class="ui attached segment"> + <div class="ui attached segment comment-body"> <div class="render-content markup"> {{if .RenderedContent}} {{.RenderedContent}} @@ -661,7 +660,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-git-branch"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{if and .OldRef .NewRef}} {{ctx.Locale.Tr "repo.issues.change_ref_at" .OldRef .NewRef $createdStr}} @@ -675,7 +674,7 @@ {{else if or (eq .Type 34) (eq .Type 35)}} <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-git-merge" 16}}</span> - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}} {{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}} @@ -685,7 +684,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-pin" 16}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr}} {{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr}}{{end}} @@ -695,7 +694,7 @@ <div class="timeline-item event" id="{{.HashTag}}"> <span class="badge">{{svg "octicon-clock"}}</span> {{template "shared/user/avatarlink" dict "user" .Poster}} - <span class="text grey muted-links"> + <span class="comment-text-line"> {{template "shared/user/authorlink" .Poster}} {{$timeStr := .Content|TimeEstimateString}} {{if $timeStr}} diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl index 14803298b8..189b9d6259 100644 --- a/templates/repo/issue/view_content/conversation.tmpl +++ b/templates/repo/issue/view_content/conversation.tmpl @@ -15,9 +15,9 @@ </span> {{end}} </div> - <div> + <div class="tw-flex tw-items-center"> {{if or $invalid $resolved}} - <button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}tw-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-items-center"> + <button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}tw-hidden{{end}} btn tiny show-outdated"> {{svg "octicon-unfold" 16 "tw-mr-2"}} {{if $resolved}} {{ctx.Locale.Tr "repo.issues.review.show_resolved"}} @@ -25,7 +25,7 @@ {{ctx.Locale.Tr "repo.issues.review.show_outdated"}} {{end}} </button> - <button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}tw-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-items-center"> + <button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}tw-hidden {{end}} btn tiny hide-outdated"> {{svg "octicon-fold" 16 "tw-mr-2"}} {{if $resolved}} {{ctx.Locale.Tr "repo.issues.review.hide_resolved"}} @@ -40,7 +40,7 @@ {{if $diff}} {{$file := (index $diff.Files 0)}} <div id="code-preview-{{$comment.ID}}" class="ui table segment{{if $resolved}} tw-hidden{{end}}"> - <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}"> + <div class="diff-file-box file-content {{TabSizeClass $.Editorconfig $file.Name}}"> <div class="file-body file-code code-view code-diff code-diff-unified unicode-escaped"> <table> <tbody> @@ -57,8 +57,8 @@ {{$createdSubStr:= DateUtils.TimeSince .CreatedUnix}} <div class="comment code-comment" id="{{.HashTag}}"> <div class="content comment-container"> - <div class="header comment-header"> - <div class="comment-header-left tw-flex tw-items-center"> + <div class="comment-header"> + <div class="comment-header-left"> {{if not .OriginalAuthor}} <a class="avatar"> {{ctx.AvatarUtils.Avatar .Poster 20}} @@ -79,7 +79,7 @@ {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}} </span> </div> - <div class="comment-header-right actions tw-flex tw-items-center"> + <div class="comment-header-right"> {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} {{if not $.Repository.IsArchived}} {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} @@ -109,7 +109,7 @@ </div> {{end}} </div> - <div class="code-comment-buttons tw-flex tw-items-center tw-flex-wrap tw-mt-2 tw-mb-1 tw-mx-2"> + <div class="flex-text-block tw-flex-wrap tw-my-2"> <div class="tw-flex-1"> {{if $resolved}} <div class="ui grey text"> @@ -118,7 +118,7 @@ </div> {{end}} </div> - <div class="code-comment-buttons-buttons"> + <div class="flex-text-block"> {{if and $.CanMarkConversation $hasReview (not $isReviewPending)}} <button class="ui tiny basic button resolve-conversation" data-origin="timeline" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{$comment.ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation"> {{if $resolved}} @@ -129,8 +129,8 @@ </button> {{end}} {{if and $.SignedUserID (not $.Repository.IsArchived)}} - <button class="comment-form-reply ui primary tiny labeled icon button tw-ml-1 tw-mr-0"> - {{svg "octicon-reply" 16 "reply icon tw-mr-1"}}{{ctx.Locale.Tr "repo.diff.comment.reply"}} + <button class="comment-form-reply ui primary icon tiny button"> + {{svg "octicon-reply" 12}}{{ctx.Locale.Tr "repo.diff.comment.reply"}} </button> {{end}} </div> diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull_merge_box.tmpl index 7c53c5edb5..113bfb732e 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull_merge_box.tmpl @@ -1,7 +1,13 @@ {{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}} {{/* Then the merge box will not be displayed because this page already contains enough information */}} {{else}} -<div class="timeline-item comment merge box"> +<div class="timeline-item comment pull-merge-box" + data-global-init="initRepoPullMergeBox" + {{if .PullMergeBoxReloadingInterval}} + data-pull-merge-box-reloading-interval="{{.PullMergeBoxReloadingInterval}}" + 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 @@ -32,7 +38,7 @@ </div> {{end}} {{$showGeneralMergeForm := false}} - <div class="ui attached segment merge-section {{if not $.LatestCommitStatus}}no-header{{end}} flex-items-block"> + <div class="ui attached segment merge-section {{if not $.LatestCommitStatus}}avatar-content-left-arrow{{end}} flex-items-block"> {{if .Issue.PullRequest.HasMerged}} {{if .IsPullBranchDeletable}} <div class="item item-section text tw-flex-1"> @@ -83,13 +89,13 @@ {{ctx.Locale.Tr "repo.pulls.data_broken"}} </div> {{else if .IsPullWorkInProgress}} - <div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{.WorkInProgressPrefix}}" data-update-url="{{.Issue.Link}}/title"> + <div class="item"> <div class="item-section-left flex-text-inline tw-flex-1"> {{svg "octicon-x"}} {{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}} </div> {{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}} - <button class="ui compact button"> + <button class="ui compact button" data-global-init="initPullRequestWipToggle" data-title="{{.Issue.Title}}" data-wip-prefix="{{.WorkInProgressPrefix}}" data-update-url="{{.Issue.Link}}/title"> {{ctx.Locale.Tr "repo.pulls.remove_prefix" .WorkInProgressPrefix}} </button> {{end}} @@ -97,7 +103,7 @@ {{template "repo/issue/view_content/update_branch_by_merge" $}} {{else if .Issue.PullRequest.IsChecking}} <div class="item"> - {{svg "octicon-sync"}} + {{svg "octicon-sync" 16 "circular-spin"}} {{ctx.Locale.Tr "repo.pulls.is_checking"}} </div> {{else if .Issue.PullRequest.IsAncestor}} @@ -191,10 +197,11 @@ </div> {{end}} {{end}} + {{template "repo/issue/view_content/update_branch_by_merge" $}} + {{if .Issue.PullRequest.IsEmpty}} <div class="divider"></div> - <div class="item"> {{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.pulls.is_empty"}} @@ -216,7 +223,7 @@ const defaultMergeMessage = {{.DefaultMergeBody}}; const defaultSquashMergeMessage = {{.DefaultSquashMergeBody}}; const mergeForm = { - 'baseLink': {{.Link}}, + 'baseLink': {{.Issue.Link}}, 'textCancel': {{ctx.Locale.Tr "cancel"}}, 'textDeleteBranch': {{ctx.Locale.Tr "repo.branch.delete" .HeadTarget}}, 'textAutoMergeButtonWhenSucceed': {{ctx.Locale.Tr "repo.pulls.auto_merge_button_when_succeed"}}, @@ -318,7 +325,7 @@ {{if .IsBlockedByApprovals}} <div class="item text red"> {{svg "octicon-x"}} - {{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}} + {{ctx.Locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}} </div> {{else if .IsBlockedByRejection}} <div class="item text red"> @@ -377,7 +384,7 @@ */}} {{if and $.StillCanManualMerge (not $showGeneralMergeForm)}} <div class="divider"></div> - <form class="ui form form-fetch-action" action="{{.Link}}/merge" method="post">{{/* another similar form is in PullRequestMergeForm.vue*/}} + <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"}}"> diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 9a3e2cb7d7..9dbcbeee21 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -1,55 +1,57 @@ <div class="divider"></div> -<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </div> -<div class="instruct-content tw-mt-2 tw-hidden"> - <div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div> - {{$localBranch := .PullRequest.HeadBranch}} - {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}} - {{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}} - {{end}} - <div class="ui secondary segment"> - {{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}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div> - {{else}} - <div>git fetch -u origin {{.PullRequest.GetGitRefName}}:{{$localBranch}}</div> +<details> + <summary>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}}</summary> + <div class="tw-mt-2"> + <div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div> + {{$localBranch := .PullRequest.HeadBranch}} + {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}} + {{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}} {{end}} - <div>git checkout {{$localBranch}}</div> - </div> - {{if .ShowMergeInstructions}} - <div> - <h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3> - {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} - {{if not .AutodetectManualMerge}} - <div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div> - {{end}} - </div> - <div class="ui secondary segment"> - <div data-pull-merge-style="merge"> - <div>git checkout {{.PullRequest.BaseBranch}}</div> - <div>git merge --no-ff {{$localBranch}}</div> - </div> - <div class="tw-hidden" data-pull-merge-style="rebase"> - <div>git checkout {{.PullRequest.BaseBranch}}</div> - <div>git merge --ff-only {{$localBranch}}</div> - </div> - <div class="tw-hidden" data-pull-merge-style="rebase-merge"> + <div class="ui secondary segment tw-font-mono"> + {{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}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div> + {{else}} + <div>git fetch -u origin {{.PullRequest.GetGitHeadRefName}}:{{$localBranch}}</div> + {{end}} <div>git checkout {{$localBranch}}</div> - <div>git rebase {{.PullRequest.BaseBranch}}</div> - <div>git checkout {{.PullRequest.BaseBranch}}</div> - <div>git merge --no-ff {{$localBranch}}</div> - </div> - <div class="tw-hidden" data-pull-merge-style="squash"> - <div>git checkout {{.PullRequest.BaseBranch}}</div> - <div>git merge --squash {{$localBranch}}</div> </div> - <div class="tw-hidden" data-pull-merge-style="fast-forward-only"> - <div>git checkout {{.PullRequest.BaseBranch}}</div> - <div>git merge --ff-only {{$localBranch}}</div> + {{if .ShowMergeInstructions}} + <div> + <h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3> + {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} + {{if not .AutodetectManualMerge}} + <div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div> + {{end}} </div> - <div class="tw-hidden" data-pull-merge-style="manually-merged"> - <div>git checkout {{.PullRequest.BaseBranch}}</div> - <div>git merge {{$localBranch}}</div> + <div class="ui secondary segment tw-font-mono"> + <div data-pull-merge-style="merge"> + <div>git checkout {{.PullRequest.BaseBranch}}</div> + <div>git merge --no-ff {{$localBranch}}</div> + </div> + <div class="tw-hidden" data-pull-merge-style="rebase"> + <div>git checkout {{.PullRequest.BaseBranch}}</div> + <div>git merge --ff-only {{$localBranch}}</div> + </div> + <div class="tw-hidden" data-pull-merge-style="rebase-merge"> + <div>git checkout {{$localBranch}}</div> + <div>git rebase {{.PullRequest.BaseBranch}}</div> + <div>git checkout {{.PullRequest.BaseBranch}}</div> + <div>git merge --no-ff {{$localBranch}}</div> + </div> + <div class="tw-hidden" data-pull-merge-style="squash"> + <div>git checkout {{.PullRequest.BaseBranch}}</div> + <div>git merge --squash {{$localBranch}}</div> + </div> + <div class="tw-hidden" data-pull-merge-style="fast-forward-only"> + <div>git checkout {{.PullRequest.BaseBranch}}</div> + <div>git merge --ff-only {{$localBranch}}</div> + </div> + <div class="tw-hidden" data-pull-merge-style="manually-merged"> + <div>git checkout {{.PullRequest.BaseBranch}}</div> + <div>git merge {{$localBranch}}</div> + </div> + <div>git push origin {{.PullRequest.BaseBranch}}</div> </div> - <div>git push origin {{.PullRequest.BaseBranch}}</div> + {{end}} </div> - {{end}} -</div> +</details> diff --git a/templates/repo/issue/view_content/reactions.tmpl b/templates/repo/issue/view_content/reactions.tmpl index 0011efe8b2..286d93a9b1 100644 --- a/templates/repo/issue/view_content/reactions.tmpl +++ b/templates/repo/issue/view_content/reactions.tmpl @@ -1,9 +1,9 @@ <div class="bottom-reactions" data-action-url="{{$.ActionURL}}"> {{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}} comment-reaction-button" - data-tooltip-content - title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}" + <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}}" data-tooltip-placement="bottom-start" data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}"> diff --git a/templates/repo/issue/view_content/reference_issue_dialog.tmpl b/templates/repo/issue/view_content/reference_issue_dialog.tmpl index d6c9081001..0b28bdc811 100644 --- a/templates/repo/issue/view_content/reference_issue_dialog.tmpl +++ b/templates/repo/issue/view_content/reference_issue_dialog.tmpl @@ -7,7 +7,7 @@ {{.CsrfTokenHtml}} <div class="field"> <label><strong>{{ctx.Locale.Tr "repository"}}</strong></label> - <div class="ui search selection dropdown issue_reference_repository_search ellipsis-items-nowrap"> + <div class="ui search selection dropdown issue_reference_repository_search ellipsis-text-items"> <div class="default text gt-ellipsis">{{.Repository.FullName}}</div> <div class="menu"></div> </div> @@ -20,7 +20,7 @@ <label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label> <textarea name="content"></textarea> </div> - <div class="text right"> + <div class="flex-text-block tw-justify-end"> <button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button> </div> </form> diff --git a/templates/repo/issue/view_content/update_branch_by_merge.tmpl b/templates/repo/issue/view_content/update_branch_by_merge.tmpl index adce052dee..5d959bf0b3 100644 --- a/templates/repo/issue/view_content/update_branch_by_merge.tmpl +++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl @@ -8,8 +8,8 @@ <div class="item-section-right"> {{if and $.UpdateAllowed $.UpdateByRebaseAllowed}} <div class="tw-inline-block"> - <div class="ui buttons update-button"> - <button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}"> + <div id="update-pr-branch-with-base" class="ui buttons"> + <button class="ui button" data-do="{{$.Issue.Link}}/update" data-redirect="{{$.Issue.Link}}"> <span class="button-text"> {{ctx.Locale.Tr "repo.pulls.update_branch"}} </span> @@ -17,15 +17,15 @@ <div class="ui dropdown icon button"> {{svg "octicon-triangle-down"}} <div class="menu"> - <a class="item active selected" data-do="{{$.Link}}/update">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</a> - <a class="item" data-do="{{$.Link}}/update?style=rebase">{{ctx.Locale.Tr "repo.pulls.update_branch_rebase"}}</a> + <a class="item active selected" data-do="{{$.Issue.Link}}/update">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</a> + <a class="item" data-do="{{$.Issue.Link}}/update?style=rebase">{{ctx.Locale.Tr "repo.pulls.update_branch_rebase"}}</a> </div> </div> </div> </div> {{end}} {{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}} - <form action="{{$.Link}}/update" method="post" class="ui update-branch-form"> + <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> diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 0354f6ef22..103fa5de53 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -12,8 +12,8 @@ <div class="issue-title-header"> {{$canEditIssueTitle := and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}} <div class="issue-title" id="issue-title-display"> - <h1 class="tw-break-anywhere"> - {{ctx.RenderUtils.RenderIssueTitle .Issue.Title ($.Repository.ComposeMetas ctx)}} + <h1> + {{ctx.RenderUtils.RenderIssueTitle .Issue.Title $.Repository}} <span class="index">#{{.Issue.Index}}</span> </h1> <div class="issue-title-buttons"> @@ -42,7 +42,7 @@ {{if .HasMerged}} <div class="ui purple label issue-state-label">{{svg "octicon-git-merge" 16 "tw-mr-1"}} {{if eq .Issue.PullRequest.Status 3}}{{ctx.Locale.Tr "repo.pulls.manually_merged"}}{{else}}{{ctx.Locale.Tr "repo.pulls.merged"}}{{end}}</div> {{else if .Issue.IsClosed}} - <div class="ui red label issue-state-label">{{svg (Iif .Issue.IsPull "octicon-git-pull-request" "octicon-issue-closed")}} {{ctx.Locale.Tr "repo.issues.closed_title"}}</div> + <div class="ui red label issue-state-label">{{svg (Iif .Issue.IsPull "octicon-git-pull-request-closed" "octicon-issue-closed")}} {{ctx.Locale.Tr "repo.issues.closed_title"}}</div> {{else if .Issue.IsPull}} {{if .IsPullWorkInProgress}} <div class="ui grey label issue-state-label">{{svg "octicon-git-pull-request-draft"}} {{ctx.Locale.Tr "repo.issues.draft_title"}}</div> |