aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/package/content/container.tmpl28
-rw-r--r--templates/package/view.tmpl2
2 files changed, 20 insertions, 10 deletions
diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl
index 0bf749cd70..78c9434386 100644
--- a/templates/package/content/container.tmpl
+++ b/templates/package/content/container.tmpl
@@ -23,19 +23,27 @@
</div>
</div>
</div>
- {{if .PackageDescriptor.Metadata.MultiArch}}
+ {{if .PackageDescriptor.Metadata.Manifests}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.multi_arch"}}</h4>
<div class="ui attached segment">
- <div class="ui form">
- {{range $arch, $digest := .PackageDescriptor.Metadata.MultiArch}}
- <div class="field">
- <label>{{svg "octicon-terminal"}} {{$arch}}</label>
- {{if eq $.PackageDescriptor.Metadata.Type "oci"}}
- <div class="markup"><pre class="code-block"><code>docker pull {{$.RegistryHost}}/{{$.PackageDescriptor.Owner.LowerName}}/{{$.PackageDescriptor.Package.LowerName}}@{{$digest}}</code></pre></div>
+ <table class="ui very basic compact table">
+ <thead>
+ <tr>
+ <th>{{.locale.Tr "packages.container.digest"}}</th>
+ <th>{{.locale.Tr "packages.container.multi_arch"}}</th>
+ <th>{{.locale.Tr "admin.packages.size"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .PackageDescriptor.Metadata.Manifests}}
+ <tr>
+ <td><a href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .Digest}}">{{.Digest}}</a></td>
+ <td>{{.Platform}}</td>
+ <td>{{FileSize .Size}}</td>
+ </tr>
{{end}}
- </div>
- {{end}}
- </div>
+ </tbody>
+ </table>
</div>
{{end}}
{{if .PackageDescriptor.Metadata.Description}}
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl
index b2a2fb1e5d..beadcf5c1e 100644
--- a/templates/package/view.tmpl
+++ b/templates/package/view.tmpl
@@ -62,7 +62,9 @@
{{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>