50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
<% content_for :title, "Freunde" %>
|
|
|
|
<div class="w-full notice">
|
|
<% if notice.present? %>
|
|
<p id="notice"><%= notice %></p>
|
|
<% end %>
|
|
|
|
<div class="flex justify-between items-center">
|
|
<h1 class="font-bold text-4xl">Freunde</h1>
|
|
<%= link_to "Neuer Freund", new_friend_path, class: "btn-new" %>
|
|
</div>
|
|
|
|
<table class="w-full">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>E-Mail</th>
|
|
<th>Telefon</th>
|
|
<th></th>
|
|
</thead>
|
|
<tbody>
|
|
<% @friends.each do | friend | %>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="friends" class="min-w-full divide-y divide-gray-200 space-y-5">
|
|
<% if @friends.any? %>
|
|
<% @friends.each do |friend| %>
|
|
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
|
|
<%= render friend %>
|
|
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
|
|
<%= link_to "Anzeigen", friend, class: "btn-show" %>
|
|
<%= link_to "Bearbeiten", edit_friend_path(friend), class: "btn-show" %>
|
|
<%= button_to "Löschen", friend, method: :delete, class: "btn-destroy", data: { turbo_confirm: "Sind Sie sich sicher?" } %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<p class="text-center my-10">Bisher kein Freund eingegeben.</p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|