|
1 | 1 | {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}} |
2 | 2 | <div class="repo-setting-content"> |
3 | | - {{$paNotSet := "not-set"}} |
4 | | - {{$paAnonymousRead := "anonymous-read"}} |
5 | | - {{$paEveryoneRead := "everyone-read"}} |
6 | | - {{$paEveryoneWrite := "everyone-write"}} |
7 | | - <form class="ui form" method="post"> |
8 | | - {{.CsrfTokenHtml}} |
9 | | - <table class="ui table unstackable tw-my-2"> |
10 | | - <tr> |
11 | | - <th></th> |
12 | | - <th>{{ctx.Locale.Tr "settings.permission_not_set"}}</th> |
13 | | - <th>{{ctx.Locale.Tr "settings.permission_anonymous_read"}} |
14 | | - <span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "settings.permission_anonymous_read_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th> |
15 | | - <th>{{ctx.Locale.Tr "settings.permission_everyone_read"}} |
16 | | - <span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "settings.permission_everyone_read_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th> |
17 | | - <th>{{ctx.Locale.Tr "settings.permission_everyone_write"}} |
18 | | - <span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "settings.permission_everyone_write_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th> |
19 | | - </tr> |
20 | | - {{range $ua := .RepoUnitPublicAccesses}} |
| 3 | + <h4 class="ui top attached header"> |
| 4 | + {{ctx.Locale.Tr "repo.settings.public_access"}} |
| 5 | + </h4> |
| 6 | + <div class="ui attached segment"> |
| 7 | + <p> |
| 8 | + {{ctx.Locale.Tr "repo.settings.public_access_desc"}} |
| 9 | + </p> |
| 10 | + {{$paNotSet := "not-set"}} |
| 11 | + {{$paAnonymousRead := "anonymous-read"}} |
| 12 | + {{$paEveryoneRead := "everyone-read"}} |
| 13 | + {{$paEveryoneWrite := "everyone-write"}} |
| 14 | + <form class="ui form" method="post"> |
| 15 | + {{.CsrfTokenHtml}} |
| 16 | + <table class="ui table unstackable tw-my-2"> |
21 | 17 | <tr> |
22 | | - <td>{{$ua.DisplayName}}</td> |
23 | | - <td class="tw-text-center"><label><input type="radio" name="{{$ua.FormKey}}" value="{{$paNotSet}}" {{Iif (eq $paNotSet $ua.UnitPublicAccess) "checked"}}></label></td> |
24 | | - <td class="tw-text-center"><label><input type="radio" name="{{$ua.FormKey}}" value="{{$paAnonymousRead}}" {{Iif (eq $paAnonymousRead $ua.UnitPublicAccess) "checked"}}></label></td> |
25 | | - <td class="tw-text-center"><label><input type="radio" name="{{$ua.FormKey}}" value="{{$paEveryoneRead}}" {{Iif (eq $paEveryoneRead $ua.UnitPublicAccess) "checked"}}></label></td> |
26 | | - <td class="tw-text-center"> |
27 | | - {{if SliceUtils.Contains $ua.PublicAccessTypes $paEveryoneWrite}} |
28 | | - <label><input type="radio" name="{{$ua.FormKey}}" value="{{$paEveryoneWrite}}" {{Iif (eq $paEveryoneWrite $ua.UnitPublicAccess) "checked"}}></label> |
29 | | - {{else}} |
30 | | - - |
31 | | - {{end}} |
32 | | - </td> |
| 18 | + <th></th> |
| 19 | + <th>{{ctx.Locale.Tr "settings.permission_not_set"}}</th> |
| 20 | + <th>{{ctx.Locale.Tr "settings.permission_anonymous_read"}} |
| 21 | + <span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "settings.permission_anonymous_read_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th> |
| 22 | + <th>{{ctx.Locale.Tr "settings.permission_everyone_read"}} |
| 23 | + <span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "settings.permission_everyone_read_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th> |
| 24 | + <th>{{ctx.Locale.Tr "settings.permission_everyone_write"}} |
| 25 | + <span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "settings.permission_everyone_write_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th> |
33 | 26 | </tr> |
34 | | - {{end}} |
35 | | - </table> |
36 | | - <button class="ui primary button {{if .GlobalForcePrivate}}disabled{{end}}">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button> |
37 | | - </form> |
| 27 | + {{range $ua := .RepoUnitPublicAccesses}} |
| 28 | + <tr> |
| 29 | + <td>{{$ua.DisplayName}}</td> |
| 30 | + <td class="tw-text-center"><label><input type="radio" name="{{$ua.FormKey}}" value="{{$paNotSet}}" {{Iif (eq $paNotSet $ua.UnitPublicAccess) "checked"}}></label></td> |
| 31 | + <td class="tw-text-center"><label><input type="radio" name="{{$ua.FormKey}}" value="{{$paAnonymousRead}}" {{Iif (eq $paAnonymousRead $ua.UnitPublicAccess) "checked"}}></label></td> |
| 32 | + <td class="tw-text-center"><label><input type="radio" name="{{$ua.FormKey}}" value="{{$paEveryoneRead}}" {{Iif (eq $paEveryoneRead $ua.UnitPublicAccess) "checked"}}></label></td> |
| 33 | + <td class="tw-text-center"> |
| 34 | + {{if SliceUtils.Contains $ua.PublicAccessTypes $paEveryoneWrite}} |
| 35 | + <label><input type="radio" name="{{$ua.FormKey}}" value="{{$paEveryoneWrite}}" {{Iif (eq $paEveryoneWrite $ua.UnitPublicAccess) "checked"}}></label> |
| 36 | + {{else}} |
| 37 | + - |
| 38 | + {{end}} |
| 39 | + </td> |
| 40 | + </tr> |
| 41 | + {{end}} |
| 42 | + </table> |
| 43 | + <button class="ui primary button {{if .GlobalForcePrivate}}disabled{{end}}">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button> |
| 44 | + </form> |
| 45 | + </div> |
38 | 46 | </div> |
39 | 47 | {{template "repo/settings/layout_footer" .}} |
0 commit comments