2022-03-30 02:42:47 -06:00
|
|
|
{{if eq .PackageDescriptor.Package.Type "nuget"}}
|
2023-09-25 02:56:50 -06:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
|
2022-03-30 02:42:47 -06:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
2023-09-25 02:56:50 -06:00
|
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.nuget.registry"}}</label>
|
2024-03-14 20:05:31 -06:00
|
|
|
<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></origin-url></code></pre></div>
|
2022-03-30 02:42:47 -06:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 02:56:50 -06:00
|
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.nuget.install"}}</label>
|
2023-04-06 15:35:32 -06:00
|
|
|
<div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
|
2022-03-30 02:42:47 -06:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2024-02-22 10:02:33 -07:00
|
|
|
<label>{{ctx.Locale.Tr "packages.registry.documentation" "NuGet" "https://docs.gitea.com/usage/packages/nuget/"}}</label>
|
2022-03-30 02:42:47 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-04-07 10:46:59 -06:00
|
|
|
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes .PackageDescriptor.Metadata.Readme}}
|
2023-09-25 02:56:50 -06:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
|
2024-11-04 23:04:26 -07:00
|
|
|
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Description}}</div>{{end}}
|
|
|
|
{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment markup markdown">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.Readme}}</div>{{end}}
|
|
|
|
{{if .PackageDescriptor.Metadata.ReleaseNotes}}<div class="ui attached segment">{{ctx.RenderUtils.MarkdownToHtml .PackageDescriptor.Metadata.ReleaseNotes}}</div>{{end}}
|
2022-03-30 02:42:47 -06:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PackageDescriptor.Metadata.Dependencies}}
|
2023-09-25 02:56:50 -06:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
|
2022-03-30 02:42:47 -06:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<table class="ui single line very basic table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-09-25 02:56:50 -06:00
|
|
|
<th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
|
|
|
|
<th class="three wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
|
|
|
|
<th class="three wide">{{ctx.Locale.Tr "packages.nuget.dependency.framework"}}</th>
|
2022-03-30 02:42:47 -06:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range $framework, $dependencies := .PackageDescriptor.Metadata.Dependencies}}
|
|
|
|
{{range $dependencies}}
|
|
|
|
<tr>
|
|
|
|
<td>{{.ID}}</td>
|
|
|
|
<td>{{.Version}}</td>
|
|
|
|
<td>{{$framework}}</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|