2022-03-30 10:42:47 +02:00
|
|
|
{{if eq .PackageDescriptor.Package.Type "composer"}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui form">
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.composer.registry"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="markup"><pre class="code-block"><code>{
|
|
|
|
"repositories": [{
|
|
|
|
"type": "composer",
|
2024-03-15 03:05:31 +01:00
|
|
|
"url": "<origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/composer"></origin-url>"
|
2022-03-30 10:42:47 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 10:56:50 +02:00
|
|
|
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.composer.install"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2024-02-22 18:02:33 +01:00
|
|
|
<label>{{ctx.Locale.Tr "packages.registry.documentation" "Composer" "https://forgejo.org/docs/latest/user/packages/composer/"}}</label>
|
2022-03-30 10:42:47 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-06-14 06:45:52 +02:00
|
|
|
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Comments}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
|
2024-06-14 06:45:52 +02:00
|
|
|
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
|
|
|
|
{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment markup markdown">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}}
|
|
|
|
{{if .PackageDescriptor.Metadata.Comments}}<div class="ui attached segment">{{StringUtils.Join .PackageDescriptor.Metadata.Comments " "}}</div>{{end}}
|
2022-03-30 10:42:47 +02:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="ui list">
|
2023-09-25 10:56:50 +02:00
|
|
|
{{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (ctx.Locale.Tr "packages.composer.dependencies")}}
|
|
|
|
{{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (ctx.Locale.Tr "packages.composer.dependencies.development")}}
|
2022-03-30 10:42:47 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2024-06-14 06:45:52 +02:00
|
|
|
{{if .PackageDescriptor.Metadata.Keywords}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
|
2022-03-30 10:42:47 +02:00
|
|
|
<div class="ui attached segment">
|
|
|
|
{{range .PackageDescriptor.Metadata.Keywords}}
|
|
|
|
{{.}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|