From 9883616f9c76a60fae23a142064a6cc58bab9c1f Mon Sep 17 00:00:00 2001 From: farhatahmad <35435341+farhatahmad@users.noreply.github.com> Date: Wed, 6 Feb 2019 12:02:53 -0500 Subject: [PATCH] Fixed issue with visibility redirected and changed the 'no recordings' string for the recordings page (#361) --- app/controllers/rooms_controller.rb | 4 +++- app/views/rooms/show.html.erb | 2 +- app/views/shared/_room_event.html.erb | 2 +- app/views/shared/_sessions.html.erb | 6 +++++- app/views/users/recordings.html.erb | 2 +- config/locales/en.yml | 1 + 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index 405634ea..3d737b80 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -168,7 +168,9 @@ class RoomsController < ApplicationController } res = @room.update_recording(params[:record_id], meta) - redirect_to @room if res[:updated] + + # Redirects to the page that made the initial request + redirect_to request.referrer if res[:updated] end # DELETE /:room_uid/:record_id diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb index c832e67f..0ac8980b 100644 --- a/app/views/rooms/show.html.erb +++ b/app/views/rooms/show.html.erb @@ -71,4 +71,4 @@ -<%= render "shared/sessions", recordings: @recordings, only_public: false %> +<%= render "shared/sessions", recordings: @recordings, only_public: false, user_recordings: false %> diff --git a/app/views/shared/_room_event.html.erb b/app/views/shared/_room_event.html.erb index 2257ecfd..21a185a7 100644 --- a/app/views/shared/_room_event.html.erb +++ b/app/views/shared/_room_event.html.erb @@ -40,4 +40,4 @@ -<%= render "shared/sessions", recordings: @room.public_recordings, only_public: true %> +<%= render "shared/sessions", recordings: @room.public_recordings, only_public: true, user_recordings: false %> diff --git a/app/views/shared/_sessions.html.erb b/app/views/shared/_sessions.html.erb index 138103aa..a195d985 100644 --- a/app/views/shared/_sessions.html.erb +++ b/app/views/shared/_sessions.html.erb @@ -50,7 +50,11 @@ <% if recordings.empty? %>