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

39 lines
997 B
Plaintext

<% content_for :title, @table.name %>
<%= 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" } %>
<dl>
<dt><%= t(".game_system") %>:</dt>
<dd><%= @table.game_system.name %></dd>
<dt><%= t(".owner") %>:</dt>
<dd><%= @table.owner.username %></dd>
</dl>
<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| %>
<li><%= link_to user.username, user, data: { turbo_frame: "_top" } %></li>
<% end %>
</ul>
<% else %>
<p><%= t(".no_users") %></p>
<% end %>
<% if @table_invites.any? %>
<h4>Pending invites</h4>
<ul>
<% @table_invites.each do |table_invite| %>
<li><%= table_invite.email %></li>
<% end %>
</ul>
<% end %>