Scaffold out User (#20)

Reviewed-on: #20
This commit is contained in:
Andrew Tomaka 2024-07-26 23:24:54 -04:00
parent c23f58a6df
commit a70c656690
21 changed files with 309 additions and 2 deletions

View file

@ -0,0 +1,21 @@
<div class="w-full">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<% content_for :title, "Users" %>
<div class="flex justify-between items-center">
<h1 class="font-bold text-4xl">Users</h1>
<%= link_to "New user", new_user_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
</div>
<div id="users" class="min-w-full">
<% @users.each do |user| %>
<%= render user %>
<p>
<%= link_to "Show this user", user, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</p>
<% end %>
</div>
</div>