tabletop-companion/app/views/layouts/table.html.erb

27 lines
917 B
Plaintext

<%= content_for :header_content do %>
<ul id="table-notifications"></ul>
<% end %>
<% content_for :submenu do %>
<%= turbo_stream_from @table %>
<h2><%= @table.name %></h2>
<nav class="table-tabs">
<ul>
<li><%= link_to t(".overview"), @table, class: class_names(active: params[:controller] == "tables") %></li>
<% @characters.each do |character| %>
<li><%= link_to character.name, table_character_character_sheet_sections_path(@table, character),
class: class_names(active: params[:controller] == "character_sheet_sections") %></li>
<% end %>
<li><%= link_to t(".events"), table_events_path(@table), class: class_names(active: params[:controller] == "events") %></li>
</ul>
</nav>
<% end %>
<% content_for :main do %>
<%= turbo_frame_tag("table-content") do %>
<%= yield %>
<% end %>
<% end %>
<%= render template: "layouts/application" %>