{{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.i18n.Lang}}
- {{if .PackageDescriptor.Repository}}
+ {{if .HasRepositoryAccess}}
{{.i18n.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.HTMLURL (.PackageDescriptor.Repository.FullName | Escape) | Safe}}
{{else}}
{{.i18n.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}}
@@ -35,7 +35,7 @@
{{svg .PackageDescriptor.Package.Type.SVGName 16 "mr-3"}} {{.PackageDescriptor.Package.Type.Name}}
- {{if .PackageDescriptor.Repository}}
+ {{if .HasRepositoryAccess}}
{{end}}
{{svg "octicon-calendar" 16 "mr-3"}} {{.PackageDescriptor.Version.CreatedUnix.FormatDate}}
@@ -76,10 +76,10 @@
{{end}}
{{end}}
- {{if or .CanWritePackages .PackageDescriptor.Repository}}
+ {{if or .CanWritePackages .HasRepositoryAccess}}
- {{if .PackageDescriptor.Repository}}
+ {{if .HasRepositoryAccess}}
{{end}}
{{if .CanWritePackages}}
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 6f67f36422ec9..d6ad169821c2e 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -18,6 +18,12 @@
{{svg "octicon-diff" 16 "mr-2"}}{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}