From 2b28c750a8d71ef03c93a2eee462b90ae1b6b3c1 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 7 Jun 2018 16:39:25 -0400 Subject: [PATCH] in progress button --- app/controllers/rooms_controller.rb | 1 + app/views/rooms/show.html.erb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index e08c5185..3299605d 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -25,6 +25,7 @@ class RoomsController < ApplicationController # GET /r/:room_uid def show if current_user && @room.owned_by?(current_user) + @is_running = @room.is_running? @recordings = @room.recordings else render :join diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb index 4d8aa5a4..ba6de82b 100644 --- a/app/views/rooms/show.html.erb +++ b/app/views/rooms/show.html.erb @@ -27,7 +27,11 @@
- <%= link_to "Start", start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %> + <% if @is_running %> +
In Progress
+ <% else %> + <%= link_to "Start", start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %> + <% end %>