diff options
author | silverwind <me@silverwind.io> | 2023-05-29 12:44:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-29 12:44:03 +0200 |
commit | a70d853d064a97f0be1d3702a9c3912494b546ec (patch) | |
tree | 9fb03fe4804b724e69b7baac25f6264e6c46a1aa | |
parent | 275d4b7e3f4595206e5c4b1657d4f6d6969d9ce2 (diff) | |
download | gitea-a70d853d064a97f0be1d3702a9c3912494b546ec.tar.gz gitea-a70d853d064a97f0be1d3702a9c3912494b546ec.zip |
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>
-rw-r--r-- | templates/explore/repo_list.tmpl | 2 | ||||
-rw-r--r-- | templates/package/view.tmpl | 205 | ||||
-rw-r--r-- | templates/repo/issue/new_form.tmpl | 248 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 97 | ||||
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 1118 | ||||
-rw-r--r-- | web_src/css/explore.css | 4 | ||||
-rw-r--r-- | web_src/css/modules/comment.css | 1 | ||||
-rw-r--r-- | web_src/css/repo.css | 88 |
9 files changed, 835 insertions, 932 deletions
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index a0f74e89da..49adfe5b45 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -38,7 +38,7 @@ {{end}} </div> </div> - <div class="metas gt-df gt-ac text grey"> + <div class="gt-font-13 gt-df gt-ac text grey"> {{if .PrimaryLanguage}} <a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> <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> diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl index aadaaa412a..755c93fde3 100644 --- a/templates/package/view.tmpl +++ b/templates/package/view.tmpl @@ -2,117 +2,112 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository view issue packages"> {{template "user/overview/header" .}} <div class="ui container"> - <div> - <div class="ui stackable grid"> - <div class="sixteen wide column title"> - <div class="issue-title"> - <h1>{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</h1> - </div> - <div> - {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}} - {{if .HasRepositoryAccess}} - {{.locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.Link (.PackageDescriptor.Repository.FullName | Escape) | Safe}} - {{else}} - {{.locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}} - {{end}} + <div class="issue-title-header"> + <div class="issue-title"> + <h1>{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</h1> + </div> + <div> + {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}} + {{if .HasRepositoryAccess}} + {{.locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.Link (.PackageDescriptor.Repository.FullName | Escape) | Safe}} + {{else}} + {{.locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}} + {{end}} + </div> + </div> + <div class="issue-content"> + <div class="issue-content-left"> + {{template "package/content/alpine" .}} + {{template "package/content/cargo" .}} + {{template "package/content/chef" .}} + {{template "package/content/composer" .}} + {{template "package/content/conan" .}} + {{template "package/content/conda" .}} + {{template "package/content/container" .}} + {{template "package/content/cran" .}} + {{template "package/content/debian" .}} + {{template "package/content/generic" .}} + {{template "package/content/go" .}} + {{template "package/content/helm" .}} + {{template "package/content/maven" .}} + {{template "package/content/npm" .}} + {{template "package/content/nuget" .}} + {{template "package/content/pub" .}} + {{template "package/content/pypi" .}} + {{template "package/content/rpm" .}} + {{template "package/content/rubygems" .}} + {{template "package/content/swift" .}} + {{template "package/content/vagrant" .}} + </div> + <div class="issue-content-right ui segment"> + <strong>{{.locale.Tr "packages.details"}}</strong> + <div class="ui relaxed list"> + <div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div> + {{if .HasRepositoryAccess}} + <div class="item">{{svg "octicon-repo" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div> + {{end}} + <div class="item">{{svg "octicon-calendar" 16 "gt-mr-3"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}</div> + <div class="item">{{svg "octicon-download" 16 "gt-mr-3"}} {{.PackageDescriptor.Version.DownloadCount}}</div> + {{template "package/metadata/alpine" .}} + {{template "package/metadata/cargo" .}} + {{template "package/metadata/chef" .}} + {{template "package/metadata/composer" .}} + {{template "package/metadata/conan" .}} + {{template "package/metadata/conda" .}} + {{template "package/metadata/container" .}} + {{template "package/metadata/cran" .}} + {{template "package/metadata/debian" .}} + {{template "package/metadata/generic" .}} + {{template "package/metadata/helm" .}} + {{template "package/metadata/maven" .}} + {{template "package/metadata/npm" .}} + {{template "package/metadata/nuget" .}} + {{template "package/metadata/pub" .}} + {{template "package/metadata/pypi" .}} + {{template "package/metadata/rpm" .}} + {{template "package/metadata/rubygems" .}} + {{template "package/metadata/swift" .}} + {{template "package/metadata/vagrant" .}} + {{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}} + <div class="item">{{svg "octicon-database" 16 "gt-mr-3"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div> + {{end}} + </div> + {{if not (eq .PackageDescriptor.Package.Type "container")}} + <div class="ui divider"></div> + <strong>{{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong> + <div class="ui relaxed list"> + {{range .PackageDescriptor.Files}} + <div class="item"> + <a href="{{$.Link}}/files/{{.File.ID}}">{{.File.Name}}</a> + <span class="text small file-size">{{FileSize .Blob.Size}}</span> + </div> + {{end}} </div> + {{end}} + {{if .LatestVersions}} <div class="ui divider"></div> - </div> - <div class="twelve wide column"> - {{template "package/content/alpine" .}} - {{template "package/content/cargo" .}} - {{template "package/content/chef" .}} - {{template "package/content/composer" .}} - {{template "package/content/conan" .}} - {{template "package/content/conda" .}} - {{template "package/content/container" .}} - {{template "package/content/cran" .}} - {{template "package/content/debian" .}} - {{template "package/content/generic" .}} - {{template "package/content/go" .}} - {{template "package/content/helm" .}} - {{template "package/content/maven" .}} - {{template "package/content/npm" .}} - {{template "package/content/nuget" .}} - {{template "package/content/pub" .}} - {{template "package/content/pypi" .}} - {{template "package/content/rpm" .}} - {{template "package/content/rubygems" .}} - {{template "package/content/swift" .}} - {{template "package/content/vagrant" .}} - </div> - <div class="four wide column"> - <div class="ui segment metas"> - <strong>{{.locale.Tr "packages.details"}}</strong> - <div class="ui relaxed list"> - <div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div> - {{if .HasRepositoryAccess}} - <div class="item">{{svg "octicon-repo" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div> - {{end}} - <div class="item">{{svg "octicon-calendar" 16 "gt-mr-3"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}</div> - <div class="item">{{svg "octicon-download" 16 "gt-mr-3"}} {{.PackageDescriptor.Version.DownloadCount}}</div> - {{template "package/metadata/alpine" .}} - {{template "package/metadata/cargo" .}} - {{template "package/metadata/chef" .}} - {{template "package/metadata/composer" .}} - {{template "package/metadata/conan" .}} - {{template "package/metadata/conda" .}} - {{template "package/metadata/container" .}} - {{template "package/metadata/cran" .}} - {{template "package/metadata/debian" .}} - {{template "package/metadata/generic" .}} - {{template "package/metadata/helm" .}} - {{template "package/metadata/maven" .}} - {{template "package/metadata/npm" .}} - {{template "package/metadata/nuget" .}} - {{template "package/metadata/pub" .}} - {{template "package/metadata/pypi" .}} - {{template "package/metadata/rpm" .}} - {{template "package/metadata/rubygems" .}} - {{template "package/metadata/swift" .}} - {{template "package/metadata/vagrant" .}} - {{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}} - <div class="item">{{svg "octicon-database" 16 "gt-mr-3"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div> - {{end}} + <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong> + <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a> + <div class="ui relaxed list"> + {{range .LatestVersions}} + <div class="item gt-df"> + <a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> + <span class="text small">{{DateTime "short" .CreatedUnix}}</span> </div> - {{if not (eq .PackageDescriptor.Package.Type "container")}} - <div class="ui divider"></div> - <strong>{{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong> - <div class="ui relaxed list"> - {{range .PackageDescriptor.Files}} - <div class="item"> - <a href="{{$.Link}}/files/{{.File.ID}}">{{.File.Name}}</a> - <span class="text small file-size">{{FileSize .Blob.Size}}</span> - </div> - {{end}} - </div> - {{end}} - {{if .LatestVersions}} - <div class="ui divider"></div> - <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong> - <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a> - <div class="ui relaxed list"> - {{range .LatestVersions}} - <div class="item gt-df"> - <a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> - <span class="text small">{{DateTime "short" .CreatedUnix}}</span> - </div> - {{end}} - </div> + {{end}} + </div> + {{end}} + {{if or .CanWritePackages .HasRepositoryAccess}} + <div class="ui divider"></div> + <div class="ui relaxed list"> + {{if .HasRepositoryAccess}} + <div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{.locale.Tr "repo.issues"}}</a></div> {{end}} - {{if or .CanWritePackages .HasRepositoryAccess}} - <div class="ui divider"></div> - <div class="ui relaxed list"> - {{if .HasRepositoryAccess}} - <div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{.locale.Tr "repo.issues"}}</a></div> - {{end}} - {{if .CanWritePackages}} - <div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{.locale.Tr "repo.settings"}}</a></div> - {{end}} - </div> + {{if .CanWritePackages}} + <div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{.locale.Tr "repo.settings"}}</a></div> {{end}} </div> - </div> + {{end}} </div> </div> </div> diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index c12b8149b0..bdaafbb36b 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -1,15 +1,15 @@ -<form class="ui comment form stackable grid" id="new-issue" action="{{.Link}}" method="post"> +<form class="issue-content ui comment form" id="new-issue" action="{{.Link}}" method="post"> {{.CsrfTokenHtml}} {{if .Flash}} <div class="sixteen wide column"> {{template "base/alert" .}} </div> {{end}} - <div class="twelve wide column"> + <div class="issue-content-left"> <div class="ui comments"> <div class="comment"> - {{template "shared/user/avatarlink" dict "Context" $.Context "user" .SignedUser}} - <div class="ui segment content"> + {{avatar $.Context .SignedUser 40}} + <div class="ui segment content gt-my-0"> <div class="field"> <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"> {{if .PageIsComparePull}} @@ -48,147 +48,145 @@ </div> </div> - <div class="four wide column"> - <div class="ui segment metas"> - {{template "repo/issue/branch_selector_field" .}} + <div class="issue-content-right ui segment"> + {{template "repo/issue/branch_selector_field" .}} - <input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}"> - {{template "repo/issue/labels/labels_selector_field" .}} - {{template "repo/issue/labels/labels_sidebar" dict "root" $}} + <input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}"> + {{template "repo/issue/labels/labels_selector_field" .}} + {{template "repo/issue/labels/labels_sidebar" dict "root" $}} - <div class="ui divider"></div> + <div class="ui divider"></div> - <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}"> - <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown"> - <span class="text"> - <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> - {{if .HasIssuesOrPullsWritePermission}} - {{svg "octicon-gear"}} - {{end}} - </span> - <div class="menu"> - {{template "repo/issue/milestone/select_menu" .}} - </div> + <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}"> + <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown"> + <span class="text"> + <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> + {{if .HasIssuesOrPullsWritePermission}} + {{svg "octicon-gear"}} + {{end}} + </span> + <div class="menu"> + {{template "repo/issue/milestone/select_menu" .}} </div> - <div class="ui select-milestone list"> - <span class="no-select item {{if .Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> - <div class="selected"> - {{if .Milestone}} - <a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> - {{svg "octicon-milestone" 18 "gt-mr-3"}} - {{.Milestone.Name}} - </a> - {{end}} - </div> + </div> + <div class="ui select-milestone list"> + <span class="no-select item {{if .Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> + <div class="selected"> + {{if .Milestone}} + <a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> + {{svg "octicon-milestone" 18 "gt-mr-3"}} + {{.Milestone.Name}} + </a> + {{end}} </div> + </div> - {{if .IsProjectsEnabled}} - <div class="ui divider"></div> + {{if .IsProjectsEnabled}} + <div class="ui divider"></div> - <input id="project_id" name="project_id" type="hidden" value="{{.project_id}}"> - <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown"> + <input id="project_id" name="project_id" type="hidden" value="{{.project_id}}"> + <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown"> + <span class="text"> + <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> + {{if .HasIssuesOrPullsWritePermission}} + {{svg "octicon-gear"}} + {{end}} + </span> + <div class="menu"> + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> + {{if or .OpenProjects .ClosedProjects}} + <div class="ui icon search input"> + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> + </div> + {{end}} + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> + {{if and (not .OpenProjects) (not .ClosedProjects)}} + <div class="header" style="text-transform: none;font-size:14px;"> + {{.locale.Tr "repo.issues.new.no_items"}} + </div> + {{else}} + {{if .OpenProjects}} + <div class="divider"></div> + <div class="header"> + {{.locale.Tr "repo.issues.new.open_projects"}} + </div> + {{range .OpenProjects}} + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} + </a> + {{end}} + {{end}} + {{if .ClosedProjects}} + <div class="divider"></div> + <div class="header"> + {{.locale.Tr "repo.issues.new.closed_projects"}} + </div> + {{range .ClosedProjects}} + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} + </a> + {{end}} + {{end}} + {{end}} + </div> + </div> + <div class="ui select-project list"> + <span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> + <div class="selected"> + {{if .Project}} + <a class="item muted sidebar-item-link" href="{{.Project.Link}}"> + {{svg .Project.IconName 18 "gt-mr-3"}}{{.Project.Title}} + </a> + {{end}} + </div> + </div> + {{end}} + <div class="ui divider"></div> + <input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}"> + <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown"> <span class="text"> - <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> + <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> {{if .HasIssuesOrPullsWritePermission}} {{svg "octicon-gear"}} {{end}} </span> - <div class="menu"> - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> - {{if or .OpenProjects .ClosedProjects}} + <div class="filter menu" data-id="#assignee_ids"> + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> <div class="ui icon search input"> <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> </div> - {{end}} - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> - {{if and (not .OpenProjects) (not .ClosedProjects)}} - <div class="header" style="text-transform: none;font-size:14px;"> - {{.locale.Tr "repo.issues.new.no_items"}} - </div> - {{else}} - {{if .OpenProjects}} - <div class="divider"></div> - <div class="header"> - {{.locale.Tr "repo.issues.new.open_projects"}} - </div> - {{range .OpenProjects}} - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} - </a> - {{end}} - {{end}} - {{if .ClosedProjects}} - <div class="divider"></div> - <div class="header"> - {{.locale.Tr "repo.issues.new.closed_projects"}} - </div> - {{range .ClosedProjects}} - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} - </a> - {{end}} - {{end}} - {{end}} - </div> - </div> - <div class="ui select-project list"> - <span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> - <div class="selected"> - {{if .Project}} - <a class="item muted sidebar-item-link" href="{{.Project.Link}}"> - {{svg .Project.IconName 18 "gt-mr-3"}}{{.Project.Title}} + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> + {{range .Assignees}} + <a class="item muted" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> + <span class="octicon-check invisible">{{svg "octicon-check"}}</span> + <span class="text"> + {{avatar $.Context . 28 "gt-mr-3"}}{{template "repo/search_name" .}} + </span> </a> {{end}} </div> </div> - {{end}} + <div class="ui assignees list"> + <span class="no-select item {{if .HasSelectedLabel}}gt-hidden{{end}}"> + {{.locale.Tr "repo.issues.new.no_assignees"}} + </span> + {{range .Assignees}} + <a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}"> + {{avatar $.Context . 28 "gt-mr-3 gt-vm"}}{{.GetDisplayName}} + </a> + {{end}} + </div> + {{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}} <div class="ui divider"></div> - <input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}"> - <div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown"> - <span class="text"> - <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> - {{if .HasIssuesOrPullsWritePermission}} - {{svg "octicon-gear"}} - {{end}} - </span> - <div class="filter menu" data-id="#assignee_ids"> - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> - <div class="ui icon search input"> - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> - </div> - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> - {{range .Assignees}} - <a class="item muted" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> - <span class="octicon-check invisible">{{svg "octicon-check"}}</span> - <span class="text"> - {{avatar $.Context . 28 "gt-mr-3"}}{{template "repo/search_name" .}} - </span> - </a> - {{end}} - </div> + <div class="inline field"> + <div class="ui checkbox"> + <label data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> + <input name="allow_maintainer_edit" type="checkbox" {{if .AllowMaintainerEdit}}checked{{end}}> </div> - <div class="ui assignees list"> - <span class="no-select item {{if .HasSelectedLabel}}gt-hidden{{end}}"> - {{.locale.Tr "repo.issues.new.no_assignees"}} - </span> - {{range .Assignees}} - <a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}"> - {{avatar $.Context . 28 "gt-mr-3 gt-vm"}}{{.GetDisplayName}} - </a> - {{end}} - </div> - {{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}} - <div class="ui divider"></div> - <div class="inline field"> - <div class="ui checkbox"> - <label data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> - <input name="allow_maintainer_edit" type="checkbox" {{if .AllowMaintainerEdit}}checked{{end}}> - </div> - </div> - {{end}} - </div> - <input type="hidden" name="redirect_after_creation" value="{{.redirect_after_creation}}"> + </div> + {{end}} </div> + <input type="hidden" name="redirect_after_creation" value="{{.redirect_after_creation}}"> </form> diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 77087e0a8f..3669e00d5e 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -1,4 +1,4 @@ -<div class="ui stackable grid"> +<div class="issue-content"> <!-- I know, there is probably a better way to do this (moved from sidebar.tmpl, original author: 6543 @ 2021-02-28) --> <!-- Agree, there should be a better way, eg: introduce window.config.pageData (original author: wxiaoguang @ 2021-09-05) --> <input type="hidden" id="repolink" value="{{$.RepoRelPath}}"> @@ -7,7 +7,7 @@ <input type="hidden" id="type" value="{{.IssueType}}"> {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}} - <div class="twelve wide column comment-list prevent-before-timeline"> + <div class="issue-content-left comment-list prevent-before-timeline"> <div class="ui timeline"> <div id="{{.Issue.HashTag}}" class="timeline-item comment first"> {{if .Issue.OriginalAuthor}} diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 5325c710b4..e2ec691ee3 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -1,100 +1,3 @@ -{{if or .PullReviewers .OriginalReviews}} - <div class="comment box timeline-item gt-pt-3 gt-pb-0"> - <div class="content"> - <div class="ui segment"> - <h4>{{$.locale.Tr "repo.issues.review.reviewers"}}</h4> - {{range .PullReviewers}} - {{$createdStr:= TimeSinceUnix .Review.UpdatedUnix $.locale}} - <div class="ui divider"></div> - <div class="review-item"> - <div class="review-item-left"> - <span class="gt-mr-3 text {{.Review.HTMLTypeColorName}}"> - {{svg (printf "octicon-%s" .Review.Type.Icon)}} - </span> - {{if .User}} - <a href="{{.User.HomeLink}}"> - {{avatar $.Context .User 20}} - </a> - {{end}} - <span class="gt-ml-2"> - {{if .User}} - <a href="{{.User.HomeLink}}">{{.User.GetDisplayName}}</a> - {{else if .Team}} - <span class="ui text">{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> - {{end}} - {{if eq .Review.Type 1}} - {{$.locale.Tr "repo.issues.review.approve" $createdStr | Safe}} - {{else if eq .Review.Type 2}} - {{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}} - {{else if eq .Review.Type 3}} - {{$.locale.Tr "repo.issues.review.reject" $createdStr | Safe}} - {{else if eq .Review.Type 4}} - {{$.locale.Tr "repo.issues.review.wait" $createdStr | Safe}} - {{else}} - {{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}} - {{end}} - </span> - </div> - <div class="review-item-right"> - {{if .Review.Stale}} - <span class="ui text grey" data-tooltip-content="{{$.locale.Tr "repo.issues.is_stale"}}"> - {{svg "octicon-hourglass" 16 "icon"}} - </span> - {{end}} - {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} - <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"}}"> - {{svg "octicon-x" 20}} - </a> - <div class="ui small modal" id="dismiss-review-modal"> - <div class="header"> - {{$.locale.Tr "repo.issues.dismiss_review"}} - </div> - <div class="content"> - <div class="ui warning message"> - {{$.locale.Tr "repo.issues.dismiss_review_warning"}} - </div> - <form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post"> - {{$.CsrfTokenHtml}} - <input type="hidden" name="review_id" value="{{.Review.ID}}"> - <div class="field"> - <label for="message">{{$.locale.Tr "action.review_dismissed_reason"}}</label> - <input id="message" name="message"> - </div> - <div class="text right actions"> - <button class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</button> - <button class="ui red button" type="submit">{{$.locale.Tr "ok"}}</button> - </div> - </form> - </div> - </div> - {{end}} - {{if .CanChange}} - <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> - {{end}} - </div> - </div> - {{end}} - {{range .OriginalReviews}} - {{$createdStr:= TimeSinceUnix .UpdatedUnix $.locale}} - <div class="ui divider"></div> - <div class="review-item"> - <div class="review-item-left"> - <span class="gt-mr-3 text {{.Review.HTMLTypeColorName}}"> - {{svg (printf "octicon-%s" .Type.Icon)}} - </span> - <a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}"> - <span class="text black"> - {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} - {{.OriginalAuthor}} - </span> - </a> - </div> - </div> - {{end}} - </div> - </div> - </div> -{{end}} {{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}} {{/* Then the merge box will not be displayed because this page already contains enough information */}} {{else}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 60d2f4a561..343f041bfc 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -1,666 +1,692 @@ -<div class="four wide column"> - <div class="ui segment metas"> - {{template "repo/issue/branch_selector_field" .}} - - {{if .Issue.IsPull}} - - <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> - <div class="ui {{if or (not .Reviewers) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> - <a class="text gt-df gt-ac muted"> - <strong>{{.locale.Tr "repo.issues.review.reviewers"}}</strong> - {{if and .CanChooseReviewer (not .Repository.IsArchived)}} - {{svg "octicon-gear" 16 "gt-ml-2"}} - {{end}} - </a> - <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_reviewer_title"}}</div> - {{if .Reviewers}} - <div class="ui icon search input"> - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_reviewers"}}"> - </div> - {{end}} - {{if .Reviewers}} - {{range .Reviewers}} - {{if .User}} - <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}}> - <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check"}}</span> - <span class="text"> - {{avatar $.Context .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}} - </span> - </a> - {{end}} +<div class="issue-content-right ui segment"> + {{template "repo/issue/branch_selector_field" .}} + {{if .Issue.IsPull}} + <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> + <div class="ui {{if or (not .Reviewers) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> + <a class="text gt-df gt-ac muted"> + <strong>{{.locale.Tr "repo.issues.review.reviewers"}}</strong> + {{if and .CanChooseReviewer (not .Repository.IsArchived)}} + {{svg "octicon-gear" 16 "gt-ml-2"}} + {{end}} + </a> + <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_reviewer_title"}}</div> + {{if .Reviewers}} + <div class="ui icon search input"> + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_reviewers"}}"> + </div> + {{end}} + {{if .Reviewers}} + {{range .Reviewers}} + {{if .User}} + <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}}> + <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check"}}</span> + <span class="text"> + {{avatar $.Context .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}} + </span> + </a> {{end}} {{end}} - {{if .TeamReviewers}} - <div class="ui divider"></div> - {{range .TeamReviewers}} - {{if .Team}} - <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}}> - <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check" 16}}</span> - <span class="text"> - {{svg "octicon-people" 16 "gt-ml-4 gt-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} - </span> - </a> - {{end}} + {{end}} + {{if .TeamReviewers}} + <div class="ui divider"></div> + {{range .TeamReviewers}} + {{if .Team}} + <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}}> + <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check" 16}}</span> + <span class="text"> + {{svg "octicon-people" 16 "gt-ml-4 gt-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} + </span> + </a> {{end}} {{end}} - </div> + {{end}} </div> + </div> - <div class="ui assignees list"> - <span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_reviewers"}}</span> - <div class="selected"> - {{range .PullReviewers}} - <div class="item gt-mb-2"> + <div class="ui assignees list"> + <span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_reviewers"}}</span> + <div class="selected"> + {{range .PullReviewers}} + <div class="item gt-df gt-ac gt-py-3"> + <div class="gt-df gt-ac gt-f1"> {{if .User}} - <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 28 "gt-mr-3"}}{{.User.GetDisplayName}}</a> + <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a> {{else if .Team}} - <span class="text">{{svg "octicon-people" 16 "teamavatar"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> + <span class="text">{{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> {{end}} - <span class="ui right gt-df gt-ac gt-gap-3"> - {{if .CanChange}} - <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> - {{end}} - {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}} - </span> </div> - {{end}} - {{range .OriginalReviews}} - <div class="item gt-mb-3"> - <a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}"> - <span class="text black"> - {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} - {{.OriginalAuthor}} + <div class="gt-df gt-ac gt-gap-3"> + {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} + <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"}}"> + {{svg "octicon-x" 20}} + </a> + <div class="ui small modal" id="dismiss-review-modal"> + <div class="header"> + {{$.locale.Tr "repo.issues.dismiss_review"}} + </div> + <div class="content"> + <div class="ui warning message"> + {{$.locale.Tr "repo.issues.dismiss_review_warning"}} + </div> + <form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post"> + {{$.CsrfTokenHtml}} + <input type="hidden" name="review_id" value="{{.Review.ID}}"> + <div class="field"> + <label for="message">{{$.locale.Tr "action.review_dismissed_reason"}}</label> + <input id="message" name="message"> + </div> + <div class="text right actions"> + <button class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</button> + <button class="ui red button" type="submit">{{$.locale.Tr "ok"}}</button> + </div> + </form> + </div> + </div> + {{end}} + {{if .Review.Stale}} + <span data-tooltip-content="{{$.locale.Tr "repo.issues.is_stale"}}"> + {{svg "octicon-hourglass" 16}} </span> + {{end}} + {{if .CanChange}} + <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> + {{end}} + {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}} + </div> + </div> + {{end}} + {{range .OriginalReviews}} + <div class="item gt-df gt-ac gt-py-3"> + <div class="gt-df gt-ac gt-f1"> + <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}"> + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}} + {{.OriginalAuthor}} </a> - <span class="ui right text {{if eq .Type 1}}green - {{- else if eq .Type 2}}grey - {{- else if eq .Type 3}}red - {{- else if eq .Type 4}}yellow - {{- else}}grey{{end}} right "> - {{svg (printf "octicon-%s" .Type.Icon)}} - </span> </div> - {{end}} - </div> + <div class="gt-df gt-ac gt-gap-3"> + {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}} + </div> + </div> + {{end}} + </div> + </div> + {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}} + <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(index .PullRequestWorkInProgressPrefixes 0| Escape)}}" data-update-url="{{.Issue.Link}}/title"> + <a class="muted"> + {{.locale.Tr "repo.pulls.still_in_progress"}} {{.locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}} + </a> </div> - {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}} - <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(index .PullRequestWorkInProgressPrefixes 0| Escape)}}" data-update-url="{{.Issue.Link}}/title"> - <a class="muted"> - {{.locale.Tr "repo.pulls.still_in_progress"}} {{.locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}} - </a> - </div> - {{end}} - <div class="ui divider"></div> {{end}} + <div class="ui divider"></div> + {{end}} + + {{template "repo/issue/labels/labels_selector_field" .}} + {{template "repo/issue/labels/labels_sidebar" dict "root" $}} + + <div class="ui divider"></div> - {{template "repo/issue/labels/labels_selector_field" .}} - {{template "repo/issue/labels/labels_sidebar" dict "root" $}} + <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown"> + <a class="text gt-df gt-ac muted"> + <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + {{svg "octicon-gear" 16 "gt-ml-2"}} + {{end}} + </a> + <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone"> + {{template "repo/issue/milestone/select_menu" .}} + </div> + </div> + <div class="ui select-milestone list"> + <span class="no-select item {{if .Issue.Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> + <div class="selected"> + {{if .Issue.Milestone}} + <a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}"> + {{svg "octicon-milestone" 18 "gt-mr-3"}} + {{.Issue.Milestone.Name}} + </a> + {{end}} + </div> + </div> + {{if .IsProjectsEnabled}} <div class="ui divider"></div> - <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown"> + <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown"> <a class="text gt-df gt-ac muted"> - <strong>{{.locale.Tr "repo.issues.new.milestone"}}</strong> + <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} {{svg "octicon-gear" 16 "gt-ml-2"}} {{end}} </a> - <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone"> - {{template "repo/issue/milestone/select_menu" .}} + <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects"> + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> + {{if or .OpenProjects .ClosedProjects}} + <div class="ui icon search input"> + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> + </div> + {{end}} + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> + {{if .OpenProjects}} + <div class="divider"></div> + <div class="header"> + {{.locale.Tr "repo.issues.new.open_projects"}} + </div> + {{range .OpenProjects}} + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} + </a> + {{end}} + {{end}} + {{if .ClosedProjects}} + <div class="divider"></div> + <div class="header"> + {{.locale.Tr "repo.issues.new.closed_projects"}} + </div> + {{range .ClosedProjects}} + <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> + {{svg .IconName 18 "gt-mr-3"}}{{.Title}} + </a> + {{end}} + {{end}} </div> </div> - <div class="ui select-milestone list"> - <span class="no-select item {{if .Issue.Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span> + <div class="ui select-project list"> + <span class="no-select item {{if .Issue.ProjectID}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> <div class="selected"> - {{if .Issue.Milestone}} - <a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}"> - {{svg "octicon-milestone" 18 "gt-mr-3"}} - {{.Issue.Milestone.Name}} + {{if .Issue.ProjectID}} + <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link}}"> + {{svg .Issue.Project.IconName 18 "gt-mr-3"}}{{.Issue.Project.Title}} </a> {{end}} </div> </div> + {{end}} - {{if .IsProjectsEnabled}} - <div class="ui divider"></div> + <div class="ui divider"></div> - <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown"> - <a class="text gt-df gt-ac muted"> - <strong>{{.locale.Tr "repo.issues.new.projects"}}</strong> - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} - {{svg "octicon-gear" 16 "gt-ml-2"}} - {{end}} - </a> - <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects"> - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div> - {{if or .OpenProjects .ClosedProjects}} - <div class="ui icon search input"> - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> - </div> - {{end}} - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div> - {{if .OpenProjects}} - <div class="divider"></div> - <div class="header"> - {{.locale.Tr "repo.issues.new.open_projects"}} - </div> - {{range .OpenProjects}} - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} - </a> - {{end}} - {{end}} - {{if .ClosedProjects}} - <div class="divider"></div> - <div class="header"> - {{.locale.Tr "repo.issues.new.closed_projects"}} - </div> - {{range .ClosedProjects}} - <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}"> - {{svg .IconName 18 "gt-mr-3"}}{{.Title}} - </a> - {{end}} - {{end}} - </div> + <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}"> + <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown"> + <a class="text gt-df gt-ac muted"> + <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + {{svg "octicon-gear" 16 "gt-ml-2"}} + {{end}} + </a> + <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee"> + <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> + <div class="ui icon search input"> + <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> </div> - <div class="ui select-project list"> - <span class="no-select item {{if .Issue.ProjectID}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span> - <div class="selected"> - {{if .Issue.ProjectID}} - <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link}}"> - {{svg .Issue.Project.IconName 18 "gt-mr-3"}}{{.Issue.Project.Title}} - </a> + <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> + {{range .Assignees}} + + {{$AssigneeID := .ID}} + <a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> + {{$checked := false}} + {{range $.Issue.Assignees}} + {{if eq .ID $AssigneeID}} + {{$checked = true}} + {{end}} {{end}} + <span class="octicon-check {{if not $checked}}invisible{{end}}">{{svg "octicon-check"}}</span> + <span class="text"> + {{avatar $.Context . 20 "gt-mr-3"}}{{template "repo/search_name" .}} + </span> + </a> + {{end}} + </div> + </div> + <div class="ui assignees list"> + <span class="no-select item {{if .Issue.Assignees}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_assignees"}}</span> + <div class="selected"> + {{range .Issue.Assignees}} + <div class="item"> + <a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}"> + {{avatar $.Context . 28 "gt-mr-3"}} + {{.GetDisplayName}} + </a> </div> - </div> - {{end}} + {{end}} + </div> + </div> - <div class="ui divider"></div> + <div class="ui divider"></div> - <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}"> - <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown"> - <a class="text gt-df gt-ac muted"> - <strong>{{.locale.Tr "repo.issues.new.assignees"}}</strong> - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} - {{svg "octicon-gear" 16 "gt-ml-2"}} - {{end}} - </a> - <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee"> - <div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div> - <div class="ui icon search input"> - <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}"> - </div> - <div class="no-select item">{{.locale.Tr "repo.issues.new.clear_assignees"}}</div> - {{range .Assignees}} - - {{$AssigneeID := .ID}} - <a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}"> - {{$checked := false}} - {{range $.Issue.Assignees}} - {{if eq .ID $AssigneeID}} - {{$checked = true}} - {{end}} - {{end}} - <span class="octicon-check {{if not $checked}}invisible{{end}}">{{svg "octicon-check"}}</span> - <span class="text"> - {{avatar $.Context . 20 "gt-mr-3"}}{{template "repo/search_name" .}} - </span> - </a> - {{end}} - </div> - </div> - <div class="ui assignees list"> - <span class="no-select item {{if .Issue.Assignees}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_assignees"}}</span> - <div class="selected"> - {{range .Issue.Assignees}} - <div class="item"> - <a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}"> - {{avatar $.Context . 28 "gt-mr-3"}} - {{.GetDisplayName}} - </a> - </div> - {{end}} - </div> + {{if .Participants}} + <span class="text"><strong>{{.locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> + <div class="ui list gt-df gt-fw"> + {{range .Participants}} + <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}"> + {{avatar $.Context . 28 "gt-my-1 gt-mr-2"}} + </a> + {{end}} </div> + {{end}} + {{if and $.IssueWatch (not .Repository.IsArchived)}} <div class="ui divider"></div> - {{if .Participants}} - <span class="text"><strong>{{.locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> - <div class="ui list gt-df gt-fw"> - {{range .Participants}} - <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}"> - {{avatar $.Context . 28 "gt-my-1 gt-mr-2"}} - </a> - {{end}} + <div class="ui watching"> + <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> + <div class="gt-mt-3"> + <form method="POST" action="{{.Issue.Link}}/watch"> + <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> + {{$.CsrfTokenHtml}} + <button class="fluid ui button gt-df gt-jc"> + {{if $.IssueWatch.IsWatching}} + {{svg "octicon-mute" 16 "gt-mr-3"}} + {{.locale.Tr "repo.issues.unsubscribe"}} + {{else}} + {{svg "octicon-unmute" 16 "gt-mr-3"}} + {{.locale.Tr "repo.issues.subscribe"}} + {{end}} + </button> + </form> </div> - {{end}} - - {{if and $.IssueWatch (not .Repository.IsArchived)}} + </div> + {{end}} + {{if .Repository.IsTimetrackerEnabled $.Context}} + {{if and .CanUseTimetracker (not .Repository.IsArchived)}} <div class="ui divider"></div> - - <div class="ui watching"> - <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> + <div class="ui timetrack"> + <span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span> <div class="gt-mt-3"> - <form method="POST" action="{{.Issue.Link}}/watch"> - <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> + <form method="POST" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> {{$.CsrfTokenHtml}} - <button class="fluid ui button gt-df gt-jc"> - {{if $.IssueWatch.IsWatching}} - {{svg "octicon-mute" 16 "gt-mr-3"}} - {{.locale.Tr "repo.issues.unsubscribe"}} - {{else}} - {{svg "octicon-unmute" 16 "gt-mr-3"}} - {{.locale.Tr "repo.issues.subscribe"}} - {{end}} - </button> </form> + <form method="POST" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> + {{$.CsrfTokenHtml}} + </form> + {{if $.IsStopwatchRunning}} + <button class="ui fluid button issue-stop-time">{{.locale.Tr "repo.issues.stop_tracking"}}</button> + <button class="ui fluid negative button issue-cancel-time gt-mt-3">{{.locale.Tr "repo.issues.cancel_tracking"}}</button> + {{else}} + {{if .HasUserStopwatch}} + <div class="ui warning message"> + {{.locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape) | Safe}} + </div> + {{end}} + <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> + <div class="ui mini modal issue-start-time-modal"> + <div class="header">{{.locale.Tr "repo.issues.add_time"}}</div> + <div class="content"> + <form method="POST" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> + {{$.CsrfTokenHtml}} + <input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours"> + <input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact"> + </form> + </div> + <div class="actions"> + <button class="ui green approve button">{{.locale.Tr "repo.issues.add_time_short"}}</button> + <button class="ui red cancel button">{{.locale.Tr "repo.issues.add_time_cancel"}}</button> + </div> + </div> + <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> + {{end}} </div> </div> {{end}} - {{if .Repository.IsTimetrackerEnabled $.Context}} - {{if and .CanUseTimetracker (not .Repository.IsArchived)}} - <div class="ui divider"></div> - <div class="ui timetrack"> - <span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span> - <div class="gt-mt-3"> - <form method="POST" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> - {{$.CsrfTokenHtml}} - </form> - <form method="POST" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> - {{$.CsrfTokenHtml}} - </form> - {{if $.IsStopwatchRunning}} - <button class="ui fluid button issue-stop-time">{{.locale.Tr "repo.issues.stop_tracking"}}</button> - <button class="ui fluid negative button issue-cancel-time gt-mt-3">{{.locale.Tr "repo.issues.cancel_tracking"}}</button> - {{else}} - {{if .HasUserStopwatch}} - <div class="ui warning message"> - {{.locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape) | Safe}} - </div> - {{end}} - <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> - <div class="ui mini modal issue-start-time-modal"> - <div class="header">{{.locale.Tr "repo.issues.add_time"}}</div> - <div class="content"> - <form method="POST" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> - {{$.CsrfTokenHtml}} - <input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours"> - <input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact"> - </form> - </div> - <div class="actions"> - <button class="ui green approve button">{{.locale.Tr "repo.issues.add_time_short"}}</button> - <button class="ui red cancel button">{{.locale.Tr "repo.issues.add_time_cancel"}}</button> + {{if gt (len .WorkingUsers) 0}} + <div class="ui divider"></div> + <div class="ui comments"> + <span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> + <div> + {{range $user, $trackedtime := .WorkingUsers}} + <div class="comment gt-mt-3"> + <a class="avatar"> + {{avatar $.Context $user}} + </a> + <div class="content"> + {{template "shared/user/authorlink" $user}} + <div class="text"> + {{$trackedtime}} </div> </div> - <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> - {{end}} - </div> + </div> + {{end}} </div> - {{end}} - {{if gt (len .WorkingUsers) 0}} - <div class="ui divider"></div> - <div class="ui comments"> - <span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> + </div> + {{end}} + {{end}} + + <div class="ui divider"></div> + <span class="text"><strong>{{.locale.Tr "repo.issues.due_date"}}</strong></span> + <div class="ui form" id="deadline-loader"> + <div class="ui negative message gt-hidden" id="deadline-err-invalid-date"> + {{svg "octicon-x" 16 "close icon"}} + {{.locale.Tr "repo.issues.due_date_invalid"}} + </div> + {{if ne .Issue.DeadlineUnix 0}} + <p> + <div class="gt-df gt-sb gt-ac"> + <div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{.locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> + {{svg "octicon-calendar" 16 "gt-mr-3"}} + {{DateTime "long" .Issue.DeadlineUnix}} + </div> <div> - {{range $user, $trackedtime := .WorkingUsers}} - <div class="comment gt-mt-3"> - <a class="avatar"> - {{avatar $.Context $user}} - </a> - <div class="content"> - {{template "shared/user/authorlink" $user}} - <div class="text"> - {{$trackedtime}} - </div> - </div> - </div> + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + <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> + <a class="issue-due-remove muted" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a> {{end}} </div> </div> - {{end}} + </p> + {{else}} + <p>{{.locale.Tr "repo.issues.due_date_not_set"}}</p> {{end}} - <div class="ui divider"></div> - <span class="text"><strong>{{.locale.Tr "repo.issues.due_date"}}</strong></span> - <div class="ui form" id="deadline-loader"> - <div class="ui negative message gt-hidden" id="deadline-err-invalid-date"> - {{svg "octicon-x" 16 "close icon"}} - {{.locale.Tr "repo.issues.due_date_invalid"}} + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + <div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm"> + <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"> + {{$.CsrfTokenHtml}} + <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"> + <button class="ui green icon button"> + {{if ne .Issue.DeadlineUnix 0}} + {{svg "octicon-pencil"}} + {{else}} + {{svg "octicon-plus"}} + {{end}} + </button> + </form> </div> - {{if ne .Issue.DeadlineUnix 0}} + {{end}} + </div> + + {{if .Repository.IsDependenciesEnabled $.Context}} + <div class="ui divider"></div> + + <div class="ui depending"> + {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} + <span class="text"><strong>{{.locale.Tr "repo.issues.dependency.title"}}</strong></span> + <br> <p> - <div class="gt-df gt-sb gt-ac"> - <div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{.locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> - {{svg "octicon-calendar" 16 "gt-mr-3"}} - {{DateTime "long" .Issue.DeadlineUnix}} - </div> - <div> - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} - <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> - <a class="issue-due-remove muted" data-tooltip-content="{{$.locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a> - {{end}} - </div> - </div> + {{if .Issue.IsPull}} + {{.locale.Tr "repo.issues.dependency.pr_no_dependencies"}} + {{else}} + {{.locale.Tr "repo.issues.dependency.issue_no_dependencies"}} + {{end}} </p> - {{else}} - <p>{{.locale.Tr "repo.issues.due_date_not_set"}}</p> {{end}} - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} - <div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm"> - <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"> - {{$.CsrfTokenHtml}} - <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"> - <button class="ui green icon button"> - {{if ne .Issue.DeadlineUnix 0}} - {{svg "octicon-pencil"}} - {{else}} - {{svg "octicon-plus"}} - {{end}} - </button> - </form> + {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}} + <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}}"> + <strong>{{.locale.Tr "repo.issues.dependency.blocks_short"}}</strong> + </span> + <div class="ui relaxed divided list"> + {{range .BlockingDependencies}} + <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> + <div class="item-left gt-df gt-jc gt-fc gt-f1"> + <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> + #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} + </a> + <div class="text small"> + {{.Repository.OwnerName}}/{{.Repository.Name}} + </div> + </div> + <div class="item-right gt-df gt-ac"> + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} + <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> + {{svg "octicon-trash" 16}} + </a> + {{end}} + </div> + </div> + {{end}} + {{if .BlockingDependenciesNotPermitted}} + <div class="item gt-df gt-ac gt-sb"> + <span>{{$.locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span> + </div> + {{end}} </div> {{end}} - </div> - - {{if .Repository.IsDependenciesEnabled $.Context}} - <div class="ui divider"></div> - <div class="ui depending"> - {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} - <span class="text"><strong>{{.locale.Tr "repo.issues.dependency.title"}}</strong></span> - <br> - <p> - {{if .Issue.IsPull}} - {{.locale.Tr "repo.issues.dependency.pr_no_dependencies"}} - {{else}} - {{.locale.Tr "repo.issues.dependency.issue_no_dependencies"}} - {{end}} - </p> - {{end}} - - {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}} - <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}}"> - <strong>{{.locale.Tr "repo.issues.dependency.blocks_short"}}</strong> - </span> - <div class="ui relaxed divided list"> - {{range .BlockingDependencies}} - <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> - <div class="item-left gt-df gt-jc gt-fc gt-f1"> - <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> - #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} - </a> - <div class="text small"> - {{.Repository.OwnerName}}/{{.Repository.Name}} - </div> - </div> - <div class="item-right gt-df gt-ac"> - {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> - {{svg "octicon-trash" 16}} - </a> - {{end}} + {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}} + <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}}"> + <strong>{{.locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong> + </span> + <div class="ui relaxed divided list"> + {{range .BlockedByDependencies}} + <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> + <div class="item-left gt-df gt-jc gt-fc gt-f1"> + <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> + #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} + </a> + <div class="text small"> + {{.Repository.OwnerName}}/{{.Repository.Name}} </div> </div> - {{end}} - {{if .BlockingDependenciesNotPermitted}} - <div class="item gt-df gt-ac gt-sb"> - <span>{{$.locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span> + <div class="item-right gt-df gt-ac"> + {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} + <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> + {{svg "octicon-trash" 16}} + </a> + {{end}} </div> - {{end}} - </div> - {{end}} - - {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}} - <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}}"> - <strong>{{.locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong> - </span> - <div class="ui relaxed divided list"> - {{range .BlockedByDependencies}} + </div> + {{end}} + {{if $.CanCreateIssueDependencies}} + {{range .BlockedByDependenciesNotPermitted}} <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> <div class="item-left gt-df gt-jc gt-fc gt-f1"> - <a class="title" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> - #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} - </a> + <div> + <span data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> + <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> + #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} + </span> + </div> <div class="text small"> {{.Repository.OwnerName}}/{{.Repository.Name}} </div> </div> <div class="item-right gt-df gt-ac"> {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> + <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> {{svg "octicon-trash" 16}} </a> {{end}} </div> </div> {{end}} - {{if $.CanCreateIssueDependencies}} - {{range .BlockedByDependenciesNotPermitted}} - <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> - <div class="item-left gt-df gt-jc gt-fc gt-f1"> - <div> - <span data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> - <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> - #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} - </span> - </div> - <div class="text small"> - {{.Repository.OwnerName}}/{{.Repository.Name}} - </div> - </div> - <div class="item-right gt-df gt-ac"> - {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{$.locale.Tr "repo.issues.dependency.remove_info"}}"> - {{svg "octicon-trash" 16}} - </a> - {{end}} - </div> - </div> - {{end}} - {{else if .BlockedByDependenciesNotPermitted}} - <div class="item gt-df gt-ac gt-sb"> - <span>{{$.locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span> - </div> - {{end}} - </div> - {{end}} + {{else if .BlockedByDependenciesNotPermitted}} + <div class="item gt-df gt-ac gt-sb"> + <span>{{$.locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span> + </div> + {{end}} + </div> + {{end}} - {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} - <div> - <form method="POST" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> - {{$.CsrfTokenHtml}} - <div class="ui fluid action input"> - <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}"> - <input name="newDependency" type="hidden"> - {{svg "octicon-triangle-down" 14 "dropdown icon"}} - <input type="text" class="search"> - <div class="default text">{{.locale.Tr "repo.issues.dependency.add"}}</div> - </div> - <button class="ui green icon button"> - {{svg "octicon-plus"}} - </button> + {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} + <div> + <form method="POST" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> + {{$.CsrfTokenHtml}} + <div class="ui fluid action input"> + <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}"> + <input name="newDependency" type="hidden"> + {{svg "octicon-triangle-down" 14 "dropdown icon"}} + <input type="text" class="search"> + <div class="default text">{{.locale.Tr "repo.issues.dependency.add"}}</div> </div> - </form> - </div> - {{end}} - </div> + <button class="ui green icon button"> + {{svg "octicon-plus"}} + </button> + </div> + </form> + </div> + {{end}} + </div> - {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} - <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}"> + {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} + <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}"> - <div class="ui g-modal-confirm modal remove-dependency"> - <div class="header"> - {{svg "octicon-trash"}} - {{.locale.Tr "repo.issues.dependency.remove_header"}} - </div> - <div class="content"> - <form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> - {{$.CsrfTokenHtml}} - <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> - <input type="hidden" value="" name="dependencyType" id="dependencyType"> - </form> - <p>{{if .Issue.IsPull}} - {{.locale.Tr "repo.issues.dependency.pr_remove_text"}} - {{else}} - {{.locale.Tr "repo.issues.dependency.issue_remove_text"}} - {{end}}</p> - </div> - {{$ModalButtonCancelText := .locale.Tr "repo.issues.dependency.cancel"}} - {{$ModalButtonOkText := .locale.Tr "repo.issues.dependency.remove"}} - {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}} + <div class="ui g-modal-confirm modal remove-dependency"> + <div class="header"> + {{svg "octicon-trash"}} + {{.locale.Tr "repo.issues.dependency.remove_header"}} </div> - {{end}} + <div class="content"> + <form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> + {{$.CsrfTokenHtml}} + <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> + <input type="hidden" value="" name="dependencyType" id="dependencyType"> + </form> + <p>{{if .Issue.IsPull}} + {{.locale.Tr "repo.issues.dependency.pr_remove_text"}} + {{else}} + {{.locale.Tr "repo.issues.dependency.issue_remove_text"}} + {{end}}</p> + </div> + {{$ModalButtonCancelText := .locale.Tr "repo.issues.dependency.cancel"}} + {{$ModalButtonOkText := .locale.Tr "repo.issues.dependency.remove"}} + {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}} + </div> {{end}} + {{end}} + + <div class="ui divider"></div> + <div class="ui equal width compact grid"> + {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} + <div class="row gt-ac" data-tooltip-content="{{$issueReferenceLink}}"> + <span class="text column truncate">{{.locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> + <button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> + </div> + </div> + {{if and .IsRepoAdmin (not .Repository.IsArchived)}} <div class="ui divider"></div> - <div class="ui equal width compact grid"> - {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} - <div class="row gt-ac" data-tooltip-content="{{$issueReferenceLink}}"> - <span class="text column truncate">{{.locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> - <button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> - </div> - </div> - {{if and .IsRepoAdmin (not .Repository.IsArchived)}} - <div class="ui divider"></div> + {{if or .PinEnabled .Issue.IsPinned}} + <form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> + {{$.CsrfTokenHtml}} + <button class="fluid ui button gt-df gt-jc {{if not $.NewPinAllowed}}disabled{{end}}"> + {{if not .Issue.IsPinned}} + {{svg "octicon-pin" 16 "gt-mr-3"}} + {{.locale.Tr "pin"}} + {{else}} + {{svg "octicon-pin-slash" 16 "gt-mr-3"}} + {{.locale.Tr "unpin"}} + {{end}} + </button> + </form> + {{end}} - {{if or .PinEnabled .Issue.IsPinned}} - <form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> - {{$.CsrfTokenHtml}} - <button class="fluid ui button gt-df gt-jc {{if not $.NewPinAllowed}}disabled{{end}}"> - {{if not .Issue.IsPinned}} - {{svg "octicon-pin" 16 "gt-mr-3"}} - {{.locale.Tr "pin"}} - {{else}} - {{svg "octicon-pin-slash" 16 "gt-mr-3"}} - {{.locale.Tr "unpin"}} - {{end}} - </button> - </form> + <button class="gt-mt-2 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock"> + {{if .Issue.IsLocked}} + {{svg "octicon-key"}} + {{.locale.Tr "repo.issues.unlock"}} + {{else}} + {{svg "octicon-lock"}} + {{.locale.Tr "repo.issues.lock"}} {{end}} - - <button class="gt-mt-2 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock"> + </button> + <div class="ui tiny modal" id="lock"> + <div class="header"> {{if .Issue.IsLocked}} - {{svg "octicon-key"}} - {{.locale.Tr "repo.issues.unlock"}} + {{.locale.Tr "repo.issues.unlock.title"}} {{else}} - {{svg "octicon-lock"}} - {{.locale.Tr "repo.issues.lock"}} + {{.locale.Tr "repo.issues.lock.title"}} {{end}} - </button> - <div class="ui tiny modal" id="lock"> - <div class="header"> + </div> + <div class="content"> + <div class="ui warning message"> {{if .Issue.IsLocked}} - {{.locale.Tr "repo.issues.unlock.title"}} + {{.locale.Tr "repo.issues.unlock.notice_1"}}<br> + {{.locale.Tr "repo.issues.unlock.notice_2"}}<br> {{else}} - {{.locale.Tr "repo.issues.lock.title"}} + {{.locale.Tr "repo.issues.lock.notice_1"}}<br> + {{.locale.Tr "repo.issues.lock.notice_2"}}<br> + {{.locale.Tr "repo.issues.lock.notice_3"}}<br> {{end}} </div> - <div class="content"> - <div class="ui warning message"> - {{if .Issue.IsLocked}} - {{.locale.Tr "repo.issues.unlock.notice_1"}}<br> - {{.locale.Tr "repo.issues.unlock.notice_2"}}<br> - {{else}} - {{.locale.Tr "repo.issues.lock.notice_1"}}<br> - {{.locale.Tr "repo.issues.lock.notice_2"}}<br> - {{.locale.Tr "repo.issues.lock.notice_3"}}<br> - {{end}} - </div> - <form class="ui form" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}" - method="post"> - {{.CsrfTokenHtml}} + <form class="ui form" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}" + method="post"> + {{.CsrfTokenHtml}} - {{if not .Issue.IsLocked}} - <div class="field"> - <strong> {{.locale.Tr "repo.issues.lock.reason"}} </strong> - </div> + {{if not .Issue.IsLocked}} + <div class="field"> + <strong> {{.locale.Tr "repo.issues.lock.reason"}} </strong> + </div> - <div class="field"> - <div class="ui fluid dropdown selection" tabindex="0"> + <div class="field"> + <div class="ui fluid dropdown selection" tabindex="0"> - <select name="reason"> - <option value=""> </option> - {{range .LockReasons}} - <option value="{{.}}">{{.}}</option> - {{end}} - </select> - {{svg "octicon-triangle-down" 14 "dropdown icon"}} + <select name="reason"> + <option value=""> </option> + {{range .LockReasons}} + <option value="{{.}}">{{.}}</option> + {{end}} + </select> + {{svg "octicon-triangle-down" 14 "dropdown icon"}} - <div class="default text"> </div> + <div class="default text"> </div> - <div class="menu"> - {{range .LockReasons}} - <div class="item" data-value="{{.}}">{{.}}</div> - {{end}} - </div> + <div class="menu"> + {{range .LockReasons}} + <div class="item" data-value="{{.}}">{{.}}</div> + {{end}} </div> </div> - {{end}} - - <div class="text right actions"> - <button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button> - <button class="ui red button"> - {{if .Issue.IsLocked}} - {{.locale.Tr "repo.issues.unlock_confirm"}} - {{else}} - {{.locale.Tr "repo.issues.lock_confirm"}} - {{end}} - </button> </div> - </form> - </div> + {{end}} + + <div class="text right actions"> + <button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button> + <button class="ui red button"> + {{if .Issue.IsLocked}} + {{.locale.Tr "repo.issues.unlock_confirm"}} + {{else}} + {{.locale.Tr "repo.issues.lock_confirm"}} + {{end}} + </button> + </div> + </form> </div> - <button class="gt-mt-2 fluid ui show-modal button negative" data-modal="#delete"> - {{svg "octicon-trash"}} - {{.locale.Tr "repo.issues.delete"}} - </button> - <div class="ui g-modal-confirm modal" id="delete"> - <div class="header"> + </div> + <button class="gt-mt-2 fluid ui show-modal button negative" data-modal="#delete"> + {{svg "octicon-trash"}} + {{.locale.Tr "repo.issues.delete"}} + </button> + <div class="ui g-modal-confirm modal" id="delete"> + <div class="header"> + {{if .Issue.IsPull}} + {{.locale.Tr "repo.pulls.delete.title"}} + {{else}} + {{.locale.Tr "repo.issues.delete.title"}} + {{end}} + </div> + <div class="content"> + <p> {{if .Issue.IsPull}} - {{.locale.Tr "repo.pulls.delete.title"}} + {{.locale.Tr "repo.pulls.delete.text"}} {{else}} - {{.locale.Tr "repo.issues.delete.title"}} + {{.locale.Tr "repo.issues.delete.text"}} {{end}} - </div> - <div class="content"> - <p> - {{if .Issue.IsPull}} - {{.locale.Tr "repo.pulls.delete.text"}} - {{else}} - {{.locale.Tr "repo.issues.delete.text"}} - {{end}} - </p> - </div> - <form action="{{.Issue.Link}}/delete" method="post"> - {{.CsrfTokenHtml}} - {{template "base/modal_actions_confirm" .}} - </form> + </p> </div> - {{end}} + <form action="{{.Issue.Link}}/delete" method="post"> + {{.CsrfTokenHtml}} + {{template "base/modal_actions_confirm" .}} + </form> + </div> + {{end}} - {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} - {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}} - <div class="ui divider"></div> - <div class="inline field"> - <div class="ui checkbox" id="allow-edits-from-maintainers" - data-url="{{.Issue.Link}}" - data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}" - data-prompt-error="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}" - > - <label><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> - <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}> - </div> + {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} + {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}} + <div class="ui divider"></div> + <div class="inline field"> + <div class="ui checkbox" id="allow-edits-from-maintainers" + data-url="{{.Issue.Link}}" + data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}" + data-prompt-error="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}" + > + <label><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label> + <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}> </div> - {{end}} + </div> {{end}} - </div> + {{end}} </div> diff --git a/web_src/css/explore.css b/web_src/css/explore.css index b79f27200c..ee05918e77 100644 --- a/web_src/css/explore.css +++ b/web_src/css/explore.css @@ -28,10 +28,6 @@ word-break: break-all; } -.ui.repository.list .item .ui.header .metas { - font-size: 14px; -} - .ui.repository.list .item .time { font-size: 12px; } diff --git a/web_src/css/modules/comment.css b/web_src/css/modules/comment.css index ae50bce0ed..799eeb8574 100644 --- a/web_src/css/modules/comment.css +++ b/web_src/css/modules/comment.css @@ -3,7 +3,6 @@ .ui.comments { margin: 1.5em 0; - max-width: 650px; } .ui.comments:first-child { diff --git a/web_src/css/repo.css b/web_src/css/repo.css index daca98bb51..b7bb1b2967 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -67,45 +67,64 @@ border: 1px var(--color-yellow) solid; } -.repository .metas .menu { - overflow-x: auto; - max-height: 500px; +.issue-content { + display: flex; + align-items: flex-start; + gap: 16px; +} + +@media (max-width: 767.98px) { + .issue-content { + flex-direction: column; + } +} + +.issue-content-left { + margin: 0 !important; + width: calc(100% - 316px); } -.repository .metas .ui.list.assignees .item { - line-height: 2.5em; +.issue-content-right { + margin: 0 !important; + width: 300px; +} + +@media (max-width: 767.98px) { + .issue-content-left, + .issue-content-right { + width: 100%; + } } -.repository .metas .ui.list.assignees .teamavatar { - margin-top: 0.125rem; - margin-left: 6.75px; - margin-right: 8.75px; +.repository .issue-content-right .menu { + overflow-x: auto; + max-height: 500px; } -.repository .metas .ui.list .dependency { +.repository .issue-content-right .ui.list .dependency { padding: 0; white-space: nowrap; } -.repository .metas .ui.list .title { +.repository .issue-content-right .ui.list .title { max-width: 200px; overflow: hidden; text-overflow: ellipsis; } @media (max-width: 1200px) { - .repository .metas .ui.list .title { + .repository .issue-content-right .ui.list .title { max-width: 150px; } } @media (max-width: 1000px) { - .repository .metas .ui.list .title { + .repository .issue-content-right .ui.list .title { max-width: 100px; } } -.repository .metas #deadlineForm input { +.repository .issue-content-right #deadlineForm input { width: 12.8rem; border-radius: 4px 0 0 4px; border-right: 0; @@ -578,11 +597,7 @@ font-size: 14px; } -.repository.new.issue .comment.form .metas { - min-width: 220px; -} - -.repository.new.issue .comment.form .metas .filter.menu { +.repository.new.issue .comment.form .issue-content-right .filter.menu { max-height: 500px; overflow-x: auto; } @@ -699,31 +714,6 @@ margin-top: 1.1rem; } -.repository.view.issue .review-item { - display: flex; - justify-content: space-between; - align-items: center; -} - -.review-item-left, -.review-item-right { - display: flex; - align-items: center; -} - -.review-item-right { - gap: 8px; - margin-left: 4px; -} - -.repository.view.issue .review-item .divider { - margin: 0.5rem 0; -} - -.repository.view.issue .review-item .review-content { - padding: 1em 0 1em 3.8em; -} - .repository.view.issue .comment-list:not(.prevent-before-timeline)::before { display: block; content: ""; @@ -761,7 +751,7 @@ .repository.view.issue .comment-list .timeline-item, .repository.view.issue .comment-list .timeline-item-group { - padding: 12px 0; + padding: 16px 0; } .repository.view.issue .comment-list .timeline-item-group .timeline-item { @@ -1132,11 +1122,6 @@ text-decoration: line-through; } -.repository .comment.form .ui.comments { - margin-top: -12px; - max-width: 100%; -} - .repository .comment.form .content .field:first-child { clear: none; } @@ -1252,7 +1237,8 @@ } .repository.compare.pull .pullrequest-form { - margin-bottom: 1.5rem; + margin-top: 16px; + margin-bottom: 16px; } .repository.compare.pull .markup { |