Skip to content

Commit d030cac

Browse files
lonix1wxiaoguang
andauthored
feat: link to nuget dependencies (#26554)
Add links to dependencies and their versions, as done in nuget site. Makes it easier to use. Co-authored-by: wxiaoguang <[email protected]>
1 parent 2564c15 commit d030cac

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3538,6 +3538,7 @@ versions = Versions
35383538
versions.view_all = View all
35393539
dependency.id = ID
35403540
dependency.version = Version
3541+
search_in_external_registry = Search in %s
35413542
alpine.registry = Setup this registry by adding the url in your <code>/etc/apk/repositories</code> file:
35423543
alpine.registry.key = Download the registry public RSA key into the <code>/etc/apk/keys/</code> folder to verify the index signature:
35433544
alpine.registry.info = Choose $branch and $repository from the list below.

templates/package/content/nuget.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@
3535
</tr>
3636
</thead>
3737
<tbody>
38+
{{$tooltipSearchInNuget := ctx.Locale.Tr "packages.search_in_external_registry" "nuget.org"}}
3839
{{range $framework, $dependencies := .PackageDescriptor.Metadata.Dependencies}}
3940
{{range $dependencies}}
4041
<tr>
41-
<td>{{.ID}}</td>
42-
<td>{{.Version}}</td>
42+
<td>{{.ID}} <a target="_blank" rel="noreferrer" href="https://www.nuget.org/packages/{{.ID}}" data-tooltip-content="{{$tooltipSearchInNuget}}">{{svg "octicon-link-external"}}</a></td>
43+
<td>{{.Version}} <a target="_blank" rel="noreferrer" href="https://www.nuget.org/packages/{{.ID}}/{{.Version}}" data-tooltip-content="{{$tooltipSearchInNuget}}">{{svg "octicon-link-external"}}</a></td>
4344
<td>{{$framework}}</td>
4445
</tr>
4546
{{end}}

0 commit comments

Comments
 (0)