* Initial invitation work * Add more invitation code * Add proper registration page * Fix up tests * Fix failings * Fix spec * Add self-serve auth config * Add registered condition * Change profile image call and registered_at test * Change comment * Fix copy test * Stub emojipedia * Linting * Add registered at to factory * Ensure registered for user tag * Update app/views/internal/invitations/index.html.erb Co-authored-by: Michael Kohl <citizen428@dev.to> * Update app/controllers/internal/invitations_controller.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * Slight changes * Update recover password flow * Update app/views/internal/invitations/index.html.erb Co-authored-by: Michael Kohl <citizen428@dev.to> * Update app/controllers/internal/invitations_controller.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * Update db/schema.rb Co-authored-by: Michael Kohl <citizen428@dev.to>
62 lines
2.2 KiB
Text
62 lines
2.2 KiB
Text
<div class="row my-3">
|
|
<div class="col-8">
|
|
<ul class="nav nav-pills">
|
|
<li class="nav-item">
|
|
<%= link_to "All", internal_users_path, class: "nav-link #{'active' if params[:role].blank?}" %>
|
|
</li>
|
|
<li class="nav-item">
|
|
<%= link_to "Admins", internal_users_path(role: :admin), class: "nav-link #{'active' if params[:role] == 'admin'}" %>
|
|
</li>
|
|
<li class="nav-item">
|
|
<%= link_to "Super Admins", internal_users_path(role: :super_admin), class: "nav-link #{'active' if params[:role] == 'super_admin'}" %>
|
|
</li>
|
|
<li class="nav-item">
|
|
<%= link_to "Trusted", internal_users_path(role: :trusted), class: "nav-link #{'active' if params[:role] == 'trusted'}" %>
|
|
</li>
|
|
<li class="nav-item">
|
|
<%= link_to "Tag Mods", internal_users_path(role: :tag_moderator), class: "nav-link #{'active' if params[:role] == 'tag_moderator'}" %>
|
|
</li>
|
|
<li class="nav-item">
|
|
<%= link_to "Invitations", internal_invitations_path, class: "nav-link" %>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col">
|
|
<%= form_with url: internal_users_path, method: :get, local: true, class: "form-inline justify-content-end" do |f| %>
|
|
<div class="form-group mx-sm-3">
|
|
<%= f.text_field :search, value: params[:search], class: "form-control" %>
|
|
<%= f.hidden_field :role, value: params[:role] if params[:role].present? %>
|
|
</div>
|
|
<%= f.submit "Search", class: "btn btn-light" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= paginate @users, theme: "internal" %>
|
|
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">User</th>
|
|
<th scope="col">ID</th>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">Twitter</th>
|
|
<th scope="col">GitHub</th>
|
|
<th scope="col">Email</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @users.each do |user| %>
|
|
<tr>
|
|
<td><%= link_to user.username, internal_user_path(user) %></td>
|
|
<td><%= user.id %></td>
|
|
<td><%= user.name %></td>
|
|
<td><%= user_twitter_link(user) %></td>
|
|
<td><%= user_github_link(user) %></td>
|
|
<td><%= user.email %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate @users, theme: "internal" %>
|