1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-04 17:24:26 +00:00
gitea/templates/package/settings.tmpl
KN4CK3R e6f8e9318b
Use flex classes in package settings (#26314)
Regression of #25790
Fixes #26310

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2023-08-08 18:28:24 +02:00

72 lines
2.8 KiB
Handlebars

{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content repository settings options">
{{template "shared/user/org_profile_avatar" .}}
<div class="ui container">
{{template "user/overview/header" .}}
{{template "base/alert" .}}
<p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{.locale.Tr "repo.settings"}}</strong></p>
<h4 class="ui top attached header">
{{.locale.Tr "packages.settings.link"}}
</h4>
<div class="ui attached segment">
<p>{{.locale.Tr "packages.settings.link.description"}}</p>
<form class="ui form" action="{{.Link}}" method="post">
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="link">
<div class="field">
<div class="ui clearable selection dropdown">
{{$repoID := 0}}
{{if .PackageDescriptor.Repository}}
{{$repoID = .PackageDescriptor.Repository.ID}}
{{end}}
<input type="hidden" name="repo_id" value="{{$repoID}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="default text">{{.locale.Tr "packages.settings.link.select"}}</div>
<div class="menu">
{{range .Repos}}
<div class="item" data-value="{{.ID}}">{{.Name}}</div>
{{end}}
</div>
</div>
</div>
<div class="field">
<button class="ui green button">{{.locale.Tr "packages.settings.link.button"}}</button>
</div>
</form>
</div>
<h4 class="ui top attached error header">
{{.locale.Tr "repo.settings.danger_zone"}}
</h4>
<div class="ui attached error danger segment">
<div class="flex-list">
<div class="flex-item">
<div class="flex-item-main">
<div class="flex-item-title">{{.locale.Tr "packages.settings.delete"}}</div>
<div class="flex-item-body">{{.locale.Tr "packages.settings.delete.description"}}</div>
</div>
<div class="flex-item-trailing">
<button class="ui basic red show-modal button" data-modal="#delete-package-modal">{{.locale.Tr "packages.settings.delete"}}</button>
</div>
<div class="ui tiny modal" id="delete-package-modal">
<div class="header">
{{.locale.Tr "packages.settings.delete"}}
</div>
<div class="content">
<div class="ui warning message gt-word-break">
{{.locale.Tr "packages.settings.delete.notice" .PackageDescriptor.Package.Name .PackageDescriptor.Version.Version}}
</div>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="delete">
{{template "base/modal_actions_confirm" .}}
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}