diff --git a/app/views/users/admin_api_update.html.erb b/app/views/users/admin_api_update.html.erb index 33a717e..138e243 100644 --- a/app/views/users/admin_api_update.html.erb +++ b/app/views/users/admin_api_update.html.erb @@ -5,8 +5,8 @@ <%= raw t('org_admin.user_text_html')%> -<% @user_roles = current_user.organisation.user_org_roles %> -<% @user_roles = @user_roles.uniq_by {|u| u.user_id } %> +<% @users = current_user.organisation.users %> +<% #@user_roles = @user_roles.uniq_by {|u| u.user_id } %> @@ -22,30 +22,30 @@ <%= form_tag( admin_api_update_users_path, method: :put) do %> - <% @user_roles.each do |user_id| %> - <% if !user_id.user.nil? then%> + <% @users.each do |user| %> + <% if !user.nil? then%> <% if current_user.organisation.token_permission_types.count > 0 %> <% end %> diff --git a/app/views/users/admin_index.html.erb b/app/views/users/admin_index.html.erb index 33a717e..138e243 100644 --- a/app/views/users/admin_index.html.erb +++ b/app/views/users/admin_index.html.erb @@ -5,8 +5,8 @@ <%= raw t('org_admin.user_text_html')%> -<% @user_roles = current_user.organisation.user_org_roles %> -<% @user_roles = @user_roles.uniq_by {|u| u.user_id } %> +<% @users = current_user.organisation.users %> +<% #@user_roles = @user_roles.uniq_by {|u| u.user_id } %>
- <% if !user_id.user.name.nil? then%> - <%= user_id.user.name %> + <% if !user.name.nil? then%> + <%= user.name %> <% end %> - <%= user_id.user.email %> + <%= user.email %> - <% if !user_id.user.last_sign_in_at.nil? then%> - <%= l user_id.user.last_sign_in_at.to_date, :formats => :short %> + <% if !user.last_sign_in_at.nil? then%> + <%= l user.last_sign_in_at.to_date, :formats => :short %> <% end %> - <% if !user_id.user.project_groups.nil? then%> - <%= user_id.user.project_groups.count %> + <% if !user.project_groups.nil? then%> + <%= user.project_groups.count %> <% end %> - <%= check_box_tag "user_ids[]", user_id.user.id, user_id.user.api_token !="" %> + <%= check_box_tag "user_ids[]", user.id, user.api_token !="" %>
@@ -22,30 +22,30 @@ <%= form_tag( admin_api_update_users_path, method: :put) do %> - <% @user_roles.each do |user_id| %> - <% if !user_id.user.nil? then%> + <% @users.each do |user| %> + <% if !user.nil? then%> <% if current_user.organisation.token_permission_types.count > 0 %> <% end %>
- <% if !user_id.user.name.nil? then%> - <%= user_id.user.name %> + <% if !user.name.nil? then%> + <%= user.name %> <% end %> - <%= user_id.user.email %> + <%= user.email %> - <% if !user_id.user.last_sign_in_at.nil? then%> - <%= l user_id.user.last_sign_in_at.to_date, :formats => :short %> + <% if !user.last_sign_in_at.nil? then%> + <%= l user.last_sign_in_at.to_date, :formats => :short %> <% end %> - <% if !user_id.user.project_groups.nil? then%> - <%= user_id.user.project_groups.count %> + <% if !user.project_groups.nil? then%> + <%= user.project_groups.count %> <% end %> - <%= check_box_tag "user_ids[]", user_id.user.id, user_id.user.api_token !="" %> + <%= check_box_tag "user_ids[]", user.id, user.api_token !="" %>