Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to set default and global disabled repository units. #8788

Merged
merged 16 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Indicate disabled units in team settings.
  • Loading branch information
davidsvantesson committed Jan 13, 2020
commit 9fdd5871599fa2dca1befdc937cab9f87051532c
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,7 @@ team_desc_helper = Describe the purpose or role of the team.
team_access_desc = Repository access
team_permission_desc = Permission
team_unit_desc = Allow Access to Repository Sections
team_unit_disabled = (Disabled)

form.name_reserved = The organization name '%s' is reserved.
form.name_pattern_not_allowed = The pattern '%s' is not allowed in an organization name.
Expand Down
6 changes: 5 additions & 1 deletion templates/org/team/new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@
<label>{{.i18n.Tr "org.team_unit_desc"}}</label>
<br>
{{range $t, $unit := $.Units}}
{{if $unit.Type.UnitGlobalDisabled}}
<div class="field poping up" data-content="{{$.i18n.Tr "repo.unit_disabled"}}">
{{else}}
<div class="field">
{{end}}
<div class="ui toggle checkbox">
<input type="checkbox" class="hidden" name="units" value="{{$unit.Type.Value}}"{{if or (eq $.Team.ID 0) ($.Team.UnitEnabled $unit.Type)}} checked{{end}}>
<label>{{$.i18n.Tr $unit.NameKey}}</label>
<label>{{$.i18n.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.i18n.Tr "org.team_unit_disabled"}}{{end}}</label>
<span class="help">{{$.i18n.Tr $unit.DescKey}}</span>
</div>
</div>
Expand Down