41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
- if policy(@table).update?
|
|
.owner-controls
|
|
= link_to 'Edit', edit_table_path(@table)
|
|
= link_to 'Destroy', game, :method => :delete, :data => { :confirm => 'Are you sure?' }
|
|
|
|
-# #table-component-container-container= react_component 'Table', props = {url: "#{table_path @table}"}, html_options = {id: "table-component-container"}
|
|
#table-component
|
|
|
|
%p= @table.title
|
|
|
|
- if @game.already_has?(current_user)
|
|
- if @game.startable?
|
|
= button_to 'Start', start_game_path(@game)
|
|
|
|
-# - if @game.winner_player_id || @game.nil?
|
|
-# = button_to 'New Game', new_game_table_path(@table)
|
|
|
|
-# - if @game && !@game.startable?
|
|
= button_to 'New Game', new_game_table_path(@table)
|
|
|
|
#game-component
|
|
- if @game.winner_player_id
|
|
%h1= @game.status
|
|
|
|
#playerList
|
|
#top
|
|
= render "seat", seat: @seats[0]
|
|
#mid
|
|
= render "seat", seat: @seats[1]
|
|
|
|
= render "play_to_beat"
|
|
|
|
= render "seat", seat: @seats[2]
|
|
|
|
#bot
|
|
= render "seat", seat: @seats[3]
|
|
|
|
:javascript
|
|
var soft_token = "#{current_user.soft_token}";
|
|
-# = javascript_include_tag 'table-loader'
|