diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/users/_user.html.erb | 17 | ||||
| -rw-r--r-- | app/views/users/index.html.erb | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb index ff9d4e37..ba82375d 100644 --- a/app/views/users/_user.html.erb +++ b/app/views/users/_user.html.erb | |||
| @@ -26,5 +26,22 @@ | |||
| 26 | <% end %> | 26 | <% end %> |
| 27 | <% end %> | 27 | <% end %> |
| 28 | </td> | 28 | </td> |
| 29 | <td> | ||
| 30 | <% if current_user.redaktion? && !user.alumni? %> | ||
| 31 | <% if user.redaktion? %> | ||
| 32 | <% unless user == current_user %> | ||
| 33 | <%= button_to t(".revoke_redaktion"), revoke_redaktion_user_path(user), method: :put, | ||
| 34 | form: { data: { confirm: t(".confirm_revoke_redaktion", :login => user.login) }, | ||
| 35 | class: 'button_to destructive' } %> | ||
| 36 | <% end %> | ||
| 37 | <% elsif user.otp_enrolled? %> | ||
| 38 | <%= button_to t(".grant_redaktion"), grant_redaktion_user_path(user), method: :put, | ||
| 39 | form: { data: { confirm: t(".confirm_grant_redaktion", :login => user.login) }, | ||
| 40 | class: 'button_to state_changing' } %> | ||
| 41 | <% else %> | ||
| 42 | <span class="field_hint"><%= t(".needs_otp") %></span> | ||
| 43 | <% end %> | ||
| 44 | <% end %> | ||
| 45 | </td> | ||
| 29 | </tr> | 46 | </tr> |
| 30 | <% end %> | 47 | <% end %> |
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 854811a2..2936bbea 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | <% end %> | 8 | <% end %> |
| 9 | <% end %> | 9 | <% end %> |
| 10 | </p> | 10 | </p> |
| 11 | <p class="field_hint"><%= t(".admin_hint") %></p> | ||
| 11 | 12 | ||
| 12 | <% UsersController::GROUP_ORDER.each do |group| %> | 13 | <% UsersController::GROUP_ORDER.each do |group| %> |
| 13 | <% members = @users[group] || [] %> | 14 | <% members = @users[group] || [] %> |
