Fixed #398 Fixed issue with recording length and sort (GRN-83) (#426)

* Fixed issue with recording length and sort

* Made js run on any page with a table element on it

* Scrutinizer fix
This commit is contained in:
farhatahmad
2019-04-10 16:32:28 -04:00
committed by Jesus Federico
parent 95a98f6574
commit 4d648534f7
5 changed files with 25 additions and 27 deletions

View File

@ -30,7 +30,7 @@ module RecordingsHelper
len = valid_playbacks.first[:length]
if len > 60
"#{(len / 60).round} hrs"
"#{(len / 60).to_i} hrs #{len % 60} mins"
elsif len == 0
"< 1 min"
else
@ -42,4 +42,8 @@ module RecordingsHelper
def safe_recording_images(images)
Array.wrap(images)
end
def room_uid_from_bbb(bbb_id)
Room.find_by(bbb_id: bbb_id)[:uid]
end
end