diff --git a/app/views/organisation_users/admin_index.html.erb b/app/views/organisation_users/admin_index.html.erb index da08365..1418cf9 100644 --- a/app/views/organisation_users/admin_index.html.erb +++ b/app/views/organisation_users/admin_index.html.erb @@ -1,55 +1,64 @@ <%= stylesheet_link_tag "admin" %>

- <%= t('org_admin.users_list') %> + <%= t('org_admin.users_list') %>

<%= 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 } %> - - - - - - - - - - - - - <% @user_roles.each do |user_id| %> - <% if !user_id.user.nil? then%> - - - - - - - - <%end%> - <% end %> - -
<%= t('org_admin.user_full_name') %><%= t('org_admin.user_name') %><%= t('org_admin.last_logged_in') %><%= t('org_admin.how_many_plans') %><%= t('org_admin.api_privleges') %>
- <% if !user_id.user.name.nil? then%> - <%= user_id.user.name %> - <%end%> - - <%= user_id.user.email %> - - <% if !user_id.user.last_sign_in_at.nil? then%> - <%= l user_id.user.last_sign_in_at.to_date, :formats => :short %> - <%end%> - - <% if !user_id.user.project_groups.nil? then%> - <%= user_id.user.project_groups.count %> - <%end%> - - #if the organisation has any api permissions - #show tickboxes which allow for users to have api_tokens - # if the user has an api_token, the tickbox is shown as ticked - # upon hitting save, - # any user which previously had an apitoken, but no longer has a check, looses their token - # any user which perviously had no apitoken, and now has a check, gains a token, and gets sent an email -
+<% @user_roles = @user_roles.uniq_by {|u| u.user_id } %> + + + + + + + + <% if current_user.organisation.token_permission_types.count > 0 %> + + <% end %> + + + <% form_tag admin_index_organisation_users_path, method: :put do %> + + <% @user_roles.each do |user_id| %> + <% if !user_id.user.nil? then%> + + + + + + <% if current_user.organisation.token_permission_types.count > 0 %> + + <% end %> + + <% end %> + <% end %> + + <%= submit_tag "Update API Privleges" %> + <% end %> +
<%= t('org_admin.user_full_name') %><%= t('org_admin.user_name') %><%= t('org_admin.last_logged_in') %><%= t('org_admin.how_many_plans') %><%= t('org_admin.api_privleges') %>
+ <% if !user_id.user.name.nil? then%> + <%= user_id.user.name %> + <% end %> + + <%= user_id.user.email %> + + <% if !user_id.user.last_sign_in_at.nil? then%> + <%= l user_id.user.last_sign_in_at.to_date, :formats => :short %> + <% end %> + + <% if !user_id.user.project_groups.nil? then%> + <%= user_id.user.project_groups.count %> + <% end %> + + <%= check_box_tag "user_ids[]", user_id %> + +
\ No newline at end of file