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 /templates/package | |
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>
Diffstat (limited to 'templates/package')
-rw-r--r-- | templates/package/view.tmpl | 205 |
1 files changed, 100 insertions, 105 deletions
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> |