loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Consolidate the two review boxes into one (#24738)

View diff:
https://github.com/go-gitea/gitea/pull/24738/files?diff=unified&w=1

Improve layout and functionality in review area:

<img width="439" alt="Screenshot 2023-05-15 at 20 10 01"
src="https://github.com/go-gitea/gitea/assets/115237/be10452b-5829-4927-8801-7b26a57b3dbd">

Remove the "Reviewers" timeline box that appears before the merge box.
it's a duplicate of the top-right review area and all functionality of
it has been moved to the other box:

<img width="868" alt="Screenshot 2023-05-15 at 19 39 31"
src="https://github.com/go-gitea/gitea/assets/115237/35489445-e54b-40d3-b3cf-38d029478f96">

Increase timeline item vertical padding from 12px to 16px:

<img width="449" alt="Screenshot 2023-05-15 at 19 43 50"
src="https://github.com/go-gitea/gitea/assets/115237/919c4f9d-a485-4f51-b08c-2c0fc714a413">

---------

Co-authored-by: Giteabot <teabot@gitea.io>

authored by

silverwind
Giteabot
and committed by
GitHub
a70d853d 275d4b7e

+835 -932
+1 -1
templates/explore/repo_list.tmpl
··· 38 38 {{end}} 39 39 </div> 40 40 </div> 41 - <div class="metas gt-df gt-ac text grey"> 41 + <div class="gt-font-13 gt-df gt-ac text grey"> 42 42 {{if .PrimaryLanguage}} 43 43 <a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> 44 44 <span class="gt-df gt-ac gt-mr-3"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
+100 -105
templates/package/view.tmpl
··· 2 2 <div role="main" aria-label="{{.Title}}" class="page-content repository view issue packages"> 3 3 {{template "user/overview/header" .}} 4 4 <div class="ui container"> 5 - <div> 6 - <div class="ui stackable grid"> 7 - <div class="sixteen wide column title"> 8 - <div class="issue-title"> 9 - <h1>{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</h1> 5 + <div class="issue-title-header"> 6 + <div class="issue-title"> 7 + <h1>{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</h1> 8 + </div> 9 + <div> 10 + {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}} 11 + {{if .HasRepositoryAccess}} 12 + {{.locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.Link (.PackageDescriptor.Repository.FullName | Escape) | Safe}} 13 + {{else}} 14 + {{.locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}} 15 + {{end}} 16 + </div> 17 + </div> 18 + <div class="issue-content"> 19 + <div class="issue-content-left"> 20 + {{template "package/content/alpine" .}} 21 + {{template "package/content/cargo" .}} 22 + {{template "package/content/chef" .}} 23 + {{template "package/content/composer" .}} 24 + {{template "package/content/conan" .}} 25 + {{template "package/content/conda" .}} 26 + {{template "package/content/container" .}} 27 + {{template "package/content/cran" .}} 28 + {{template "package/content/debian" .}} 29 + {{template "package/content/generic" .}} 30 + {{template "package/content/go" .}} 31 + {{template "package/content/helm" .}} 32 + {{template "package/content/maven" .}} 33 + {{template "package/content/npm" .}} 34 + {{template "package/content/nuget" .}} 35 + {{template "package/content/pub" .}} 36 + {{template "package/content/pypi" .}} 37 + {{template "package/content/rpm" .}} 38 + {{template "package/content/rubygems" .}} 39 + {{template "package/content/swift" .}} 40 + {{template "package/content/vagrant" .}} 41 + </div> 42 + <div class="issue-content-right ui segment"> 43 + <strong>{{.locale.Tr "packages.details"}}</strong> 44 + <div class="ui relaxed list"> 45 + <div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div> 46 + {{if .HasRepositoryAccess}} 47 + <div class="item">{{svg "octicon-repo" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div> 48 + {{end}} 49 + <div class="item">{{svg "octicon-calendar" 16 "gt-mr-3"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}</div> 50 + <div class="item">{{svg "octicon-download" 16 "gt-mr-3"}} {{.PackageDescriptor.Version.DownloadCount}}</div> 51 + {{template "package/metadata/alpine" .}} 52 + {{template "package/metadata/cargo" .}} 53 + {{template "package/metadata/chef" .}} 54 + {{template "package/metadata/composer" .}} 55 + {{template "package/metadata/conan" .}} 56 + {{template "package/metadata/conda" .}} 57 + {{template "package/metadata/container" .}} 58 + {{template "package/metadata/cran" .}} 59 + {{template "package/metadata/debian" .}} 60 + {{template "package/metadata/generic" .}} 61 + {{template "package/metadata/helm" .}} 62 + {{template "package/metadata/maven" .}} 63 + {{template "package/metadata/npm" .}} 64 + {{template "package/metadata/nuget" .}} 65 + {{template "package/metadata/pub" .}} 66 + {{template "package/metadata/pypi" .}} 67 + {{template "package/metadata/rpm" .}} 68 + {{template "package/metadata/rubygems" .}} 69 + {{template "package/metadata/swift" .}} 70 + {{template "package/metadata/vagrant" .}} 71 + {{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}} 72 + <div class="item">{{svg "octicon-database" 16 "gt-mr-3"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div> 73 + {{end}} 74 + </div> 75 + {{if not (eq .PackageDescriptor.Package.Type "container")}} 76 + <div class="ui divider"></div> 77 + <strong>{{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong> 78 + <div class="ui relaxed list"> 79 + {{range .PackageDescriptor.Files}} 80 + <div class="item"> 81 + <a href="{{$.Link}}/files/{{.File.ID}}">{{.File.Name}}</a> 82 + <span class="text small file-size">{{FileSize .Blob.Size}}</span> 83 + </div> 84 + {{end}} 10 85 </div> 11 - <div> 12 - {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}} 13 - {{if .HasRepositoryAccess}} 14 - {{.locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.Link (.PackageDescriptor.Repository.FullName | Escape) | Safe}} 15 - {{else}} 16 - {{.locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}} 17 - {{end}} 86 + {{end}} 87 + {{if .LatestVersions}} 88 + <div class="ui divider"></div> 89 + <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong> 90 + <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a> 91 + <div class="ui relaxed list"> 92 + {{range .LatestVersions}} 93 + <div class="item gt-df"> 94 + <a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> 95 + <span class="text small">{{DateTime "short" .CreatedUnix}}</span> 96 + </div> 97 + {{end}} 18 98 </div> 99 + {{end}} 100 + {{if or .CanWritePackages .HasRepositoryAccess}} 19 101 <div class="ui divider"></div> 20 - </div> 21 - <div class="twelve wide column"> 22 - {{template "package/content/alpine" .}} 23 - {{template "package/content/cargo" .}} 24 - {{template "package/content/chef" .}} 25 - {{template "package/content/composer" .}} 26 - {{template "package/content/conan" .}} 27 - {{template "package/content/conda" .}} 28 - {{template "package/content/container" .}} 29 - {{template "package/content/cran" .}} 30 - {{template "package/content/debian" .}} 31 - {{template "package/content/generic" .}} 32 - {{template "package/content/go" .}} 33 - {{template "package/content/helm" .}} 34 - {{template "package/content/maven" .}} 35 - {{template "package/content/npm" .}} 36 - {{template "package/content/nuget" .}} 37 - {{template "package/content/pub" .}} 38 - {{template "package/content/pypi" .}} 39 - {{template "package/content/rpm" .}} 40 - {{template "package/content/rubygems" .}} 41 - {{template "package/content/swift" .}} 42 - {{template "package/content/vagrant" .}} 43 - </div> 44 - <div class="four wide column"> 45 - <div class="ui segment metas"> 46 - <strong>{{.locale.Tr "packages.details"}}</strong> 47 - <div class="ui relaxed list"> 48 - <div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div> 49 - {{if .HasRepositoryAccess}} 50 - <div class="item">{{svg "octicon-repo" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div> 51 - {{end}} 52 - <div class="item">{{svg "octicon-calendar" 16 "gt-mr-3"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}</div> 53 - <div class="item">{{svg "octicon-download" 16 "gt-mr-3"}} {{.PackageDescriptor.Version.DownloadCount}}</div> 54 - {{template "package/metadata/alpine" .}} 55 - {{template "package/metadata/cargo" .}} 56 - {{template "package/metadata/chef" .}} 57 - {{template "package/metadata/composer" .}} 58 - {{template "package/metadata/conan" .}} 59 - {{template "package/metadata/conda" .}} 60 - {{template "package/metadata/container" .}} 61 - {{template "package/metadata/cran" .}} 62 - {{template "package/metadata/debian" .}} 63 - {{template "package/metadata/generic" .}} 64 - {{template "package/metadata/helm" .}} 65 - {{template "package/metadata/maven" .}} 66 - {{template "package/metadata/npm" .}} 67 - {{template "package/metadata/nuget" .}} 68 - {{template "package/metadata/pub" .}} 69 - {{template "package/metadata/pypi" .}} 70 - {{template "package/metadata/rpm" .}} 71 - {{template "package/metadata/rubygems" .}} 72 - {{template "package/metadata/swift" .}} 73 - {{template "package/metadata/vagrant" .}} 74 - {{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}} 75 - <div class="item">{{svg "octicon-database" 16 "gt-mr-3"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div> 76 - {{end}} 77 - </div> 78 - {{if not (eq .PackageDescriptor.Package.Type "container")}} 79 - <div class="ui divider"></div> 80 - <strong>{{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong> 81 - <div class="ui relaxed list"> 82 - {{range .PackageDescriptor.Files}} 83 - <div class="item"> 84 - <a href="{{$.Link}}/files/{{.File.ID}}">{{.File.Name}}</a> 85 - <span class="text small file-size">{{FileSize .Blob.Size}}</span> 86 - </div> 87 - {{end}} 88 - </div> 102 + <div class="ui relaxed list"> 103 + {{if .HasRepositoryAccess}} 104 + <div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{.locale.Tr "repo.issues"}}</a></div> 89 105 {{end}} 90 - {{if .LatestVersions}} 91 - <div class="ui divider"></div> 92 - <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong> 93 - <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a> 94 - <div class="ui relaxed list"> 95 - {{range .LatestVersions}} 96 - <div class="item gt-df"> 97 - <a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> 98 - <span class="text small">{{DateTime "short" .CreatedUnix}}</span> 99 - </div> 100 - {{end}} 101 - </div> 102 - {{end}} 103 - {{if or .CanWritePackages .HasRepositoryAccess}} 104 - <div class="ui divider"></div> 105 - <div class="ui relaxed list"> 106 - {{if .HasRepositoryAccess}} 107 - <div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{.locale.Tr "repo.issues"}}</a></div> 108 - {{end}} 109 - {{if .CanWritePackages}} 110 - <div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{.locale.Tr "repo.settings"}}</a></div> 111 - {{end}} 112 - </div> 106 + {{if .CanWritePackages}} 107 + <div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{.locale.Tr "repo.settings"}}</a></div> 113 108 {{end}} 114 109 </div> 115 - </div> 110 + {{end}} 116 111 </div> 117 112 </div> 118 113 </div>
+123 -125
templates/repo/issue/new_form.tmpl
··· 1 - <form class="ui comment form stackable grid" id="new-issue" action="{{.Link}}" method="post"> 1 + <form class="issue-content ui comment form" id="new-issue" action="{{.Link}}" method="post"> 2 2 {{.CsrfTokenHtml}} 3 3 {{if .Flash}} 4 4 <div class="sixteen wide column"> 5 5 {{template "base/alert" .}} 6 6 </div> 7 7 {{end}} 8 - <div class="twelve wide column"> 8 + <div class="issue-content-left"> 9 9 <div class="ui comments"> 10 10 <div class="comment"> 11 - {{template "shared/user/avatarlink" dict "Context" $.Context "user" .SignedUser}} 12 - <div class="ui segment content"> 11 + {{avatar $.Context .SignedUser 40}} 12 + <div class="ui segment content gt-my-0"> 13 13 <div class="field"> 14 14 <input name="title" id="issue_title" placeholder="{{.locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" tabindex="3" autofocus required maxlength="255" autocomplete="off"> 15 15 {{if .PageIsComparePull}} ··· 48 48 </div> 49 49 </div> 50 50 51 - <div class="four wide column"> 52 - <div class="ui segment metas"> 53 - {{template "repo/issue/branch_selector_field" .}} 51 + <div class="issue-content-right ui segment"> 52 + {{template "repo/issue/branch_selector_field" .}} 54 53 55 - <input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}"> 56 - {{template "repo/issue/labels/labels_selector_field" .}} 57 - {{template "repo/issue/labels/labels_sidebar" dict "root" $}} 54 + <input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}"> 55 + {{template "repo/issue/labels/labels_selector_field" .}} 56 + {{template "repo/issue/labels/labels_sidebar" dict "root" $}} 58 57 59 - <div class="ui divider"></div> 58 + <div class="ui divider"></div> 60 59 61 - <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}"> 62 - <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown"> 63 - <span class="text"> 64 - <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> 65 - {{if .HasIssuesOrPullsWritePermission}} 66 - {{svg "octicon-gear"}} 67 - {{end}} 68 - </span> 69 - <div class="menu"> 70 - {{template "repo/issue/milestone/select_menu" .}} 71 - </div> 60 + <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}"> 61 + <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown"> 62 + <span class="text"> 63 + <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> 64 + {{if .HasIssuesOrPullsWritePermission}} 65 + {{svg "octicon-gear"}} 66 + {{end}} 67 + </span> 68 + <div class="menu"> 69 + {{template "repo/issue/milestone/select_menu" .}} 72 70 </div> 73 - <div class="ui select-milestone list"> 74 - <span class="no-select item {{if .Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> 75 - <div class="selected"> 76 - {{if .Milestone}} 77 - <a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> 78 - {{svg "octicon-milestone" 18 "gt-mr-3"}} 79 - {{.Milestone.Name}} 80 - </a> 81 - {{end}} 82 - </div> 71 + </div> 72 + <div class="ui select-milestone list"> 73 + <span class="no-select item {{if .Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> 74 + <div class="selected"> 75 + {{if .Milestone}} 76 + <a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> 77 + {{svg "octicon-milestone" 18 "gt-mr-3"}} 78 + {{.Milestone.Name}} 79 + </a> 80 + {{end}} 83 81 </div> 82 + </div> 84 83 85 - {{if .IsProjectsEnabled}} 86 - <div class="ui divider"></div> 84 + {{if .IsProjectsEnabled}} 85 + <div class="ui divider"></div> 87 86 88 - <input id="project_id" name="project_id" type="hidden" value="{{.project_id}}"> 89 - <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown"> 87 + <input id="project_id" name="project_id" type="hidden" value="{{.project_id}}"> 88 + <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown"> 89 + <span class="text"> 90 + <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> 91 + {{if .HasIssuesOrPullsWritePermission}} 92 + {{svg "octicon-gear"}} 93 + {{end}} 94 + </span> 95 + <div class="menu"> 96 + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> 97 + {{if or .OpenProjects .ClosedProjects}} 98 + <div class="ui icon search input"> 99 + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 100 + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> 101 + </div> 102 + {{end}} 103 + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> 104 + {{if and (not .OpenProjects) (not .ClosedProjects)}} 105 + <div class="header" style="text-transform: none;font-size:14px;"> 106 + {{.locale.Tr "repo.issues.new.no_items"}} 107 + </div> 108 + {{else}} 109 + {{if .OpenProjects}} 110 + <div class="divider"></div> 111 + <div class="header"> 112 + {{.locale.Tr "repo.issues.new.open_projects"}} 113 + </div> 114 + {{range .OpenProjects}} 115 + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 116 + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 117 + </a> 118 + {{end}} 119 + {{end}} 120 + {{if .ClosedProjects}} 121 + <div class="divider"></div> 122 + <div class="header"> 123 + {{.locale.Tr "repo.issues.new.closed_projects"}} 124 + </div> 125 + {{range .ClosedProjects}} 126 + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 127 + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 128 + </a> 129 + {{end}} 130 + {{end}} 131 + {{end}} 132 + </div> 133 + </div> 134 + <div class="ui select-project list"> 135 + <span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> 136 + <div class="selected"> 137 + {{if .Project}} 138 + <a class="item muted sidebar-item-link" href="{{.Project.Link}}"> 139 + {{svg .Project.IconName 18 "gt-mr-3"}}{{.Project.Title}} 140 + </a> 141 + {{end}} 142 + </div> 143 + </div> 144 + {{end}} 145 + <div class="ui divider"></div> 146 + <input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}"> 147 + <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown"> 90 148 <span class="text"> 91 - <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> 149 + <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> 92 150 {{if .HasIssuesOrPullsWritePermission}} 93 151 {{svg "octicon-gear"}} 94 152 {{end}} 95 153 </span> 96 - <div class="menu"> 97 - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> 98 - {{if or .OpenProjects .ClosedProjects}} 154 + <div class="filter menu" data-id="#assignee_ids"> 155 + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> 99 156 <div class="ui icon search input"> 100 157 <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 101 - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> 158 + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> 102 159 </div> 103 - {{end}} 104 - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> 105 - {{if and (not .OpenProjects) (not .ClosedProjects)}} 106 - <div class="header" style="text-transform: none;font-size:14px;"> 107 - {{.locale.Tr "repo.issues.new.no_items"}} 108 - </div> 109 - {{else}} 110 - {{if .OpenProjects}} 111 - <div class="divider"></div> 112 - <div class="header"> 113 - {{.locale.Tr "repo.issues.new.open_projects"}} 114 - </div> 115 - {{range .OpenProjects}} 116 - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 117 - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 118 - </a> 119 - {{end}} 120 - {{end}} 121 - {{if .ClosedProjects}} 122 - <div class="divider"></div> 123 - <div class="header"> 124 - {{.locale.Tr "repo.issues.new.closed_projects"}} 125 - </div> 126 - {{range .ClosedProjects}} 127 - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 128 - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 129 - </a> 130 - {{end}} 131 - {{end}} 132 - {{end}} 133 - </div> 134 - </div> 135 - <div class="ui select-project list"> 136 - <span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> 137 - <div class="selected"> 138 - {{if .Project}} 139 - <a class="item muted sidebar-item-link" href="{{.Project.Link}}"> 140 - {{svg .Project.IconName 18 "gt-mr-3"}}{{.Project.Title}} 160 + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> 161 + {{range .Assignees}} 162 + <a class="item muted" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> 163 + <span class="octicon-check invisible">{{svg "octicon-check"}}</span> 164 + <span class="text"> 165 + {{avatar $.Context . 28 "gt-mr-3"}}{{template "repo/search_name" .}} 166 + </span> 141 167 </a> 142 168 {{end}} 143 169 </div> 144 170 </div> 145 - {{end}} 171 + <div class="ui assignees list"> 172 + <span class="no-select item {{if .HasSelectedLabel}}gt-hidden{{end}}"> 173 + {{.locale.Tr "repo.issues.new.no_assignees"}} 174 + </span> 175 + {{range .Assignees}} 176 + <a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}"> 177 + {{avatar $.Context . 28 "gt-mr-3 gt-vm"}}{{.GetDisplayName}} 178 + </a> 179 + {{end}} 180 + </div> 181 + {{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}} 146 182 <div class="ui divider"></div> 147 - <input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}"> 148 - <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown"> 149 - <span class="text"> 150 - <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> 151 - {{if .HasIssuesOrPullsWritePermission}} 152 - {{svg "octicon-gear"}} 153 - {{end}} 154 - </span> 155 - <div class="filter menu" data-id="#assignee_ids"> 156 - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> 157 - <div class="ui icon search input"> 158 - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 159 - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> 160 - </div> 161 - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> 162 - {{range .Assignees}} 163 - <a class="item muted" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> 164 - <span class="octicon-check invisible">{{svg "octicon-check"}}</span> 165 - <span class="text"> 166 - {{avatar $.Context . 28 "gt-mr-3"}}{{template "repo/search_name" .}} 167 - </span> 168 - </a> 169 - {{end}} 170 - </div> 183 + <div class="inline field"> 184 + <div class="ui checkbox"> 185 + <label data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> 186 + <input name="allow_maintainer_edit" type="checkbox" {{if .AllowMaintainerEdit}}checked{{end}}> 171 187 </div> 172 - <div class="ui assignees list"> 173 - <span class="no-select item {{if .HasSelectedLabel}}gt-hidden{{end}}"> 174 - {{.locale.Tr "repo.issues.new.no_assignees"}} 175 - </span> 176 - {{range .Assignees}} 177 - <a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}"> 178 - {{avatar $.Context . 28 "gt-mr-3 gt-vm"}}{{.GetDisplayName}} 179 - </a> 180 - {{end}} 181 - </div> 182 - {{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}} 183 - <div class="ui divider"></div> 184 - <div class="inline field"> 185 - <div class="ui checkbox"> 186 - <label data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> 187 - <input name="allow_maintainer_edit" type="checkbox" {{if .AllowMaintainerEdit}}checked{{end}}> 188 - </div> 189 - </div> 190 - {{end}} 191 - </div> 192 - <input type="hidden" name="redirect_after_creation" value="{{.redirect_after_creation}}"> 188 + </div> 189 + {{end}} 193 190 </div> 191 + <input type="hidden" name="redirect_after_creation" value="{{.redirect_after_creation}}"> 194 192 </form>
+2 -2
templates/repo/issue/view_content.tmpl
··· 1 - <div class="ui stackable grid"> 1 + <div class="issue-content"> 2 2 <!-- I know, there is probably a better way to do this (moved from sidebar.tmpl, original author: 6543 @ 2021-02-28) --> 3 3 <!-- Agree, there should be a better way, eg: introduce window.config.pageData (original author: wxiaoguang @ 2021-09-05) --> 4 4 <input type="hidden" id="repolink" value="{{$.RepoRelPath}}"> ··· 7 7 <input type="hidden" id="type" value="{{.IssueType}}"> 8 8 9 9 {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}} 10 - <div class="twelve wide column comment-list prevent-before-timeline"> 10 + <div class="issue-content-left comment-list prevent-before-timeline"> 11 11 <div class="ui timeline"> 12 12 <div id="{{.Issue.HashTag}}" class="timeline-item comment first"> 13 13 {{if .Issue.OriginalAuthor}}
-97
templates/repo/issue/view_content/pull.tmpl
··· 1 - {{if or .PullReviewers .OriginalReviews}} 2 - <div class="comment box timeline-item gt-pt-3 gt-pb-0"> 3 - <div class="content"> 4 - <div class="ui segment"> 5 - <h4>{{$.locale.Tr "repo.issues.review.reviewers"}}</h4> 6 - {{range .PullReviewers}} 7 - {{$createdStr:= TimeSinceUnix .Review.UpdatedUnix $.locale}} 8 - <div class="ui divider"></div> 9 - <div class="review-item"> 10 - <div class="review-item-left"> 11 - <span class="gt-mr-3 text {{.Review.HTMLTypeColorName}}"> 12 - {{svg (printf "octicon-%s" .Review.Type.Icon)}} 13 - </span> 14 - {{if .User}} 15 - <a href="{{.User.HomeLink}}"> 16 - {{avatar $.Context .User 20}} 17 - </a> 18 - {{end}} 19 - <span class="gt-ml-2"> 20 - {{if .User}} 21 - <a href="{{.User.HomeLink}}">{{.User.GetDisplayName}}</a> 22 - {{else if .Team}} 23 - <span class="ui text">{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> 24 - {{end}} 25 - {{if eq .Review.Type 1}} 26 - {{$.locale.Tr "repo.issues.review.approve" $createdStr | Safe}} 27 - {{else if eq .Review.Type 2}} 28 - {{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}} 29 - {{else if eq .Review.Type 3}} 30 - {{$.locale.Tr "repo.issues.review.reject" $createdStr | Safe}} 31 - {{else if eq .Review.Type 4}} 32 - {{$.locale.Tr "repo.issues.review.wait" $createdStr | Safe}} 33 - {{else}} 34 - {{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}} 35 - {{end}} 36 - </span> 37 - </div> 38 - <div class="review-item-right"> 39 - {{if .Review.Stale}} 40 - <span class="ui text grey" data-tooltip-content="{{$.locale.Tr "repo.issues.is_stale"}}"> 41 - {{svg "octicon-hourglass" 16 "icon"}} 42 - </span> 43 - {{end}} 44 - {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} 45 - <a href="#" class="ui muted icon gt-df gt-ac dismiss-review-btn" data-review-id="dismiss-review-{{.Review.ID}}" data-tooltip-content="{{$.locale.Tr "repo.issues.dismiss_review"}}"> 46 - {{svg "octicon-x" 20}} 47 - </a> 48 - <div class="ui small modal" id="dismiss-review-modal"> 49 - <div class="header"> 50 - {{$.locale.Tr "repo.issues.dismiss_review"}} 51 - </div> 52 - <div class="content"> 53 - <div class="ui warning message"> 54 - {{$.locale.Tr "repo.issues.dismiss_review_warning"}} 55 - </div> 56 - <form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post"> 57 - {{$.CsrfTokenHtml}} 58 - <input type="hidden" name="review_id" value="{{.Review.ID}}"> 59 - <div class="field"> 60 - <label for="message">{{$.locale.Tr "action.review_dismissed_reason"}}</label> 61 - <input id="message" name="message"> 62 - </div> 63 - <div class="text right actions"> 64 - <button class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</button> 65 - <button class="ui red button" type="submit">{{$.locale.Tr "ok"}}</button> 66 - </div> 67 - </form> 68 - </div> 69 - </div> 70 - {{end}} 71 - {{if .CanChange}} 72 - <a href="#" class="ui icon muted gt-df gt-ac re-request-review{{if .Checked}} checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a> 73 - {{end}} 74 - </div> 75 - </div> 76 - {{end}} 77 - {{range .OriginalReviews}} 78 - {{$createdStr:= TimeSinceUnix .UpdatedUnix $.locale}} 79 - <div class="ui divider"></div> 80 - <div class="review-item"> 81 - <div class="review-item-left"> 82 - <span class="gt-mr-3 text {{.Review.HTMLTypeColorName}}"> 83 - {{svg (printf "octicon-%s" .Type.Icon)}} 84 - </span> 85 - <a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}"> 86 - <span class="text black"> 87 - {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} 88 - {{.OriginalAuthor}} 89 - </span> 90 - </a> 91 - </div> 92 - </div> 93 - {{end}} 94 - </div> 95 - </div> 96 - </div> 97 - {{end}} 98 1 {{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}} 99 2 {{/* Then the merge box will not be displayed because this page already contains enough information */}} 100 3 {{else}}
+572 -546
templates/repo/issue/view_content/sidebar.tmpl
··· 1 - <div class="four wide column"> 2 - <div class="ui segment metas"> 3 - {{template "repo/issue/branch_selector_field" .}} 4 - 5 - {{if .Issue.IsPull}} 6 - 7 - <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> 8 - <div class="ui {{if or (not .Reviewers) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> 9 - <a class="text gt-df gt-ac muted"> 10 - <strong>{{.locale.Tr "repo.issues.review.reviewers"}}</strong> 11 - {{if and .CanChooseReviewer (not .Repository.IsArchived)}} 12 - {{svg "octicon-gear" 16 "gt-ml-2"}} 13 - {{end}} 14 - </a> 15 - <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> 16 - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_reviewer_title"}}</div> 17 - {{if .Reviewers}} 18 - <div class="ui icon search input"> 19 - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 20 - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_reviewers"}}"> 21 - </div> 22 - {{end}} 23 - {{if .Reviewers}} 24 - {{range .Reviewers}} 25 - {{if .User}} 26 - <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-tooltip-content="{{$.locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}> 27 - <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check"}}</span> 28 - <span class="text"> 29 - {{avatar $.Context .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}} 30 - </span> 31 - </a> 32 - {{end}} 1 + <div class="issue-content-right ui segment"> 2 + {{template "repo/issue/branch_selector_field" .}} 3 + {{if .Issue.IsPull}} 4 + <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> 5 + <div class="ui {{if or (not .Reviewers) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> 6 + <a class="text gt-df gt-ac muted"> 7 + <strong>{{.locale.Tr "repo.issues.review.reviewers"}}</strong> 8 + {{if and .CanChooseReviewer (not .Repository.IsArchived)}} 9 + {{svg "octicon-gear" 16 "gt-ml-2"}} 10 + {{end}} 11 + </a> 12 + <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> 13 + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_reviewer_title"}}</div> 14 + {{if .Reviewers}} 15 + <div class="ui icon search input"> 16 + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 17 + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_reviewers"}}"> 18 + </div> 19 + {{end}} 20 + {{if .Reviewers}} 21 + {{range .Reviewers}} 22 + {{if .User}} 23 + <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-tooltip-content="{{$.locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}> 24 + <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check"}}</span> 25 + <span class="text"> 26 + {{avatar $.Context .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}} 27 + </span> 28 + </a> 33 29 {{end}} 34 30 {{end}} 35 - {{if .TeamReviewers}} 36 - <div class="ui divider"></div> 37 - {{range .TeamReviewers}} 38 - {{if .Team}} 39 - <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-tooltip-content="{{$.locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}> 40 - <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check" 16}}</span> 41 - <span class="text"> 42 - {{svg "octicon-people" 16 "gt-ml-4 gt-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} 43 - </span> 44 - </a> 45 - {{end}} 31 + {{end}} 32 + {{if .TeamReviewers}} 33 + <div class="ui divider"></div> 34 + {{range .TeamReviewers}} 35 + {{if .Team}} 36 + <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-tooltip-content="{{$.locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}> 37 + <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check" 16}}</span> 38 + <span class="text"> 39 + {{svg "octicon-people" 16 "gt-ml-4 gt-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} 40 + </span> 41 + </a> 46 42 {{end}} 47 43 {{end}} 48 - </div> 44 + {{end}} 49 45 </div> 46 + </div> 50 47 51 - <div class="ui assignees list"> 52 - <span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_reviewers"}}</span> 53 - <div class="selected"> 54 - {{range .PullReviewers}} 55 - <div class="item gt-mb-2"> 48 + <div class="ui assignees list"> 49 + <span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_reviewers"}}</span> 50 + <div class="selected"> 51 + {{range .PullReviewers}} 52 + <div class="item gt-df gt-ac gt-py-3"> 53 + <div class="gt-df gt-ac gt-f1"> 56 54 {{if .User}} 57 - <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 28 "gt-mr-3"}}{{.User.GetDisplayName}}</a> 55 + <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a> 58 56 {{else if .Team}} 59 - <span class="text">{{svg "octicon-people" 16 "teamavatar"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> 57 + <span class="text">{{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> 60 58 {{end}} 61 - <span class="ui right gt-df gt-ac gt-gap-3"> 62 - {{if .CanChange}} 63 - <a href="#" class="ui muted icon re-request-review{{if .Checked}} checked{{end}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a> 64 - {{end}} 65 - {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}} 66 - </span> 67 59 </div> 68 - {{end}} 69 - {{range .OriginalReviews}} 70 - <div class="item gt-mb-3"> 71 - <a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}"> 72 - <span class="text black"> 73 - {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} 74 - {{.OriginalAuthor}} 60 + <div class="gt-df gt-ac gt-gap-3"> 61 + {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} 62 + <a href="#" class="ui muted icon gt-df gt-ac dismiss-review-btn" data-review-id="dismiss-review-{{.Review.ID}}" data-tooltip-content="{{$.locale.Tr "repo.issues.dismiss_review"}}"> 63 + {{svg "octicon-x" 20}} 64 + </a> 65 + <div class="ui small modal" id="dismiss-review-modal"> 66 + <div class="header"> 67 + {{$.locale.Tr "repo.issues.dismiss_review"}} 68 + </div> 69 + <div class="content"> 70 + <div class="ui warning message"> 71 + {{$.locale.Tr "repo.issues.dismiss_review_warning"}} 72 + </div> 73 + <form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post"> 74 + {{$.CsrfTokenHtml}} 75 + <input type="hidden" name="review_id" value="{{.Review.ID}}"> 76 + <div class="field"> 77 + <label for="message">{{$.locale.Tr "action.review_dismissed_reason"}}</label> 78 + <input id="message" name="message"> 79 + </div> 80 + <div class="text right actions"> 81 + <button class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</button> 82 + <button class="ui red button" type="submit">{{$.locale.Tr "ok"}}</button> 83 + </div> 84 + </form> 85 + </div> 86 + </div> 87 + {{end}} 88 + {{if .Review.Stale}} 89 + <span data-tooltip-content="{{$.locale.Tr "repo.issues.is_stale"}}"> 90 + {{svg "octicon-hourglass" 16}} 75 91 </span> 92 + {{end}} 93 + {{if .CanChange}} 94 + <a href="#" class="ui muted icon re-request-review{{if .Checked}} checked{{end}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a> 95 + {{end}} 96 + {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}} 97 + </div> 98 + </div> 99 + {{end}} 100 + {{range .OriginalReviews}} 101 + <div class="item gt-df gt-ac gt-py-3"> 102 + <div class="gt-df gt-ac gt-f1"> 103 + <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}"> 104 + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}} 105 + {{.OriginalAuthor}} 76 106 </a> 77 - <span class="ui right text {{if eq .Type 1}}green 78 - {{- else if eq .Type 2}}grey 79 - {{- else if eq .Type 3}}red 80 - {{- else if eq .Type 4}}yellow 81 - {{- else}}grey{{end}} right "> 82 - {{svg (printf "octicon-%s" .Type.Icon)}} 83 - </span> 107 + </div> 108 + <div class="gt-df gt-ac gt-gap-3"> 109 + {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}} 84 110 </div> 85 - {{end}} 86 - </div> 111 + </div> 112 + {{end}} 87 113 </div> 88 - {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}} 89 - <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(index .PullRequestWorkInProgressPrefixes 0| Escape)}}" data-update-url="{{.Issue.Link}}/title"> 90 - <a class="muted"> 91 - {{.locale.Tr "repo.pulls.still_in_progress"}} {{.locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}} 92 - </a> 93 - </div> 94 - {{end}} 95 - <div class="ui divider"></div> 114 + </div> 115 + {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}} 116 + <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(index .PullRequestWorkInProgressPrefixes 0| Escape)}}" data-update-url="{{.Issue.Link}}/title"> 117 + <a class="muted"> 118 + {{.locale.Tr "repo.pulls.still_in_progress"}} {{.locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}} 119 + </a> 120 + </div> 96 121 {{end}} 122 + <div class="ui divider"></div> 123 + {{end}} 97 124 98 - {{template "repo/issue/labels/labels_selector_field" .}} 99 - {{template "repo/issue/labels/labels_sidebar" dict "root" $}} 125 + {{template "repo/issue/labels/labels_selector_field" .}} 126 + {{template "repo/issue/labels/labels_sidebar" dict "root" $}} 127 + 128 + <div class="ui divider"></div> 100 129 130 + <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown"> 131 + <a class="text gt-df gt-ac muted"> 132 + <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> 133 + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 134 + {{svg "octicon-gear" 16 "gt-ml-2"}} 135 + {{end}} 136 + </a> 137 + <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone"> 138 + {{template "repo/issue/milestone/select_menu" .}} 139 + </div> 140 + </div> 141 + <div class="ui select-milestone list"> 142 + <span class="no-select item {{if .Issue.Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> 143 + <div class="selected"> 144 + {{if .Issue.Milestone}} 145 + <a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}"> 146 + {{svg "octicon-milestone" 18 "gt-mr-3"}} 147 + {{.Issue.Milestone.Name}} 148 + </a> 149 + {{end}} 150 + </div> 151 + </div> 152 + 153 + {{if .IsProjectsEnabled}} 101 154 <div class="ui divider"></div> 102 155 103 - <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown"> 156 + <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown"> 104 157 <a class="text gt-df gt-ac muted"> 105 - <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> 158 + <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> 106 159 {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 107 160 {{svg "octicon-gear" 16 "gt-ml-2"}} 108 161 {{end}} 109 162 </a> 110 - <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone"> 111 - {{template "repo/issue/milestone/select_menu" .}} 163 + <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects"> 164 + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> 165 + {{if or .OpenProjects .ClosedProjects}} 166 + <div class="ui icon search input"> 167 + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 168 + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> 169 + </div> 170 + {{end}} 171 + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> 172 + {{if .OpenProjects}} 173 + <div class="divider"></div> 174 + <div class="header"> 175 + {{.locale.Tr "repo.issues.new.open_projects"}} 176 + </div> 177 + {{range .OpenProjects}} 178 + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 179 + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 180 + </a> 181 + {{end}} 182 + {{end}} 183 + {{if .ClosedProjects}} 184 + <div class="divider"></div> 185 + <div class="header"> 186 + {{.locale.Tr "repo.issues.new.closed_projects"}} 187 + </div> 188 + {{range .ClosedProjects}} 189 + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 190 + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 191 + </a> 192 + {{end}} 193 + {{end}} 112 194 </div> 113 195 </div> 114 - <div class="ui select-milestone list"> 115 - <span class="no-select item {{if .Issue.Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> 196 + <div class="ui select-project list"> 197 + <span class="no-select item {{if .Issue.ProjectID}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> 116 198 <div class="selected"> 117 - {{if .Issue.Milestone}} 118 - <a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}"> 119 - {{svg "octicon-milestone" 18 "gt-mr-3"}} 120 - {{.Issue.Milestone.Name}} 199 + {{if .Issue.ProjectID}} 200 + <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link}}"> 201 + {{svg .Issue.Project.IconName 18 "gt-mr-3"}}{{.Issue.Project.Title}} 121 202 </a> 122 203 {{end}} 123 204 </div> 124 205 </div> 206 + {{end}} 125 207 126 - {{if .IsProjectsEnabled}} 127 - <div class="ui divider"></div> 208 + <div class="ui divider"></div> 209 + 210 + <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}"> 211 + <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown"> 212 + <a class="text gt-df gt-ac muted"> 213 + <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> 214 + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 215 + {{svg "octicon-gear" 16 "gt-ml-2"}} 216 + {{end}} 217 + </a> 218 + <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee"> 219 + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> 220 + <div class="ui icon search input"> 221 + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 222 + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> 223 + </div> 224 + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> 225 + {{range .Assignees}} 128 226 129 - <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown"> 130 - <a class="text gt-df gt-ac muted"> 131 - <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> 132 - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 133 - {{svg "octicon-gear" 16 "gt-ml-2"}} 134 - {{end}} 135 - </a> 136 - <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects"> 137 - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> 138 - {{if or .OpenProjects .ClosedProjects}} 139 - <div class="ui icon search input"> 140 - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 141 - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> 142 - </div> 143 - {{end}} 144 - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> 145 - {{if .OpenProjects}} 146 - <div class="divider"></div> 147 - <div class="header"> 148 - {{.locale.Tr "repo.issues.new.open_projects"}} 149 - </div> 150 - {{range .OpenProjects}} 151 - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 152 - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 153 - </a> 154 - {{end}} 155 - {{end}} 156 - {{if .ClosedProjects}} 157 - <div class="divider"></div> 158 - <div class="header"> 159 - {{.locale.Tr "repo.issues.new.closed_projects"}} 160 - </div> 161 - {{range .ClosedProjects}} 162 - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> 163 - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} 164 - </a> 227 + {{$AssigneeID := .ID}} 228 + <a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> 229 + {{$checked := false}} 230 + {{range $.Issue.Assignees}} 231 + {{if eq .ID $AssigneeID}} 232 + {{$checked = true}} 165 233 {{end}} 166 234 {{end}} 167 - </div> 168 - </div> 169 - <div class="ui select-project list"> 170 - <span class="no-select item {{if .Issue.ProjectID}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> 171 - <div class="selected"> 172 - {{if .Issue.ProjectID}} 173 - <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link}}"> 174 - {{svg .Issue.Project.IconName 18 "gt-mr-3"}}{{.Issue.Project.Title}} 175 - </a> 176 - {{end}} 235 + <span class="octicon-check {{if not $checked}}invisible{{end}}">{{svg "octicon-check"}}</span> 236 + <span class="text"> 237 + {{avatar $.Context . 20 "gt-mr-3"}}{{template "repo/search_name" .}} 238 + </span> 239 + </a> 240 + {{end}} 241 + </div> 242 + </div> 243 + <div class="ui assignees list"> 244 + <span class="no-select item {{if .Issue.Assignees}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_assignees"}}</span> 245 + <div class="selected"> 246 + {{range .Issue.Assignees}} 247 + <div class="item"> 248 + <a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}"> 249 + {{avatar $.Context . 28 "gt-mr-3"}} 250 + {{.GetDisplayName}} 251 + </a> 177 252 </div> 178 - </div> 179 - {{end}} 253 + {{end}} 254 + </div> 255 + </div> 180 256 181 - <div class="ui divider"></div> 257 + <div class="ui divider"></div> 182 258 183 - <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}"> 184 - <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown"> 185 - <a class="text gt-df gt-ac muted"> 186 - <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> 187 - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 188 - {{svg "octicon-gear" 16 "gt-ml-2"}} 189 - {{end}} 190 - </a> 191 - <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee"> 192 - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> 193 - <div class="ui icon search input"> 194 - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> 195 - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> 196 - </div> 197 - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> 198 - {{range .Assignees}} 199 - 200 - {{$AssigneeID := .ID}} 201 - <a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> 202 - {{$checked := false}} 203 - {{range $.Issue.Assignees}} 204 - {{if eq .ID $AssigneeID}} 205 - {{$checked = true}} 206 - {{end}} 207 - {{end}} 208 - <span class="octicon-check {{if not $checked}}invisible{{end}}">{{svg "octicon-check"}}</span> 209 - <span class="text"> 210 - {{avatar $.Context . 20 "gt-mr-3"}}{{template "repo/search_name" .}} 211 - </span> 212 - </a> 213 - {{end}} 214 - </div> 259 + {{if .Participants}} 260 + <span class="text"><strong>{{.locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> 261 + <div class="ui list gt-df gt-fw"> 262 + {{range .Participants}} 263 + <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}"> 264 + {{avatar $.Context . 28 "gt-my-1 gt-mr-2"}} 265 + </a> 266 + {{end}} 215 267 </div> 216 - <div class="ui assignees list"> 217 - <span class="no-select item {{if .Issue.Assignees}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_assignees"}}</span> 218 - <div class="selected"> 219 - {{range .Issue.Assignees}} 220 - <div class="item"> 221 - <a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}"> 222 - {{avatar $.Context . 28 "gt-mr-3"}} 223 - {{.GetDisplayName}} 224 - </a> 225 - </div> 226 - {{end}} 227 - </div> 228 - </div> 268 + {{end}} 229 269 270 + {{if and $.IssueWatch (not .Repository.IsArchived)}} 230 271 <div class="ui divider"></div> 231 272 232 - {{if .Participants}} 233 - <span class="text"><strong>{{.locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> 234 - <div class="ui list gt-df gt-fw"> 235 - {{range .Participants}} 236 - <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}"> 237 - {{avatar $.Context . 28 "gt-my-1 gt-mr-2"}} 238 - </a> 239 - {{end}} 273 + <div class="ui watching"> 274 + <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> 275 + <div class="gt-mt-3"> 276 + <form method="POST" action="{{.Issue.Link}}/watch"> 277 + <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> 278 + {{$.CsrfTokenHtml}} 279 + <button class="fluid ui button gt-df gt-jc"> 280 + {{if $.IssueWatch.IsWatching}} 281 + {{svg "octicon-mute" 16 "gt-mr-3"}} 282 + {{.locale.Tr "repo.issues.unsubscribe"}} 283 + {{else}} 284 + {{svg "octicon-unmute" 16 "gt-mr-3"}} 285 + {{.locale.Tr "repo.issues.subscribe"}} 286 + {{end}} 287 + </button> 288 + </form> 240 289 </div> 241 - {{end}} 242 - 243 - {{if and $.IssueWatch (not .Repository.IsArchived)}} 290 + </div> 291 + {{end}} 292 + {{if .Repository.IsTimetrackerEnabled $.Context}} 293 + {{if and .CanUseTimetracker (not .Repository.IsArchived)}} 244 294 <div class="ui divider"></div> 245 - 246 - <div class="ui watching"> 247 - <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> 295 + <div class="ui timetrack"> 296 + <span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span> 248 297 <div class="gt-mt-3"> 249 - <form method="POST" action="{{.Issue.Link}}/watch"> 250 - <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> 298 + <form method="POST" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> 251 299 {{$.CsrfTokenHtml}} 252 - <button class="fluid ui button gt-df gt-jc"> 253 - {{if $.IssueWatch.IsWatching}} 254 - {{svg "octicon-mute" 16 "gt-mr-3"}} 255 - {{.locale.Tr "repo.issues.unsubscribe"}} 256 - {{else}} 257 - {{svg "octicon-unmute" 16 "gt-mr-3"}} 258 - {{.locale.Tr "repo.issues.subscribe"}} 259 - {{end}} 260 - </button> 300 + </form> 301 + <form method="POST" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> 302 + {{$.CsrfTokenHtml}} 261 303 </form> 304 + {{if $.IsStopwatchRunning}} 305 + <button class="ui fluid button issue-stop-time">{{.locale.Tr "repo.issues.stop_tracking"}}</button> 306 + <button class="ui fluid negative button issue-cancel-time gt-mt-3">{{.locale.Tr "repo.issues.cancel_tracking"}}</button> 307 + {{else}} 308 + {{if .HasUserStopwatch}} 309 + <div class="ui warning message"> 310 + {{.locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape) | Safe}} 311 + </div> 312 + {{end}} 313 + <button class="ui fluid button issue-start-time" data-tooltip-content='{{.locale.Tr "repo.issues.start_tracking"}}'>{{.locale.Tr "repo.issues.start_tracking_short"}}</button> 314 + <div class="ui mini modal issue-start-time-modal"> 315 + <div class="header">{{.locale.Tr "repo.issues.add_time"}}</div> 316 + <div class="content"> 317 + <form method="POST" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> 318 + {{$.CsrfTokenHtml}} 319 + <input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours"> 320 + <input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact"> 321 + </form> 322 + </div> 323 + <div class="actions"> 324 + <button class="ui green approve button">{{.locale.Tr "repo.issues.add_time_short"}}</button> 325 + <button class="ui red cancel button">{{.locale.Tr "repo.issues.add_time_cancel"}}</button> 326 + </div> 327 + </div> 328 + <button class="ui fluid button green issue-add-time gt-mt-3" data-tooltip-content='{{.locale.Tr "repo.issues.add_time"}}'>{{.locale.Tr "repo.issues.add_time_short"}}</button> 329 + {{end}} 262 330 </div> 263 331 </div> 264 332 {{end}} 265 - {{if .Repository.IsTimetrackerEnabled $.Context}} 266 - {{if and .CanUseTimetracker (not .Repository.IsArchived)}} 267 - <div class="ui divider"></div> 268 - <div class="ui timetrack"> 269 - <span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span> 270 - <div class="gt-mt-3"> 271 - <form method="POST" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> 272 - {{$.CsrfTokenHtml}} 273 - </form> 274 - <form method="POST" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> 275 - {{$.CsrfTokenHtml}} 276 - </form> 277 - {{if $.IsStopwatchRunning}} 278 - <button class="ui fluid button issue-stop-time">{{.locale.Tr "repo.issues.stop_tracking"}}</button> 279 - <button class="ui fluid negative button issue-cancel-time gt-mt-3">{{.locale.Tr "repo.issues.cancel_tracking"}}</button> 280 - {{else}} 281 - {{if .HasUserStopwatch}} 282 - <div class="ui warning message"> 283 - {{.locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape) | Safe}} 284 - </div> 285 - {{end}} 286 - <button class="ui fluid button issue-start-time" data-tooltip-content='{{.locale.Tr "repo.issues.start_tracking"}}'>{{.locale.Tr "repo.issues.start_tracking_short"}}</button> 287 - <div class="ui mini modal issue-start-time-modal"> 288 - <div class="header">{{.locale.Tr "repo.issues.add_time"}}</div> 289 - <div class="content"> 290 - <form method="POST" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> 291 - {{$.CsrfTokenHtml}} 292 - <input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours"> 293 - <input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact"> 294 - </form> 295 - </div> 296 - <div class="actions"> 297 - <button class="ui green approve button">{{.locale.Tr "repo.issues.add_time_short"}}</button> 298 - <button class="ui red cancel button">{{.locale.Tr "repo.issues.add_time_cancel"}}</button> 333 + {{if gt (len .WorkingUsers) 0}} 334 + <div class="ui divider"></div> 335 + <div class="ui comments"> 336 + <span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> 337 + <div> 338 + {{range $user, $trackedtime := .WorkingUsers}} 339 + <div class="comment gt-mt-3"> 340 + <a class="avatar"> 341 + {{avatar $.Context $user}} 342 + </a> 343 + <div class="content"> 344 + {{template "shared/user/authorlink" $user}} 345 + <div class="text"> 346 + {{$trackedtime}} 299 347 </div> 300 348 </div> 301 - <button class="ui fluid button green issue-add-time gt-mt-3" data-tooltip-content='{{.locale.Tr "repo.issues.add_time"}}'>{{.locale.Tr "repo.issues.add_time_short"}}</button> 302 - {{end}} 303 - </div> 349 + </div> 350 + {{end}} 304 351 </div> 305 - {{end}} 306 - {{if gt (len .WorkingUsers) 0}} 307 - <div class="ui divider"></div> 308 - <div class="ui comments"> 309 - <span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> 352 + </div> 353 + {{end}} 354 + {{end}} 355 + 356 + <div class="ui divider"></div> 357 + <span class="text"><strong>{{.locale.Tr "repo.issues.due_date"}}</strong></span> 358 + <div class="ui form" id="deadline-loader"> 359 + <div class="ui negative message gt-hidden" id="deadline-err-invalid-date"> 360 + {{svg "octicon-x" 16 "close icon"}} 361 + {{.locale.Tr "repo.issues.due_date_invalid"}} 362 + </div> 363 + {{if ne .Issue.DeadlineUnix 0}} 364 + <p> 365 + <div class="gt-df gt-sb gt-ac"> 366 + <div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{.locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> 367 + {{svg "octicon-calendar" 16 "gt-mr-3"}} 368 + {{DateTime "long" .Issue.DeadlineUnix}} 369 + </div> 310 370 <div> 311 - {{range $user, $trackedtime := .WorkingUsers}} 312 - <div class="comment gt-mt-3"> 313 - <a class="avatar"> 314 - {{avatar $.Context $user}} 315 - </a> 316 - <div class="content"> 317 - {{template "shared/user/authorlink" $user}} 318 - <div class="text"> 319 - {{$trackedtime}} 320 - </div> 321 - </div> 322 - </div> 371 + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 372 + <a class="issue-due-edit muted" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil" 16 "gt-mr-2"}}</a> 373 + <a class="issue-due-remove muted" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a> 323 374 {{end}} 324 375 </div> 325 376 </div> 326 - {{end}} 377 + </p> 378 + {{else}} 379 + <p>{{.locale.Tr "repo.issues.due_date_not_set"}}</p> 327 380 {{end}} 328 381 329 - <div class="ui divider"></div> 330 - <span class="text"><strong>{{.locale.Tr "repo.issues.due_date"}}</strong></span> 331 - <div class="ui form" id="deadline-loader"> 332 - <div class="ui negative message gt-hidden" id="deadline-err-invalid-date"> 333 - {{svg "octicon-x" 16 "close icon"}} 334 - {{.locale.Tr "repo.issues.due_date_invalid"}} 382 + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 383 + <div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm"> 384 + <form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form"> 385 + {{$.CsrfTokenHtml}} 386 + <input required placeholder="{{.locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.Format "2006-01-02"}}"{{end}} type="date" name="deadlineDate" id="deadlineDate"> 387 + <button class="ui green icon button"> 388 + {{if ne .Issue.DeadlineUnix 0}} 389 + {{svg "octicon-pencil"}} 390 + {{else}} 391 + {{svg "octicon-plus"}} 392 + {{end}} 393 + </button> 394 + </form> 335 395 </div> 336 - {{if ne .Issue.DeadlineUnix 0}} 396 + {{end}} 397 + </div> 398 + 399 + {{if .Repository.IsDependenciesEnabled $.Context}} 400 + <div class="ui divider"></div> 401 + 402 + <div class="ui depending"> 403 + {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} 404 + <span class="text"><strong>{{.locale.Tr "repo.issues.dependency.title"}}</strong></span> 405 + <br> 337 406 <p> 338 - <div class="gt-df gt-sb gt-ac"> 339 - <div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{.locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> 340 - {{svg "octicon-calendar" 16 "gt-mr-3"}} 341 - {{DateTime "long" .Issue.DeadlineUnix}} 342 - </div> 343 - <div> 344 - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 345 - <a class="issue-due-edit muted" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil" 16 "gt-mr-2"}}</a> 346 - <a class="issue-due-remove muted" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a> 347 - {{end}} 348 - </div> 349 - </div> 407 + {{if .Issue.IsPull}} 408 + {{.locale.Tr "repo.issues.dependency.pr_no_dependencies"}} 409 + {{else}} 410 + {{.locale.Tr "repo.issues.dependency.issue_no_dependencies"}} 411 + {{end}} 350 412 </p> 351 - {{else}} 352 - <p>{{.locale.Tr "repo.issues.due_date_not_set"}}</p> 353 413 {{end}} 354 414 355 - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 356 - <div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm"> 357 - <form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form"> 358 - {{$.CsrfTokenHtml}} 359 - <input required placeholder="{{.locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.Format "2006-01-02"}}"{{end}} type="date" name="deadlineDate" id="deadlineDate"> 360 - <button class="ui green icon button"> 361 - {{if ne .Issue.DeadlineUnix 0}} 362 - {{svg "octicon-pencil"}} 363 - {{else}} 364 - {{svg "octicon-plus"}} 365 - {{end}} 366 - </button> 367 - </form> 415 + {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}} 416 + <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{.locale.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{.locale.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}"> 417 + <strong>{{.locale.Tr "repo.issues.dependency.blocks_short"}}</strong> 418 + </span> 419 + <div class="ui relaxed divided list"> 420 + {{range .BlockingDependencies}} 421 + <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> 422 + <div class="item-left gt-df gt-jc gt-fc gt-f1"> 423 + <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> 424 + #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} 425 + </a> 426 + <div class="text small"> 427 + {{.Repository.OwnerName}}/{{.Repository.Name}} 428 + </div> 429 + </div> 430 + <div class="item-right gt-df gt-ac"> 431 + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} 432 + <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> 433 + {{svg "octicon-trash" 16}} 434 + </a> 435 + {{end}} 436 + </div> 437 + </div> 438 + {{end}} 439 + {{if .BlockingDependenciesNotPermitted}} 440 + <div class="item gt-df gt-ac gt-sb"> 441 + <span>{{$.locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span> 442 + </div> 443 + {{end}} 368 444 </div> 369 445 {{end}} 370 - </div> 371 - 372 - {{if .Repository.IsDependenciesEnabled $.Context}} 373 - <div class="ui divider"></div> 374 - 375 - <div class="ui depending"> 376 - {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} 377 - <span class="text"><strong>{{.locale.Tr "repo.issues.dependency.title"}}</strong></span> 378 - <br> 379 - <p> 380 - {{if .Issue.IsPull}} 381 - {{.locale.Tr "repo.issues.dependency.pr_no_dependencies"}} 382 - {{else}} 383 - {{.locale.Tr "repo.issues.dependency.issue_no_dependencies"}} 384 - {{end}} 385 - </p> 386 - {{end}} 387 446 388 - {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}} 389 - <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{.locale.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{.locale.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}"> 390 - <strong>{{.locale.Tr "repo.issues.dependency.blocks_short"}}</strong> 391 - </span> 392 - <div class="ui relaxed divided list"> 393 - {{range .BlockingDependencies}} 394 - <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> 395 - <div class="item-left gt-df gt-jc gt-fc gt-f1"> 396 - <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> 397 - #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} 398 - </a> 399 - <div class="text small"> 400 - {{.Repository.OwnerName}}/{{.Repository.Name}} 401 - </div> 402 - </div> 403 - <div class="item-right gt-df gt-ac"> 404 - {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} 405 - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> 406 - {{svg "octicon-trash" 16}} 407 - </a> 408 - {{end}} 447 + {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}} 448 + <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{.locale.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{.locale.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}"> 449 + <strong>{{.locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong> 450 + </span> 451 + <div class="ui relaxed divided list"> 452 + {{range .BlockedByDependencies}} 453 + <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> 454 + <div class="item-left gt-df gt-jc gt-fc gt-f1"> 455 + <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> 456 + #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} 457 + </a> 458 + <div class="text small"> 459 + {{.Repository.OwnerName}}/{{.Repository.Name}} 409 460 </div> 410 461 </div> 411 - {{end}} 412 - {{if .BlockingDependenciesNotPermitted}} 413 - <div class="item gt-df gt-ac gt-sb"> 414 - <span>{{$.locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span> 462 + <div class="item-right gt-df gt-ac"> 463 + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} 464 + <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> 465 + {{svg "octicon-trash" 16}} 466 + </a> 467 + {{end}} 415 468 </div> 416 - {{end}} 417 - </div> 418 - {{end}} 419 - 420 - {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}} 421 - <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{.locale.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{.locale.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}"> 422 - <strong>{{.locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong> 423 - </span> 424 - <div class="ui relaxed divided list"> 425 - {{range .BlockedByDependencies}} 469 + </div> 470 + {{end}} 471 + {{if $.CanCreateIssueDependencies}} 472 + {{range .BlockedByDependenciesNotPermitted}} 426 473 <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> 427 474 <div class="item-left gt-df gt-jc gt-fc gt-f1"> 428 - <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> 429 - #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} 430 - </a> 475 + <div> 476 + <span data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> 477 + <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> 478 + #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} 479 + </span> 480 + </div> 431 481 <div class="text small"> 432 482 {{.Repository.OwnerName}}/{{.Repository.Name}} 433 483 </div> 434 484 </div> 435 485 <div class="item-right gt-df gt-ac"> 436 486 {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} 437 - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> 487 + <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> 438 488 {{svg "octicon-trash" 16}} 439 489 </a> 440 490 {{end}} 441 491 </div> 442 492 </div> 443 493 {{end}} 444 - {{if $.CanCreateIssueDependencies}} 445 - {{range .BlockedByDependenciesNotPermitted}} 446 - <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> 447 - <div class="item-left gt-df gt-jc gt-fc gt-f1"> 448 - <div> 449 - <span data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> 450 - <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> 451 - #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} 452 - </span> 453 - </div> 454 - <div class="text small"> 455 - {{.Repository.OwnerName}}/{{.Repository.Name}} 456 - </div> 457 - </div> 458 - <div class="item-right gt-df gt-ac"> 459 - {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} 460 - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> 461 - {{svg "octicon-trash" 16}} 462 - </a> 463 - {{end}} 464 - </div> 465 - </div> 466 - {{end}} 467 - {{else if .BlockedByDependenciesNotPermitted}} 468 - <div class="item gt-df gt-ac gt-sb"> 469 - <span>{{$.locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span> 470 - </div> 471 - {{end}} 472 - </div> 473 - {{end}} 494 + {{else if .BlockedByDependenciesNotPermitted}} 495 + <div class="item gt-df gt-ac gt-sb"> 496 + <span>{{$.locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span> 497 + </div> 498 + {{end}} 499 + </div> 500 + {{end}} 474 501 475 - {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} 476 - <div> 477 - <form method="POST" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> 478 - {{$.CsrfTokenHtml}} 479 - <div class="ui fluid action input"> 480 - <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}"> 481 - <input name="newDependency" type="hidden"> 482 - {{svg "octicon-triangle-down" 14 "dropdown icon"}} 483 - <input type="text" class="search"> 484 - <div class="default text">{{.locale.Tr "repo.issues.dependency.add"}}</div> 485 - </div> 486 - <button class="ui green icon button"> 487 - {{svg "octicon-plus"}} 488 - </button> 502 + {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} 503 + <div> 504 + <form method="POST" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> 505 + {{$.CsrfTokenHtml}} 506 + <div class="ui fluid action input"> 507 + <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}"> 508 + <input name="newDependency" type="hidden"> 509 + {{svg "octicon-triangle-down" 14 "dropdown icon"}} 510 + <input type="text" class="search"> 511 + <div class="default text">{{.locale.Tr "repo.issues.dependency.add"}}</div> 489 512 </div> 490 - </form> 491 - </div> 492 - {{end}} 493 - </div> 513 + <button class="ui green icon button"> 514 + {{svg "octicon-plus"}} 515 + </button> 516 + </div> 517 + </form> 518 + </div> 519 + {{end}} 520 + </div> 494 521 495 - {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} 496 - <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}"> 522 + {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} 523 + <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}"> 497 524 498 - <div class="ui g-modal-confirm modal remove-dependency"> 499 - <div class="header"> 500 - {{svg "octicon-trash"}} 501 - {{.locale.Tr "repo.issues.dependency.remove_header"}} 502 - </div> 503 - <div class="content"> 504 - <form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> 505 - {{$.CsrfTokenHtml}} 506 - <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> 507 - <input type="hidden" value="" name="dependencyType" id="dependencyType"> 508 - </form> 509 - <p>{{if .Issue.IsPull}} 510 - {{.locale.Tr "repo.issues.dependency.pr_remove_text"}} 511 - {{else}} 512 - {{.locale.Tr "repo.issues.dependency.issue_remove_text"}} 513 - {{end}}</p> 514 - </div> 515 - {{$ModalButtonCancelText := .locale.Tr "repo.issues.dependency.cancel"}} 516 - {{$ModalButtonOkText := .locale.Tr "repo.issues.dependency.remove"}} 517 - {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}} 525 + <div class="ui g-modal-confirm modal remove-dependency"> 526 + <div class="header"> 527 + {{svg "octicon-trash"}} 528 + {{.locale.Tr "repo.issues.dependency.remove_header"}} 518 529 </div> 519 - {{end}} 530 + <div class="content"> 531 + <form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> 532 + {{$.CsrfTokenHtml}} 533 + <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> 534 + <input type="hidden" value="" name="dependencyType" id="dependencyType"> 535 + </form> 536 + <p>{{if .Issue.IsPull}} 537 + {{.locale.Tr "repo.issues.dependency.pr_remove_text"}} 538 + {{else}} 539 + {{.locale.Tr "repo.issues.dependency.issue_remove_text"}} 540 + {{end}}</p> 541 + </div> 542 + {{$ModalButtonCancelText := .locale.Tr "repo.issues.dependency.cancel"}} 543 + {{$ModalButtonOkText := .locale.Tr "repo.issues.dependency.remove"}} 544 + {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}} 545 + </div> 520 546 {{end}} 547 + {{end}} 521 548 522 - <div class="ui divider"></div> 523 - <div class="ui equal width compact grid"> 524 - {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} 525 - <div class="row gt-ac" data-tooltip-content="{{$issueReferenceLink}}"> 526 - <span class="text column truncate">{{.locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> 527 - <button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> 528 - </div> 549 + <div class="ui divider"></div> 550 + <div class="ui equal width compact grid"> 551 + {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} 552 + <div class="row gt-ac" data-tooltip-content="{{$issueReferenceLink}}"> 553 + <span class="text column truncate">{{.locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> 554 + <button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> 529 555 </div> 556 + </div> 530 557 531 - {{if and .IsRepoAdmin (not .Repository.IsArchived)}} 532 - <div class="ui divider"></div> 558 + {{if and .IsRepoAdmin (not .Repository.IsArchived)}} 559 + <div class="ui divider"></div> 533 560 534 - {{if or .PinEnabled .Issue.IsPinned}} 535 - <form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> 536 - {{$.CsrfTokenHtml}} 537 - <button class="fluid ui button gt-df gt-jc {{if not $.NewPinAllowed}}disabled{{end}}"> 538 - {{if not .Issue.IsPinned}} 539 - {{svg "octicon-pin" 16 "gt-mr-3"}} 540 - {{.locale.Tr "pin"}} 541 - {{else}} 542 - {{svg "octicon-pin-slash" 16 "gt-mr-3"}} 543 - {{.locale.Tr "unpin"}} 544 - {{end}} 545 - </button> 546 - </form> 561 + {{if or .PinEnabled .Issue.IsPinned}} 562 + <form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> 563 + {{$.CsrfTokenHtml}} 564 + <button class="fluid ui button gt-df gt-jc {{if not $.NewPinAllowed}}disabled{{end}}"> 565 + {{if not .Issue.IsPinned}} 566 + {{svg "octicon-pin" 16 "gt-mr-3"}} 567 + {{.locale.Tr "pin"}} 568 + {{else}} 569 + {{svg "octicon-pin-slash" 16 "gt-mr-3"}} 570 + {{.locale.Tr "unpin"}} 571 + {{end}} 572 + </button> 573 + </form> 574 + {{end}} 575 + 576 + <button class="gt-mt-2 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock"> 577 + {{if .Issue.IsLocked}} 578 + {{svg "octicon-key"}} 579 + {{.locale.Tr "repo.issues.unlock"}} 580 + {{else}} 581 + {{svg "octicon-lock"}} 582 + {{.locale.Tr "repo.issues.lock"}} 547 583 {{end}} 548 - 549 - <button class="gt-mt-2 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock"> 584 + </button> 585 + <div class="ui tiny modal" id="lock"> 586 + <div class="header"> 550 587 {{if .Issue.IsLocked}} 551 - {{svg "octicon-key"}} 552 - {{.locale.Tr "repo.issues.unlock"}} 588 + {{.locale.Tr "repo.issues.unlock.title"}} 553 589 {{else}} 554 - {{svg "octicon-lock"}} 555 - {{.locale.Tr "repo.issues.lock"}} 590 + {{.locale.Tr "repo.issues.lock.title"}} 556 591 {{end}} 557 - </button> 558 - <div class="ui tiny modal" id="lock"> 559 - <div class="header"> 592 + </div> 593 + <div class="content"> 594 + <div class="ui warning message"> 560 595 {{if .Issue.IsLocked}} 561 - {{.locale.Tr "repo.issues.unlock.title"}} 596 + {{.locale.Tr "repo.issues.unlock.notice_1"}}<br> 597 + {{.locale.Tr "repo.issues.unlock.notice_2"}}<br> 562 598 {{else}} 563 - {{.locale.Tr "repo.issues.lock.title"}} 599 + {{.locale.Tr "repo.issues.lock.notice_1"}}<br> 600 + {{.locale.Tr "repo.issues.lock.notice_2"}}<br> 601 + {{.locale.Tr "repo.issues.lock.notice_3"}}<br> 564 602 {{end}} 565 603 </div> 566 - <div class="content"> 567 - <div class="ui warning message"> 568 - {{if .Issue.IsLocked}} 569 - {{.locale.Tr "repo.issues.unlock.notice_1"}}<br> 570 - {{.locale.Tr "repo.issues.unlock.notice_2"}}<br> 571 - {{else}} 572 - {{.locale.Tr "repo.issues.lock.notice_1"}}<br> 573 - {{.locale.Tr "repo.issues.lock.notice_2"}}<br> 574 - {{.locale.Tr "repo.issues.lock.notice_3"}}<br> 575 - {{end}} 576 - </div> 577 604 578 - <form class="ui form" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}" 579 - method="post"> 580 - {{.CsrfTokenHtml}} 605 + <form class="ui form" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}" 606 + method="post"> 607 + {{.CsrfTokenHtml}} 581 608 582 - {{if not .Issue.IsLocked}} 583 - <div class="field"> 584 - <strong> {{.locale.Tr "repo.issues.lock.reason"}} </strong> 585 - </div> 609 + {{if not .Issue.IsLocked}} 610 + <div class="field"> 611 + <strong> {{.locale.Tr "repo.issues.lock.reason"}} </strong> 612 + </div> 586 613 587 - <div class="field"> 588 - <div class="ui fluid dropdown selection" tabindex="0"> 614 + <div class="field"> 615 + <div class="ui fluid dropdown selection" tabindex="0"> 589 616 590 - <select name="reason"> 591 - <option value=""> </option> 592 - {{range .LockReasons}} 593 - <option value="{{.}}">{{.}}</option> 594 - {{end}} 595 - </select> 596 - {{svg "octicon-triangle-down" 14 "dropdown icon"}} 617 + <select name="reason"> 618 + <option value=""> </option> 619 + {{range .LockReasons}} 620 + <option value="{{.}}">{{.}}</option> 621 + {{end}} 622 + </select> 623 + {{svg "octicon-triangle-down" 14 "dropdown icon"}} 597 624 598 - <div class="default text"> </div> 625 + <div class="default text"> </div> 599 626 600 - <div class="menu"> 601 - {{range .LockReasons}} 602 - <div class="item" data-value="{{.}}">{{.}}</div> 603 - {{end}} 604 - </div> 627 + <div class="menu"> 628 + {{range .LockReasons}} 629 + <div class="item" data-value="{{.}}">{{.}}</div> 630 + {{end}} 605 631 </div> 606 632 </div> 607 - {{end}} 633 + </div> 634 + {{end}} 608 635 609 - <div class="text right actions"> 610 - <button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button> 611 - <button class="ui red button"> 612 - {{if .Issue.IsLocked}} 613 - {{.locale.Tr "repo.issues.unlock_confirm"}} 614 - {{else}} 615 - {{.locale.Tr "repo.issues.lock_confirm"}} 616 - {{end}} 617 - </button> 618 - </div> 619 - </form> 620 - </div> 636 + <div class="text right actions"> 637 + <button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button> 638 + <button class="ui red button"> 639 + {{if .Issue.IsLocked}} 640 + {{.locale.Tr "repo.issues.unlock_confirm"}} 641 + {{else}} 642 + {{.locale.Tr "repo.issues.lock_confirm"}} 643 + {{end}} 644 + </button> 645 + </div> 646 + </form> 647 + </div> 648 + </div> 649 + <button class="gt-mt-2 fluid ui show-modal button negative" data-modal="#delete"> 650 + {{svg "octicon-trash"}} 651 + {{.locale.Tr "repo.issues.delete"}} 652 + </button> 653 + <div class="ui g-modal-confirm modal" id="delete"> 654 + <div class="header"> 655 + {{if .Issue.IsPull}} 656 + {{.locale.Tr "repo.pulls.delete.title"}} 657 + {{else}} 658 + {{.locale.Tr "repo.issues.delete.title"}} 659 + {{end}} 621 660 </div> 622 - <button class="gt-mt-2 fluid ui show-modal button negative" data-modal="#delete"> 623 - {{svg "octicon-trash"}} 624 - {{.locale.Tr "repo.issues.delete"}} 625 - </button> 626 - <div class="ui g-modal-confirm modal" id="delete"> 627 - <div class="header"> 661 + <div class="content"> 662 + <p> 628 663 {{if .Issue.IsPull}} 629 - {{.locale.Tr "repo.pulls.delete.title"}} 664 + {{.locale.Tr "repo.pulls.delete.text"}} 630 665 {{else}} 631 - {{.locale.Tr "repo.issues.delete.title"}} 666 + {{.locale.Tr "repo.issues.delete.text"}} 632 667 {{end}} 633 - </div> 634 - <div class="content"> 635 - <p> 636 - {{if .Issue.IsPull}} 637 - {{.locale.Tr "repo.pulls.delete.text"}} 638 - {{else}} 639 - {{.locale.Tr "repo.issues.delete.text"}} 640 - {{end}} 641 - </p> 642 - </div> 643 - <form action="{{.Issue.Link}}/delete" method="post"> 644 - {{.CsrfTokenHtml}} 645 - {{template "base/modal_actions_confirm" .}} 646 - </form> 668 + </p> 647 669 </div> 648 - {{end}} 670 + <form action="{{.Issue.Link}}/delete" method="post"> 671 + {{.CsrfTokenHtml}} 672 + {{template "base/modal_actions_confirm" .}} 673 + </form> 674 + </div> 675 + {{end}} 649 676 650 - {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} 651 - {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}} 652 - <div class="ui divider"></div> 653 - <div class="inline field"> 654 - <div class="ui checkbox" id="allow-edits-from-maintainers" 655 - data-url="{{.Issue.Link}}" 656 - data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}" 657 - data-prompt-error="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}" 658 - > 659 - <label><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> 660 - <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}> 661 - </div> 677 + {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} 678 + {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}} 679 + <div class="ui divider"></div> 680 + <div class="inline field"> 681 + <div class="ui checkbox" id="allow-edits-from-maintainers" 682 + data-url="{{.Issue.Link}}" 683 + data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}" 684 + data-prompt-error="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}" 685 + > 686 + <label><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> 687 + <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}> 662 688 </div> 663 - {{end}} 689 + </div> 664 690 {{end}} 665 - </div> 691 + {{end}} 666 692 </div>
-4
web_src/css/explore.css
··· 28 28 word-break: break-all; 29 29 } 30 30 31 - .ui.repository.list .item .ui.header .metas { 32 - font-size: 14px; 33 - } 34 - 35 31 .ui.repository.list .item .time { 36 32 font-size: 12px; 37 33 }
-1
web_src/css/modules/comment.css
··· 3 3 4 4 .ui.comments { 5 5 margin: 1.5em 0; 6 - max-width: 650px; 7 6 } 8 7 9 8 .ui.comments:first-child {
+37 -51
web_src/css/repo.css
··· 67 67 border: 1px var(--color-yellow) solid; 68 68 } 69 69 70 - .repository .metas .menu { 71 - overflow-x: auto; 72 - max-height: 500px; 70 + .issue-content { 71 + display: flex; 72 + align-items: flex-start; 73 + gap: 16px; 73 74 } 74 75 75 - .repository .metas .ui.list.assignees .item { 76 - line-height: 2.5em; 76 + @media (max-width: 767.98px) { 77 + .issue-content { 78 + flex-direction: column; 79 + } 77 80 } 78 81 79 - .repository .metas .ui.list.assignees .teamavatar { 80 - margin-top: 0.125rem; 81 - margin-left: 6.75px; 82 - margin-right: 8.75px; 82 + .issue-content-left { 83 + margin: 0 !important; 84 + width: calc(100% - 316px); 83 85 } 84 86 85 - .repository .metas .ui.list .dependency { 87 + .issue-content-right { 88 + margin: 0 !important; 89 + width: 300px; 90 + } 91 + 92 + @media (max-width: 767.98px) { 93 + .issue-content-left, 94 + .issue-content-right { 95 + width: 100%; 96 + } 97 + } 98 + 99 + .repository .issue-content-right .menu { 100 + overflow-x: auto; 101 + max-height: 500px; 102 + } 103 + 104 + .repository .issue-content-right .ui.list .dependency { 86 105 padding: 0; 87 106 white-space: nowrap; 88 107 } 89 108 90 - .repository .metas .ui.list .title { 109 + .repository .issue-content-right .ui.list .title { 91 110 max-width: 200px; 92 111 overflow: hidden; 93 112 text-overflow: ellipsis; 94 113 } 95 114 96 115 @media (max-width: 1200px) { 97 - .repository .metas .ui.list .title { 116 + .repository .issue-content-right .ui.list .title { 98 117 max-width: 150px; 99 118 } 100 119 } 101 120 102 121 @media (max-width: 1000px) { 103 - .repository .metas .ui.list .title { 122 + .repository .issue-content-right .ui.list .title { 104 123 max-width: 100px; 105 124 } 106 125 } 107 126 108 - .repository .metas #deadlineForm input { 127 + .repository .issue-content-right #deadlineForm input { 109 128 width: 12.8rem; 110 129 border-radius: 4px 0 0 4px; 111 130 border-right: 0; ··· 578 597 font-size: 14px; 579 598 } 580 599 581 - .repository.new.issue .comment.form .metas { 582 - min-width: 220px; 583 - } 584 - 585 - .repository.new.issue .comment.form .metas .filter.menu { 600 + .repository.new.issue .comment.form .issue-content-right .filter.menu { 586 601 max-height: 500px; 587 602 overflow-x: auto; 588 603 } ··· 699 714 margin-top: 1.1rem; 700 715 } 701 716 702 - .repository.view.issue .review-item { 703 - display: flex; 704 - justify-content: space-between; 705 - align-items: center; 706 - } 707 - 708 - .review-item-left, 709 - .review-item-right { 710 - display: flex; 711 - align-items: center; 712 - } 713 - 714 - .review-item-right { 715 - gap: 8px; 716 - margin-left: 4px; 717 - } 718 - 719 - .repository.view.issue .review-item .divider { 720 - margin: 0.5rem 0; 721 - } 722 - 723 - .repository.view.issue .review-item .review-content { 724 - padding: 1em 0 1em 3.8em; 725 - } 726 - 727 717 .repository.view.issue .comment-list:not(.prevent-before-timeline)::before { 728 718 display: block; 729 719 content: ""; ··· 761 751 762 752 .repository.view.issue .comment-list .timeline-item, 763 753 .repository.view.issue .comment-list .timeline-item-group { 764 - padding: 12px 0; 754 + padding: 16px 0; 765 755 } 766 756 767 757 .repository.view.issue .comment-list .timeline-item-group .timeline-item { ··· 1132 1122 text-decoration: line-through; 1133 1123 } 1134 1124 1135 - .repository .comment.form .ui.comments { 1136 - margin-top: -12px; 1137 - max-width: 100%; 1138 - } 1139 - 1140 1125 .repository .comment.form .content .field:first-child { 1141 1126 clear: none; 1142 1127 } ··· 1252 1237 } 1253 1238 1254 1239 .repository.compare.pull .pullrequest-form { 1255 - margin-bottom: 1.5rem; 1240 + margin-top: 16px; 1241 + margin-bottom: 16px; 1256 1242 } 1257 1243 1258 1244 .repository.compare.pull .markup {