diff options
author | Daniel Baumann <daniel@debian.org> | 2024-10-18 20:33:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-10-18 20:33:49 +0200 |
commit | dd136858f1ea40ad3c94191d647487fa4f31926c (patch) | |
tree | 58fec94a7b2a12510c9664b21793f1ed560c6518 /templates/org/settings | |
parent | Initial commit. (diff) | |
download | forgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.tar.xz forgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.zip |
Adding upstream version 9.0.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/org/settings')
-rw-r--r-- | templates/org/settings/actions.tmpl | 11 | ||||
-rw-r--r-- | templates/org/settings/applications.tmpl | 9 | ||||
-rw-r--r-- | templates/org/settings/applications_oauth2_edit.tmpl | 5 | ||||
-rw-r--r-- | templates/org/settings/blocked_users.tmpl | 21 | ||||
-rw-r--r-- | templates/org/settings/delete.tmpl | 35 | ||||
-rw-r--r-- | templates/org/settings/hook_new.tmpl | 7 | ||||
-rw-r--r-- | templates/org/settings/hooks.tmpl | 5 | ||||
-rw-r--r-- | templates/org/settings/labels.tmpl | 15 | ||||
-rw-r--r-- | templates/org/settings/layout_footer.tmpl | 11 | ||||
-rw-r--r-- | templates/org/settings/layout_head.tmpl | 14 | ||||
-rw-r--r-- | templates/org/settings/navbar.tmpl | 48 | ||||
-rw-r--r-- | templates/org/settings/options.tmpl | 102 | ||||
-rw-r--r-- | templates/org/settings/packages.tmpl | 6 | ||||
-rw-r--r-- | templates/org/settings/packages_cleanup_rules_edit.tmpl | 5 | ||||
-rw-r--r-- | templates/org/settings/packages_cleanup_rules_preview.tmpl | 5 | ||||
-rw-r--r-- | templates/org/settings/runners_edit.tmpl | 5 |
16 files changed, 304 insertions, 0 deletions
diff --git a/templates/org/settings/actions.tmpl b/templates/org/settings/actions.tmpl new file mode 100644 index 0000000..abb9c98 --- /dev/null +++ b/templates/org/settings/actions.tmpl @@ -0,0 +1,11 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings actions")}} + <div class="org-setting-content"> + {{if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{else if eq .PageType "secrets"}} + {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/applications.tmpl b/templates/org/settings/applications.tmpl new file mode 100644 index 0000000..df5f4e9 --- /dev/null +++ b/templates/org/settings/applications.tmpl @@ -0,0 +1,9 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} + <div class="org-setting-content"> + <h4 class="ui top attached header"> + {{ctx.Locale.Tr "settings.applications"}} + </h4> + + {{template "user/settings/applications_oauth2_list" .}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/applications_oauth2_edit.tmpl b/templates/org/settings/applications_oauth2_edit.tmpl new file mode 100644 index 0000000..987803a --- /dev/null +++ b/templates/org/settings/applications_oauth2_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} + <div class="org-setting-content"> + {{template "user/settings/applications_oauth2_edit_form" .}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/blocked_users.tmpl b/templates/org/settings/blocked_users.tmpl new file mode 100644 index 0000000..f685a1b --- /dev/null +++ b/templates/org/settings/blocked_users.tmpl @@ -0,0 +1,21 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings blocked-users")}} +<div class="org-setting-content"> + <div class="ui attached segment"> + <form class="ui form ignore-dirty tw-flex tw-flex-wrap tw-gap-2" action="{{$.Link}}/block" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="uid" value=""> + <div class="ui left"> + <div id="search-user-box" class="ui search"> + <div class="ui input"> + <input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required> + </div> + </div> + </div> + <button type="submit" class="ui red button">{{ctx.Locale.Tr "user.block"}}</button> + </form> + </div> + <div class="ui attached segment"> + {{template "shared/blocked_users_list" .}} + </div> +</div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl new file mode 100644 index 0000000..e1ef471 --- /dev/null +++ b/templates/org/settings/delete.tmpl @@ -0,0 +1,35 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings delete")}} + + <div class="org-setting-content"> + <h4 class="ui top attached error header"> + {{ctx.Locale.Tr "org.settings.delete_account"}} + </h4> + <div class="ui attached error segment"> + <div class="ui red message"> + <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt"}}</p> + </div> + <form class="ui form ignore-dirty" id="delete-form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <div class="inline required field {{if .Err_OrgName}}error{{end}}"> + <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label> + <input id="org_name" name="org_name" value="" autocomplete="off" autofocus required> + </div> + <button class="ui red button delete-button" data-type="form" data-form="#delete-form"> + {{ctx.Locale.Tr "org.settings.confirm_delete_account"}} + </button> + </form> + </div> + </div> + +<div class="ui g-modal-confirm delete modal"> + <div class="header"> + {{svg "octicon-trash"}} + {{ctx.Locale.Tr "org.settings.delete_org_title"}} + </div> + <div class="content"> + <p>{{ctx.Locale.Tr "org.settings.delete_org_desc"}}</p> + </div> + {{template "base/modal_actions_confirm" .}} +</div> + +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl new file mode 100644 index 0000000..f89ee5f --- /dev/null +++ b/templates/org/settings/hook_new.tmpl @@ -0,0 +1,7 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}} + <div class="org-setting-content"> + {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/hooks.tmpl b/templates/org/settings/hooks.tmpl new file mode 100644 index 0000000..9f30796 --- /dev/null +++ b/templates/org/settings/hooks.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings webhooks")}} + <div class="org-setting-content"> + {{template "repo/settings/webhook/list" .}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl new file mode 100644 index 0000000..25a562c --- /dev/null +++ b/templates/org/settings/labels.tmpl @@ -0,0 +1,15 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}} + <div class="org-setting-content"> + <div class="tw-flex tw-items-center"> + <div class="tw-flex-1"> + {{ctx.Locale.Tr "org.settings.labels_desc"}} + </div> + <button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button> + </div> + <div class="divider"></div> + {{template "repo/issue/labels/label_new" .}} + {{template "repo/issue/labels/label_list" .}} + </div> +{{template "repo/issue/labels/edit_delete_label" .}} +{{template "org/settings/layout_footer" .}} + diff --git a/templates/org/settings/layout_footer.tmpl b/templates/org/settings/layout_footer.tmpl new file mode 100644 index 0000000..09d88c0 --- /dev/null +++ b/templates/org/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +<div class="page-content"> + <div class="org-layout-right"> + <div> + {{/* block: org-setting-content */}} +{{end}} + + </div> + </div> +</div> +{{template "base/footer" .}} diff --git a/templates/org/settings/layout_head.tmpl b/templates/org/settings/layout_head.tmpl new file mode 100644 index 0000000..31dad2c --- /dev/null +++ b/templates/org/settings/layout_head.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .ctxData}} +<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}"> + {{template "org/header" .ctxData}} + <div class="ui container flex-container"> + {{template "org/settings/navbar" .ctxData}} + <div class="flex-container-main"> + {{template "base/alert" .ctxData}} + {{/* block: org-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} + </div> + </div> +</div> +{{end}} diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl new file mode 100644 index 0000000..b245768 --- /dev/null +++ b/templates/org/settings/navbar.tmpl @@ -0,0 +1,48 @@ +<div class="flex-container-nav"> + <div class="ui fluid vertical menu"> + <div class="header item">{{ctx.Locale.Tr "org.settings"}}</div> + <a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.OrgLink}}/settings"> + {{ctx.Locale.Tr "org.settings.options"}} + </a> + {{if not DisableWebhooks}} + <a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.OrgLink}}/settings/hooks"> + {{ctx.Locale.Tr "repo.settings.hooks"}} + </a> + {{end}} + <a class="{{if .PageIsOrgSettingsLabels}}active {{end}}item" href="{{.OrgLink}}/settings/labels"> + {{ctx.Locale.Tr "repo.labels"}} + </a> + {{if .EnableOAuth2}} + <a class="{{if .PageIsSettingsApplications}}active {{end}}item" href="{{.OrgLink}}/settings/applications"> + {{ctx.Locale.Tr "settings.applications"}} + </a> + {{end}} + {{if .EnablePackages}} + <a class="{{if .PageIsSettingsPackages}}active {{end}}item" href="{{.OrgLink}}/settings/packages"> + {{ctx.Locale.Tr "packages.title"}} + </a> + {{end}} + {{if .EnableActions}} + <details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}> + <summary>{{ctx.Locale.Tr "actions.actions"}}</summary> + <div class="menu"> + <a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.OrgLink}}/settings/actions/runners"> + {{ctx.Locale.Tr "actions.runners"}} + </a> + <a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.OrgLink}}/settings/actions/secrets"> + {{ctx.Locale.Tr "secrets.secrets"}} + </a> + <a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.OrgLink}}/settings/actions/variables"> + {{ctx.Locale.Tr "actions.variables"}} + </a> + </div> + </details> + {{end}} + <a class="{{if .PageIsSettingsBlockedUsers}}active {{end}}item" href="{{.OrgLink}}/settings/blocked_users"> + {{ctx.Locale.Tr "settings.blocked_users"}} + </a> + <a class="{{if .PageIsSettingsDelete}}active {{end}}item" href="{{.OrgLink}}/settings/delete"> + {{ctx.Locale.Tr "org.settings.delete"}} + </a> + </div> +</div> diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl new file mode 100644 index 0000000..62debfc --- /dev/null +++ b/templates/org/settings/options.tmpl @@ -0,0 +1,102 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} + <div class="org-setting-content"> + <h4 class="ui top attached header"> + {{ctx.Locale.Tr "org.settings.options"}} + </h4> + <div class="ui attached segment"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <div class="required field {{if .Err_Name}}error{{end}}"> + <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}} + <span class="text red tw-hidden" id="org-name-change-prompt"> + <br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}} + </span> + </label> + <input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required maxlength="40"> + </div> + <div class="field {{if .Err_FullName}}error{{end}}"> + <label for="full_name">{{ctx.Locale.Tr "org.org_full_name_holder"}}</label> + <input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100"> + </div> + <div class="field {{if .Err_Email}}error{{end}}"> + <label for="email">{{ctx.Locale.Tr "org.settings.email"}}</label> + <input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255"> + </div> + <div class="field {{if .Err_Description}}error{{end}}"> + <label for="description">{{ctx.Locale.Tr "org.org_desc"}}</label> + <textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea> + </div> + <div class="field {{if .Err_Website}}error{{end}}"> + <label for="website">{{ctx.Locale.Tr "org.settings.website"}}</label> + <input id="website" name="website" type="url" value="{{.Org.Website}}" maxlength="255"> + </div> + <div class="field"> + <label for="location">{{ctx.Locale.Tr "org.settings.location"}}</label> + <input id="location" name="location" value="{{.Org.Location}}" maxlength="50"> + </div> + + <div class="divider"></div> + <div class="field" id="visibility_box"> + <label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label> + <div class="field"> + <div class="ui radio checkbox"> + <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}> + <label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label> + </div> + </div> + <div class="field"> + <div class="ui radio checkbox"> + <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}> + <label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label> + </div> + </div> + <div class="field"> + <div class="ui radio checkbox"> + <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}> + <label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label> + </div> + </div> + </div> + + <div class="field" id="permission_box"> + <label>{{ctx.Locale.Tr "org.settings.permission"}}</label> + <div class="field"> + <div class="ui checkbox"> + <input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}> + <label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label> + </div> + </div> + </div> + + {{if .SignedUser.IsAdmin}} + <div class="divider"></div> + + <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}"> + <label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label> + <input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}"> + <p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p> + </div> + {{end}} + + <div class="field"> + <button class="ui primary button">{{ctx.Locale.Tr "org.settings.update_settings"}}</button> + </div> + </form> + + <div class="divider"></div> + + <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data"> + {{.CsrfTokenHtml}} + <div class="inline field"> + <label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label> + <input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp"> + </div> + + <div class="field"> + <button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button> + <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button> + </div> + </form> + </div> + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages.tmpl b/templates/org/settings/packages.tmpl new file mode 100644 index 0000000..91106c3 --- /dev/null +++ b/templates/org/settings/packages.tmpl @@ -0,0 +1,6 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} + <div class="org-setting-content"> + {{template "package/shared/cleanup_rules/list" .}} + {{template "package/shared/cargo" .}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages_cleanup_rules_edit.tmpl b/templates/org/settings/packages_cleanup_rules_edit.tmpl new file mode 100644 index 0000000..ff4c2dd --- /dev/null +++ b/templates/org/settings/packages_cleanup_rules_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} + <div class="org-setting-content"> + {{template "package/shared/cleanup_rules/edit" .}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages_cleanup_rules_preview.tmpl b/templates/org/settings/packages_cleanup_rules_preview.tmpl new file mode 100644 index 0000000..5a2f061 --- /dev/null +++ b/templates/org/settings/packages_cleanup_rules_preview.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} + <div class="org-setting-content"> + {{template "package/shared/cleanup_rules/preview" .}} + </div> +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/runners_edit.tmpl b/templates/org/settings/runners_edit.tmpl new file mode 100644 index 0000000..acd67a4 --- /dev/null +++ b/templates/org/settings/runners_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings runners")}} + <div class="org-setting-content"> + {{template "shared/actions/runner_edit" .}} + </div> +{{template "org/settings/layout_footer" .}} |