5 changed files with 38 additions and 4 deletions
@ -1,7 +1,18 @@
|
||||
class OrganisationsController < ApplicationController |
||||
before_action :authenticate_user! |
||||
before_action :find_organisation |
||||
|
||||
def show |
||||
def details |
||||
render "details" |
||||
end |
||||
|
||||
def users |
||||
render "users" |
||||
end |
||||
|
||||
private |
||||
|
||||
def find_organisation |
||||
@organisation = Organisation.find(params[:id]) |
||||
end |
||||
end |
||||
|
@ -0,0 +1,18 @@
|
||||
<%= govuk_table do |table| %> |
||||
<%= table.head do |head| %> |
||||
<%= head.row do |row| |
||||
row.cell(header: true, text: "Name and email adress") |
||||
row.cell(header: true, text: "Organisation and role") |
||||
row.cell(header: true, text: "Last logged in") |
||||
end %> |
||||
<% end %> |
||||
<% @organisation.users.each do |user| %> |
||||
<%= table.body do |body| %> |
||||
<%= body.row do |row| |
||||
row.cell(text: simple_format(user.name_email_display, {}, wrapper_tag: "div")) |
||||
row.cell(text: simple_format(user.org_role_display, {}, wrapper_tag: "div")) |
||||
row.cell(text: user.last_sign_in_at_display ) |
||||
end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
Loading…
Reference in new issue