@@ -1,25 +1,97 @@ |
| 1 | 1 | {{ define "page" -}} |
| 2 | | -<section class="shithub-org-settings"> |
| 3 | | - <header class="shithub-org-profile-head"> |
| 4 | | - <h1>{{ .Org.DisplayName }} · Profile settings</h1> |
| 5 | | - <p class="shithub-meta">@{{ .Org.Slug }}</p> |
| 2 | +<section class="shithub-org-settings-page"> |
| 3 | + <header class="shithub-org-pagehead shithub-org-settings-pagehead"> |
| 4 | + <div class="shithub-org-pagehead-inner"> |
| 5 | + <a class="shithub-org-pagehead-title" href="/{{ .Org.Slug }}"> |
| 6 | + <img src="{{ .AvatarURL }}" alt="" width="30" height="30"> |
| 7 | + <span>{{ if .Org.DisplayName }}{{ .Org.DisplayName }}{{ else }}{{ .Org.Slug }}{{ end }}</span> |
| 8 | + </a> |
| 9 | + </div> |
| 10 | + <nav class="shithub-org-nav" aria-label="Organization"> |
| 11 | + <a href="/{{ .Org.Slug }}" class="shithub-org-nav-item">{{ octicon "home" }} Overview</a> |
| 12 | + <a href="/{{ .Org.Slug }}#org-repositories" class="shithub-org-nav-item">{{ octicon "repo" }} Repositories</a> |
| 13 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "table" }} Projects</span> |
| 14 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "package" }} Packages</span> |
| 15 | + <a href="/{{ .Org.Slug }}/teams" class="shithub-org-nav-item">{{ octicon "people" }} Teams</a> |
| 16 | + <a href="/{{ .Org.Slug }}/people" class="shithub-org-nav-item">{{ octicon "person" }} People</a> |
| 17 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "shield-check" }} Security and quality</span> |
| 18 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "pulse" }} Insights</span> |
| 19 | + <a href="/organizations/{{ .Org.Slug }}/settings/profile" class="shithub-org-nav-item is-active" aria-current="page">{{ octicon "gear" }} Settings</a> |
| 20 | + </nav> |
| 6 | 21 | </header> |
| 7 | 22 | |
| 23 | + <div class="shithub-org-settings-layout"> |
| 24 | + <aside class="shithub-org-settings-sidebar" aria-label="Organization settings"> |
| 25 | + <h1>Settings</h1> |
| 26 | + <nav class="shithub-org-settings-menu"> |
| 27 | + <a class="is-selected" href="/organizations/{{ .Org.Slug }}/settings/profile" aria-current="page">{{ octicon "organization" }} General</a> |
| 28 | + <span aria-disabled="true">{{ octicon "people" }} People</span> |
| 29 | + <span aria-disabled="true">{{ octicon "repo" }} Repository defaults</span> |
| 30 | + <span aria-disabled="true">{{ octicon "lock" }} Member privileges</span> |
| 31 | + <h2>Code, planning, and automation</h2> |
| 32 | + <span aria-disabled="true">{{ octicon "play" }} Actions</span> |
| 33 | + <span aria-disabled="true">{{ octicon "table" }} Projects</span> |
| 34 | + <span aria-disabled="true">{{ octicon "package" }} Packages</span> |
| 35 | + <h2>Security</h2> |
| 36 | + <span aria-disabled="true">{{ octicon "shield-check" }} Code security</span> |
| 37 | + <span aria-disabled="true">{{ octicon "globe" }} Domains</span> |
| 38 | + <h2>Access</h2> |
| 39 | + <span aria-disabled="true">{{ octicon "gear" }} Integrations</span> |
| 40 | + <span aria-disabled="true">{{ octicon "history" }} Audit log</span> |
| 41 | + </nav> |
| 42 | + </aside> |
| 43 | + |
| 44 | + <div class="shithub-org-settings-main"> |
| 8 | 45 | {{ with .Error }}<p class="shithub-flash shithub-flash-error" role="alert">{{ . }}</p>{{ end }} |
| 9 | 46 | {{ with .Success }}<p class="shithub-flash shithub-flash-success" role="status">{{ . }}</p>{{ end }} |
| 10 | 47 | |
| 11 | | - <section class="shithub-settings-section" aria-labelledby="org-avatar-heading"> |
| 12 | | - <h2 id="org-avatar-heading">Profile picture</h2> |
| 13 | | - <div class="shithub-profile-picture-settings"> |
| 14 | | - <img src="{{ .AvatarURL }}" alt="" class="shithub-profile-edit-avatar"> |
| 48 | + <div class="Subhead"> |
| 49 | + <h2 class="Subhead-heading Subhead-heading--large">General</h2> |
| 50 | + </div> |
| 51 | + |
| 52 | + <section class="shithub-org-settings-profile" aria-labelledby="org-profile-heading"> |
| 53 | + <h3 id="org-profile-heading" class="sr-only">Organization profile</h3> |
| 54 | + <div class="shithub-org-settings-profile-grid"> |
| 55 | + <form method="POST" action="/organizations/{{ .Org.Slug }}/settings/profile" class="shithub-org-settings-form" novalidate> |
| 56 | + <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 57 | + <label> |
| 58 | + <span>Organization display name</span> |
| 59 | + <input type="text" name="display_name" value="{{ .Form.DisplayName }}" maxlength="100" autocomplete="organization"> |
| 60 | + </label> |
| 61 | + <label> |
| 62 | + <span>Description</span> |
| 63 | + <textarea name="description" maxlength="350" rows="3">{{ .Form.Description }}</textarea> |
| 64 | + </label> |
| 65 | + <label> |
| 66 | + <span>URL</span> |
| 67 | + <input type="url" name="website" value="{{ .Form.Website }}" maxlength="200" placeholder="https://example.com" autocomplete="url"> |
| 68 | + </label> |
| 69 | + <label> |
| 70 | + <span>Location</span> |
| 71 | + <input type="text" name="location" value="{{ .Form.Location }}" maxlength="80" autocomplete="address-level2"> |
| 72 | + </label> |
| 73 | + <label> |
| 74 | + <span>Billing email <small>(Private)</small></span> |
| 75 | + <input type="email" name="billing_email" value="{{ .Form.BillingEmail }}" autocomplete="email"> |
| 76 | + </label> |
| 77 | + <label class="shithub-org-settings-checkbox"> |
| 78 | + <input type="checkbox" name="allow_member_repo_create" {{ if .Form.AllowMemberRepoCreate }}checked{{ end }}> |
| 79 | + <span>Allow members to create repositories for this organization</span> |
| 80 | + </label> |
| 81 | + <button type="submit" class="shithub-button shithub-button-primary">Update profile</button> |
| 82 | + </form> |
| 83 | + |
| 84 | + <aside class="shithub-org-settings-avatar" aria-labelledby="org-avatar-heading"> |
| 85 | + <h3 id="org-avatar-heading">Profile picture</h3> |
| 86 | + <img class="shithub-profile-edit-avatar" src="{{ .AvatarURL }}" alt="@{{ .Org.Slug }}" width="200" height="200"> |
| 15 | 87 | {{ if .AvatarUploadEnabled }} |
| 16 | 88 | <form method="POST" action="/organizations/{{ .Org.Slug }}/settings/profile/avatar" enctype="multipart/form-data" novalidate> |
| 17 | 89 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 18 | | - <label> |
| 90 | + <label class="shithub-profile-edit-upload"> |
| 19 | 91 | <span>Upload new picture</span> |
| 20 | 92 | <input type="file" name="avatar" accept="image/png,image/jpeg,image/gif" required> |
| 21 | 93 | </label> |
| 22 | | - <button type="submit" class="shithub-button shithub-button-primary">Upload</button> |
| 94 | + <button type="submit" class="shithub-button">Upload</button> |
| 23 | 95 | </form> |
| 24 | 96 | {{ if .HasAvatar }} |
| 25 | 97 | <form method="POST" action="/organizations/{{ .Org.Slug }}/settings/profile/avatar/remove" novalidate> |
@@ -28,9 +100,86 @@ |
| 28 | 100 | </form> |
| 29 | 101 | {{ end }} |
| 30 | 102 | {{ else }} |
| 31 | | - <p class="shithub-meta">Avatar uploads are disabled until object storage is configured.</p> |
| 103 | + <p class="shithub-empty-note">Avatar uploads are disabled until object storage is configured.</p> |
| 32 | 104 | {{ end }} |
| 105 | + <p class="shithub-empty-note">Use an image that clearly represents this organization.</p> |
| 106 | + </aside> |
| 33 | 107 | </div> |
| 34 | 108 | </section> |
| 109 | + |
| 110 | + <section class="shithub-org-settings-section" aria-labelledby="org-messaging-heading"> |
| 111 | + <div class="Subhead Subhead--spacious border-bottom-0 mb-0 tmp-mb-0"> |
| 112 | + <h2 id="org-messaging-heading" class="Subhead-heading Subhead-heading--large">In-product messages</h2> |
| 113 | + </div> |
| 114 | + <div class="shithub-org-settings-box"> |
| 115 | + <div class="shithub-org-settings-row"> |
| 116 | + <div> |
| 117 | + <strong>Promotions</strong> |
| 118 | + <p>Get product and event messages for this organization.</p> |
| 119 | + </div> |
| 120 | + <span class="ToggleSwitch ToggleSwitch--small ToggleSwitch--disabled"> |
| 121 | + <span class="ToggleSwitch-status"><span class="ToggleSwitch-statusOff">Off</span></span> |
| 122 | + <button type="button" class="ToggleSwitch-track" aria-label="Promotions" aria-pressed="false" disabled> |
| 123 | + <div aria-hidden="true" class="ToggleSwitch-icons"><div class="ToggleSwitch-lineIcon"></div><div class="ToggleSwitch-circleIcon"></div></div> |
| 124 | + <div class="ToggleSwitch-knob"></div> |
| 125 | + </button> |
| 126 | + </span> |
| 127 | + </div> |
| 128 | + <div class="shithub-org-settings-row"> |
| 129 | + <div> |
| 130 | + <strong>Tips</strong> |
| 131 | + <p>Get tips for features enabled in repositories owned by this organization.</p> |
| 132 | + </div> |
| 133 | + <span class="ToggleSwitch ToggleSwitch--small ToggleSwitch--disabled"> |
| 134 | + <span class="ToggleSwitch-status"><span class="ToggleSwitch-statusOff">Off</span></span> |
| 135 | + <button type="button" class="ToggleSwitch-track" aria-label="Tips" aria-pressed="false" disabled> |
| 136 | + <div aria-hidden="true" class="ToggleSwitch-icons"><div class="ToggleSwitch-lineIcon"></div><div class="ToggleSwitch-circleIcon"></div></div> |
| 137 | + <div class="ToggleSwitch-knob"></div> |
| 138 | + </button> |
| 139 | + </span> |
| 140 | + </div> |
| 141 | + </div> |
| 142 | + </section> |
| 143 | + |
| 144 | + <section class="shithub-org-settings-section" aria-labelledby="org-danger-heading"> |
| 145 | + <div class="Subhead Subhead--spacious border-bottom-0 mb-0 tmp-mb-0"> |
| 146 | + <h2 id="org-danger-heading" class="Subhead-heading Subhead-heading--large Subhead-heading--danger">Danger zone</h2> |
| 147 | + </div> |
| 148 | + <div class="Box Box--danger shithub-org-danger-box"> |
| 149 | + <div class="Box-row shithub-org-danger-row"> |
| 150 | + <div> |
| 151 | + <div class="listgroup-item-title">Rename organization</div> |
| 152 | + <div class="listgroup-item-body">Renaming your organization can have unintended side effects.</div> |
| 153 | + </div> |
| 154 | + <button type="button" class="shithub-button shithub-button-danger" disabled>Rename organization</button> |
| 155 | + </div> |
| 156 | + <div class="Box-row shithub-org-danger-row"> |
| 157 | + <div> |
| 158 | + <div class="listgroup-item-title">Archive this organization</div> |
| 159 | + <div class="listgroup-item-body">Only organizations that meet archive requirements can be archived.</div> |
| 160 | + </div> |
| 161 | + <button type="button" class="shithub-button" disabled>Archive organization</button> |
| 162 | + </div> |
| 163 | + <div class="Box-row shithub-org-danger-row"> |
| 164 | + <div> |
| 165 | + <div class="listgroup-item-title">Delete this organization</div> |
| 166 | + <div class="listgroup-item-body">Once deleted, it enters the configured recovery window before permanent removal.</div> |
| 167 | + </div> |
| 168 | + <details class="shithub-org-danger-details"> |
| 169 | + <summary class="shithub-button shithub-button-danger">Delete this organization</summary> |
| 170 | + <form method="POST" action="/organizations/{{ .Org.Slug }}/settings/delete" class="shithub-org-delete-form"> |
| 171 | + <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 172 | + <label> |
| 173 | + <span>Enter this organization's name to confirm</span> |
| 174 | + <input type="text" name="confirm_slug" required autocomplete="off" placeholder="{{ .Org.Slug }}"> |
| 175 | + </label> |
| 176 | + <button type="submit" class="shithub-button shithub-button-danger">Delete this organization</button> |
| 177 | + </form> |
| 178 | + </details> |
| 179 | + </div> |
| 180 | + </div> |
| 181 | + </section> |
| 182 | + </div> |
| 183 | + </div> |
| 35 | 184 | </section> |
| 36 | 185 | {{- end }} |