summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/packages/list.tmpl1
-rw-r--r--templates/package/content/vagrant.tmpl18
-rw-r--r--templates/package/metadata/vagrant.tmpl5
-rw-r--r--templates/package/shared/list.tmpl1
-rw-r--r--templates/package/view.tmpl2
-rw-r--r--templates/swagger/v1_json.tmpl3
6 files changed, 29 insertions, 1 deletions
diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl
index 61721532a4..06d6163476 100644
--- a/templates/admin/packages/list.tmpl
+++ b/templates/admin/packages/list.tmpl
@@ -24,6 +24,7 @@
<option value="pub" {{if eq .PackageType "pub"}}selected="selected"{{end}}>Pub</option>
<option value="pypi" {{if eq .PackageType "pypi"}}selected="selected"{{end}}>PyPi</option>
<option value="rubygems" {{if eq .PackageType "rubygems"}}selected="selected"{{end}}>RubyGems</option>
+ <option value="vagrant" {{if eq .PackageType "vagrant"}}selected="selected"{{end}}>Vagrant</option>
</select>
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
diff --git a/templates/package/content/vagrant.tmpl b/templates/package/content/vagrant.tmpl
new file mode 100644
index 0000000000..7bd686e6ab
--- /dev/null
+++ b/templates/package/content/vagrant.tmpl
@@ -0,0 +1,18 @@
+{{if eq .PackageDescriptor.Package.Type "vagrant"}}
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
+ <div class="ui attached segment">
+ <div class="ui form">
+ <div class="field">
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.vagrant.install"}}</label>
+ <div class="markup"><pre class="code-block"><code>vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"</code></pre></div>
+ </div>
+ <div class="field">
+ <label>{{.locale.Tr "packages.vagrant.documentation" | Safe}}</label>
+ </div>
+ </div>
+ </div>
+ {{if .PackageDescriptor.Metadata.Description}}
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
+ <div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
+ {{end}}
+{{end}}
diff --git a/templates/package/metadata/vagrant.tmpl b/templates/package/metadata/vagrant.tmpl
new file mode 100644
index 0000000000..344e417b77
--- /dev/null
+++ b/templates/package/metadata/vagrant.tmpl
@@ -0,0 +1,5 @@
+{{if eq .PackageDescriptor.Package.Type "vagrant"}}
+ {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.conan.details.repository"}}</a></div>{{end}}
+{{end}}
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl
index 020acba9d7..b48f772f39 100644
--- a/templates/package/shared/list.tmpl
+++ b/templates/package/shared/list.tmpl
@@ -17,6 +17,7 @@
<option value="pub" {{if eq .PackageType "pub"}}selected="selected"{{end}}>Pub</option>
<option value="pypi" {{if eq .PackageType "pypi"}}selected="selected"{{end}}>PyPi</option>
<option value="rubygems" {{if eq .PackageType "rubygems"}}selected="selected"{{end}}>RubyGems</option>
+ <option value="vagrant" {{if eq .PackageType "vagrant"}}selected="selected"{{end}}>Vagrant</option>
</select>
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl
index 254d1ff840..a5b2a2ef68 100644
--- a/templates/package/view.tmpl
+++ b/templates/package/view.tmpl
@@ -30,6 +30,7 @@
{{template "package/content/pub" .}}
{{template "package/content/pypi" .}}
{{template "package/content/rubygems" .}}
+ {{template "package/content/vagrant" .}}
</div>
<div class="four wide column">
<div class="ui segment metas">
@@ -52,6 +53,7 @@
{{template "package/metadata/pub" .}}
{{template "package/metadata/pypi" .}}
{{template "package/metadata/rubygems" .}}
+ {{template "package/metadata/vagrant" .}}
<div class="item">{{svg "octicon-database" 16 "mr-3"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div>
</div>
{{if not (eq .PackageDescriptor.Package.Type "container")}}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 8a8ca9a924..5dcb4787e0 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -1962,7 +1962,8 @@
"nuget",
"pub",
"pypi",
- "rubygems"
+ "rubygems",
+ "vagrant"
],
"type": "string",
"description": "package type filter",