|
89 | 89 | </thead> |
90 | 90 | <tbody> |
91 | 91 | {{range $t, $unit := $.Units}} |
92 | | - <tr> |
93 | | - <td> |
94 | | - {{if $unit.Type.UnitGlobalDisabled}} |
95 | | - <div class="field tooltip" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"> |
96 | | - {{else}} |
97 | | - <div class="field"> |
98 | | - {{end}} |
99 | | - <div class="ui"> |
100 | | - <label>{{$.i18n.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.i18n.Tr "org.team_unit_disabled"}}{{end}}</label> |
101 | | - <span class="help">{{$.i18n.Tr $unit.DescKey}}</span> |
| 92 | + <tr> |
| 93 | + <td> |
| 94 | + {{if $unit.Type.UnitGlobalDisabled}} |
| 95 | + <div class="field tooltip" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"> |
| 96 | + {{else}} |
| 97 | + <div class="field"> |
| 98 | + {{end}} |
| 99 | + <div class="ui"> |
| 100 | + <label>{{$.i18n.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.i18n.Tr "org.team_unit_disabled"}}{{end}}</label> |
| 101 | + <span class="help">{{$.i18n.Tr $unit.DescKey}}</span> |
| 102 | + </div> |
102 | 103 | </div> |
103 | | - </div> |
104 | | - </td> |
105 | | - <td class="center aligned"> |
106 | | - <div class="ui radio checkbox"> |
107 | | - <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if (eq ($.Team.UnitAccessMode $unit.Type) 0)}} checked{{end}}> |
108 | | - </div> |
109 | | - </td> |
110 | | - <td class="center aligned"> |
111 | | - <div class="ui radio checkbox"> |
112 | | - <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1)}} checked{{end}}> |
113 | | - </div> |
114 | | - </td> |
115 | | - <td class="center aligned"> |
116 | | - <div class="ui radio checkbox"> |
117 | | - <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $unit.Type) 2)}} checked{{end}}> |
118 | | - </div> |
119 | | - </td> |
120 | | - </tr> |
| 104 | + </td> |
| 105 | + <td class="center aligned"> |
| 106 | + <div class="ui radio checkbox"> |
| 107 | + <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $unit.Type) 0)}} checked{{end}}> |
| 108 | + </div> |
| 109 | + </td> |
| 110 | + <td class="center aligned"> |
| 111 | + <div class="ui radio checkbox"> |
| 112 | + <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> |
| 113 | + </div> |
| 114 | + </td> |
| 115 | + <td class="center aligned"> |
| 116 | + {{if ge $unit.MaxPerms 2}} |
| 117 | + <div class="ui radio checkbox"> |
| 118 | + <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> |
| 119 | + </div> |
| 120 | + {{end}} |
| 121 | + </td> |
| 122 | + </tr> |
121 | 123 | {{end}} |
122 | 124 | </tbody> |
123 | 125 | </table> |
|
0 commit comments