mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-30 09:41:11 -05:00
4b494d341f
Unify organizations header before: ![image](https://github.com/go-gitea/gitea/assets/72873130/74474e0d-33c3-4bbf-9324-d130ea2c62f8) after: ![image](https://github.com/go-gitea/gitea/assets/72873130/1c65de0d-fa0f-4b17-ab8d-067de8c7113b) --------- Co-authored-by: silverwind <me@silverwind.io> (cherry picked from commit 532e422027c88a4a3dc0c2968857f8d5f94d861f) Conflicts: routers/web/shared/user/header.go templates/org/home.tmpl context
77 lines
3 KiB
Go HTML Template
77 lines
3 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository settings options{{if .ContextUser.IsOrganization}} organization{{end}}">
|
|
{{if .ContextUser.IsOrganization}}
|
|
{{template "org/header" .}}
|
|
{{else}}
|
|
{{template "shared/user/org_profile_avatar" .}}
|
|
{{end}}
|
|
<div class="ui container">
|
|
{{if not .ContextUser.IsOrganization}}
|
|
{{template "user/overview/header" .}}
|
|
{{end}}
|
|
{{template "base/alert" .}}
|
|
<p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{ctx.Locale.Tr "repo.settings"}}</strong></p>
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "packages.settings.link"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<p>{{ctx.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">{{ctx.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 primary button">{{ctx.Locale.Tr "packages.settings.link.button"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<h4 class="ui top attached error header">
|
|
{{ctx.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">{{ctx.Locale.Tr "packages.settings.delete"}}</div>
|
|
<div class="flex-item-body">{{ctx.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">{{ctx.Locale.Tr "packages.settings.delete"}}</button>
|
|
</div>
|
|
<div class="ui tiny modal" id="delete-package-modal">
|
|
<div class="header">
|
|
{{ctx.Locale.Tr "packages.settings.delete"}}
|
|
</div>
|
|
<div class="content">
|
|
<div class="ui warning message gt-word-break">
|
|
{{ctx.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" .}}
|