Display users and invite on account/settings
This commit is contained in:
@@ -35,3 +35,4 @@
|
||||
/config/master.key
|
||||
|
||||
/config/credentials/*.key
|
||||
.DS_Store
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Accounts::SettingsController < ApplicationController
|
||||
def show
|
||||
@account = Account.sole
|
||||
@users = User.active
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,10 +6,6 @@ class UsersController < ApplicationController
|
||||
before_action :ensure_join_code_is_valid, only: %i[ new create ]
|
||||
before_action :ensure_permission_to_change_user, only: %i[ update destroy ]
|
||||
|
||||
def index
|
||||
@users = User.active
|
||||
end
|
||||
|
||||
def new
|
||||
@user = User.new
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-column align-center gap">
|
||||
<div class="flex flex-column align-center fill-shade pad border-radius gap">
|
||||
<% url = join_url(Account.sole.join_code) %>
|
||||
|
||||
<label class="flex flex-column gap full-width txt-align-center">
|
||||
@@ -17,6 +17,11 @@
|
||||
|
||||
<section class="panels--two-up margin-block">
|
||||
<div class="panel shadow center flex flex-column">
|
||||
<strong class="divider txt-large margin-block-end">People on the account</strong>
|
||||
<%= render "accounts/invite" %>
|
||||
<div class="flex flex-column gap margin-block-start">
|
||||
<%= render partial: "accounts/user", collection: @users %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel shadow center flex flex-column">
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<% @page_title = "People on the account" %>
|
||||
|
||||
<% content_for :header do %>
|
||||
<nav class="align-start">
|
||||
<%= link_to_home icon: "arrow-left", label: "Go back", class: "flex-item-justify-start" %>
|
||||
|
||||
<header class="flex flex-column center">
|
||||
<h1 class="txt-x-large"><%= @page_title %></h1>
|
||||
</header>
|
||||
|
||||
<%= link_to workflows_path, class: "btn flex-item-justify-end" do %>
|
||||
<%= icon_tag "bolt" %>
|
||||
<span class="for-screen-reader">Workflows</span>
|
||||
<% end %>
|
||||
</nav>
|
||||
<% end %>
|
||||
|
||||
<div class="panel borderless center pad fill-shade flex flex-column margin-block">
|
||||
<%= render "users/invite" %>
|
||||
</div>
|
||||
|
||||
<div class="panel borderless center pad fill-none flex flex-column gap">
|
||||
<%= render @users %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user