tabletop-companion/app/views/tables/show.html.erb

39 lines
997 B
Plaintext
Raw Normal View History

2024-05-28 19:16:43 +00:00
<% content_for :title, @table.name %>
2024-06-13 16:04:25 +00:00
<%= link_to t(".invite_user"), new_table_table_invite_path(@table), data: { turbo_frame: "_top" } %>
<%= link_to t(".edit_table"), edit_table_path(@table), data: { turbo_frame: "_top" } %>
2024-05-28 19:16:43 +00:00
<dl>
<dt><%= t(".game_system") %>:</dt>
<dd><%= @table.game_system.name %></dd>
<dt><%= t(".owner") %>:</dt>
<dd><%= @table.owner.username %></dd>
</dl>
2024-05-29 15:47:31 +00:00
2024-06-05 17:49:34 +00:00
<h4><%= t(".characters") %></h4>
<% if @table.characters.any? %>
<ul><%= render @table.characters %></ul>
<% else %>
<p><%= t(".no_characters") %></p>
<% end %>
<h4><%= t(".users") %></h4>
<% if @table.users.any? %>
<ul>
<% @table.users.each do |user| %>
2024-06-13 16:04:25 +00:00
<li><%= link_to user.username, user, data: { turbo_frame: "_top" } %></li>
2024-06-05 17:49:34 +00:00
<% end %>
</ul>
<% else %>
<p><%= t(".no_users") %></p>
<% end %>
2024-05-29 15:47:31 +00:00
<% if @table_invites.any? %>
<h4>Pending invites</h4>
<ul>
<% @table_invites.each do |table_invite| %>
<li><%= table_invite.email %></li>
<% end %>
</ul>
<% end %>