mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-05 18:51:03 +02:00
134e86c78c
Purpose: 1. Make the whole code base have unified "item" layout 2. Clarify our "list" styles: "flex-relaxed-list", "flex-divided-list" 3. Prepare to replace legacy "ui relaxed list" * https://github.com/go-gitea/gitea/pull/37445#discussion_r3144458865 4. Prepare for refactoring the "pull merge box", it needs the "flex-divided-list" * related to "Refactor pull request view (*)" like #37451 5. Fix legacy abuses of "flex-list", e.g.: repo home sidebar
101 lines
4.0 KiB
Go HTML Template
101 lines
4.0 KiB
Go HTML Template
{{$isActionsEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeActions}}
|
|
<div class="repo-setting-content">
|
|
<!-- Enable/Disable Actions Section (First) -->
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "actions.general.enable_actions"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form" action="{{.Link}}/actions_unit" method="post">
|
|
{{$isActionsGlobalDisabled := ctx.Consts.RepoUnitTypeActions.UnitGlobalDisabled}}
|
|
<div class="inline field">
|
|
<label>{{ctx.Locale.Tr "actions.actions"}}</label>
|
|
<div class="ui checkbox{{if $isActionsGlobalDisabled}} disabled{{end}}"{{if $isActionsGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
|
|
<input name="enable_actions" type="checkbox" {{if $isActionsGlobalDisabled}}disabled{{end}} {{if $isActionsEnabled}}checked{{end}}>
|
|
<label>{{ctx.Locale.Tr "repo.settings.actions_desc"}}</label>
|
|
</div>
|
|
</div>
|
|
{{if not $isActionsGlobalDisabled}}
|
|
<div class="divider"></div>
|
|
<div class="field">
|
|
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
|
|
</div>
|
|
{{end}}
|
|
</form>
|
|
</div>
|
|
|
|
{{if $isActionsEnabled}}
|
|
<!-- Token Permissions Section -->
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "actions.general.permissions"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form" action="{{.RepoLink}}/settings/actions/general/token_permissions" method="post" data-global-init="initRepoActionsPermissionsForm">
|
|
<!-- Override Owner Configuration -->
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" name="override_owner_config" {{if .OverrideOwnerConfig}}checked{{end}}>
|
|
<label><strong>{{ctx.Locale.Tr "actions.general.token_permissions.override_owner"}}</strong></label>
|
|
</div>
|
|
<div class="help">{{ctx.Locale.Tr "actions.general.token_permissions.override_owner_desc"}}</div>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="field js-repo-token-permissions-config">
|
|
{{template "shared/actions/permission_mode_select" .}}
|
|
<div class="divider"></div>
|
|
{{template "shared/actions/permissions_table" .}}
|
|
</div>
|
|
|
|
<div class="field">
|
|
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if $isActionsEnabled}}
|
|
{{if .Repository.IsPrivate}}
|
|
<!-- Collaborative Owners Section -->
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "actions.general.collaborative_owners_management"}}
|
|
</h4>
|
|
{{if len .CollaborativeOwners}}
|
|
<div class="ui attached segment">
|
|
<div class="flex-divided-list items-with-main">
|
|
{{range .CollaborativeOwners}}
|
|
<div class="item tw-items-center">
|
|
<div class="item-leading">
|
|
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
|
|
</div>
|
|
<div class="item-main">
|
|
<div class="item-title">
|
|
{{template "shared/user/name" .}}
|
|
</div>
|
|
</div>
|
|
<div class="item-trailing">
|
|
<button class="ui red tiny button inline link-action"
|
|
data-url="{{$.Link}}/collaborative_owner/delete?id={{.ID}}"
|
|
data-modal-confirm-header="{{ctx.Locale.Tr "actions.general.remove_collaborative_owner"}}"
|
|
data-modal-confirm-content="{{ctx.Locale.Tr "actions.general.remove_collaborative_owner_desc"}}"
|
|
>{{ctx.Locale.Tr "remove"}}</button>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
<div class="ui bottom attached segment">
|
|
<form class="ui form form-fetch-action" action="{{.Link}}/collaborative_owner/add" method="post">
|
|
<div id="search-user-box" class="ui search input tw-align-middle" data-include-orgs="true">
|
|
<input class="prompt" name="collaborative_owner" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" autofocus required>
|
|
</div>
|
|
<button class="ui primary button">{{ctx.Locale.Tr "actions.general.add_collaborative_owner"}}</button>
|
|
</form>
|
|
<br>
|
|
{{ctx.Locale.Tr "actions.general.collaborative_owners_management_help"}}
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|