add visibility column to recordings

This commit is contained in:
Zachary Chai
2017-02-02 11:06:28 -05:00
parent 4311c3be8c
commit 0ba1b2bf41
3 changed files with 24 additions and 6 deletions

View File

@ -37,6 +37,7 @@ class @Recordings
{ data: "name", visible: $(".page-wrapper.rooms").data('main-room') },
{ data: "previews", orderable: false },
{ data: "duration", orderable: false },
{ data: "published" },
{ data: "playbacks", orderable: false },
{ data: "listed", visible: false },
{ data: "id", orderable: false }
@ -68,6 +69,21 @@ class @Recordings
},
{
targets: 4,
render: (data, type, row) ->
visibility = ['unpublished', 'unlisted', 'published']
if row.published
if row.listed
state = visibility[2]
else
state = visibility[1]
else
state = visibility[0]
if type == 'display'
return I18n[state]
return state
}
{
targets: 5,
render: (data, type, row) ->
if type == 'display'
str = ''

View File

@ -39,6 +39,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<th><%= t('meeting') %></th>
<th><%= t('thumbnails') %></th>
<th><%= t('duration') %></th>
<th><%= t('visibility') %></th>
<th><%= t('watch') %></th>
<th>published</th>
<th><%= t('actions') %></th>
@ -59,13 +60,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
</div>
<div class="recording-visibility-popover">
<button type="button" class="btn btn-default btn-success recording-update" data-visibility="published">
<%= t('published') %>
<%= t('client.published') %>
</button>
<button type="button" class="btn btn-default btn-warning recording-update" data-visibility="unlisted">
<%= t('unlisted') %>
<%= t('client.unlisted') %>
</button>
<button type="button" class="btn btn-default btn-danger recording-update" data-visibility="unpublished">
<%= t('unpublished') %>
<%= t('client.unpublished') %>
</button>
</div>
<div class="alert-template">