forked from External/greenlight
GRN2-129: Added server recordings and refactored adminsitrator panel (#662)
* Added server recordings and refactored adminsitrator panel * Fixed some issues * Fixed issue with owner email search * Fixed issue with edit user
This commit is contained in:
committed by
Jesus Federico
parent
8c63f793a5
commit
a055b88eb7
@ -1,136 +0,0 @@
|
||||
<%
|
||||
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
||||
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
||||
# This program is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU Lesser General Public License as published by the Free Software
|
||||
# Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
# You should have received a copy of the GNU Lesser General Public License along
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
%>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="mb-6 form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.branding.title") %></label>
|
||||
<label class="form-label text-muted"><%= t("administrator.site_settings.branding.info") %></label>
|
||||
<div class="input-group">
|
||||
<input id="branding-url" type="text" class="form-control" value="<%= logo_image %>">
|
||||
<span class="input-group-append">
|
||||
<button id="branding-image" onclick="changeBrandingImage('<%= admin_branding_path %>')" class="btn btn-primary" type="button"><%= t("administrator.site_settings.branding.change") %></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="mb-6 form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.color.title") %></label>
|
||||
<label class="form-label text-muted"><%= t("administrator.site_settings.color.info") %></label>
|
||||
<div class="color-inputs">
|
||||
<input id="coloring-path-regular" type="hidden" value="<%= admin_coloring_path%>">
|
||||
<input id="coloring-path-lighten" type="hidden" value="<%= admin_coloring_lighten_path%>">
|
||||
<input id="coloring-path-darken" type="hidden" value="<%= admin_coloring_darken_path%>">
|
||||
|
||||
<div id="colorinput-regular" class="btn primary-regular mr-3">
|
||||
<%= t("administrator.site_settings.color.regular") %>
|
||||
</div>
|
||||
|
||||
<div id="colorinput-lighten" class="btn primary-lighten mr-3">
|
||||
<%= t("administrator.site_settings.color.lighten") %>
|
||||
</div>
|
||||
|
||||
<div id="colorinput-darken" class="btn primary-darken">
|
||||
<%= t("administrator.site_settings.color.darken") %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mb-6 col-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.registration.title") %></label>
|
||||
<label class="form-label text-muted"><%= t("administrator.site_settings.registration.info") %></label>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="registrationMethods" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<%= registration_method_string %>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="registrationMethods">
|
||||
<%= button_to admin_change_registration_path("open"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.registration.methods.open") %>
|
||||
<% end %>
|
||||
<%= button_to admin_change_registration_path("invite"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.registration.methods.invite") %>
|
||||
<% end %>
|
||||
<%= button_to admin_change_registration_path("approval"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.registration.methods.approval") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-6 row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.authentication.title") %></label>
|
||||
<label class="form-label text-muted"><%= t("administrator.site_settings.authentication.info") %></label>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="room-auth" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<%= room_authentication_string %>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="room-auth">
|
||||
<%= button_to admin_room_authentication_path(value: "true"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.authentication.enabled") %>
|
||||
<% end %>
|
||||
<%= button_to admin_room_authentication_path(value: "false"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.authentication.disabled") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.rooms.title") %></label>
|
||||
<label class="form-label text-muted"><%= t("administrator.site_settings.rooms.info") %></label>
|
||||
<div class="row gutters-xs">
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 1), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 1 ? "btn-primary" : "btn-outline-primary" %>">1</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 5), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 5 ? "btn-primary" : "btn-outline-primary" %>">5</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 10), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 10 ? "btn-primary" : "btn-outline-primary" %>">10</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 15), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 15 ? "btn-primary" : "btn-outline-primary" %>">15+</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,148 +0,0 @@
|
||||
<%
|
||||
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
||||
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
||||
# This program is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU Lesser General Public License as published by the Free Software
|
||||
# Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
# You should have received a copy of the GNU Lesser General Public License along
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
%>
|
||||
|
||||
<% if @role.present? %>
|
||||
<%= render "shared/components/admins_tags" %>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-outline table-vcenter card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-header="name" data-order="<%= @order_column == "name" ? @order_direction : "none" %>">
|
||||
<%= t("administrator.users.table.name") %>
|
||||
<% if @order_column == "name" && @order_direction == "desc" %>
|
||||
↓
|
||||
<% elsif @order_column == "name" && @order_direction == "asc" %>
|
||||
↑
|
||||
<% end %>
|
||||
</th>
|
||||
<th data-header="email" data-order="<%= @order_column == "email" ? @order_direction : "none" %>">
|
||||
<%= t("administrator.users.table.username") %>
|
||||
<% if @order_column == "email" && @order_direction == "desc" %>
|
||||
↓
|
||||
<% elsif @order_column == "email" && @order_direction == "asc" %>
|
||||
↑
|
||||
<% end %>
|
||||
</th>
|
||||
<th class="text-left" data-header="provider" data-order="<%= @order_column == "provider" ? @order_direction : "none" %>">
|
||||
<%= t("administrator.users.table.authenticator") %>
|
||||
<% if @order_column == "provider" && @order_direction == "desc" %>
|
||||
↓
|
||||
<% elsif @order_column == "provider" && @order_direction == "asc" %>
|
||||
↑
|
||||
<% end %>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<%= t("administrator.users.table.role") %>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="users-table">
|
||||
<tr id="no_users_found" style="display: none;">
|
||||
<td colspan="7" class="text-center h4 p-6 font-weight-normal" >
|
||||
<%= t("administrator.users.table.not_found") %>
|
||||
</td>
|
||||
</tr>
|
||||
<% if @users %>
|
||||
<% @users.each do |user| %>
|
||||
<% if user != current_user %>
|
||||
<tr data-user-uid="<%= user.uid %>">
|
||||
<td>
|
||||
<div><%= user.name %></div>
|
||||
<div class="small text-muted"><%= [t("administrator.users.table.created"), ": ", user.created_at].join %></div>
|
||||
</td>
|
||||
<td class="user-email"><%= user.email && user.email != "" ? user.email : user.username%></td>
|
||||
<td><%= user.provider %></td>
|
||||
<td class="text-center">
|
||||
<% roles = user.roles().pluck(:name) %>
|
||||
<%= render "shared/components/admins_role", roles: roles %>
|
||||
</td>
|
||||
<td>
|
||||
<% if roles.include?("pending") %>
|
||||
<div class="item-action dropdown">
|
||||
<a href="javascript:void(0)" data-toggle="dropdown" class="icon">
|
||||
<i class="fas fa-ellipsis-v px-4"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu">
|
||||
<%= button_to admin_approve_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon far fa-check-circle"></i> <%= t("administrator.users.settings.approve") %>
|
||||
<% end %>
|
||||
<%= button_to admin_ban_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon far fa-times-circle"></i> <%= t("administrator.users.settings.decline") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif !roles.include?("super_admin") %>
|
||||
<div class="item-action dropdown">
|
||||
<a href="javascript:void(0)" data-toggle="dropdown" class="icon">
|
||||
<i class="fas fa-ellipsis-v px-4"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu">
|
||||
<% if roles.include?("denied") %>
|
||||
<%= button_to admin_unban_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-lock-open"></i> <%= t("administrator.users.settings.unban") %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to admin_edit_user_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-user-edit"></i> <%= t("administrator.users.settings.edit") %>
|
||||
<% end %>
|
||||
<button class= "delete-user dropdown-item" data-toggle="modal" data-target="#deleteAccountModal">
|
||||
<i class="dropdown-icon fas fa-user-minus"></i> <%= t("administrator.users.settings.delete") %>
|
||||
</button>
|
||||
|
||||
<% if roles.include?("admin") %>
|
||||
<%= button_to admin_demote_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-level-down-alt"></i> <%= t("administrator.users.settings.demote") %>
|
||||
<% end %>
|
||||
<% elsif roles.include?("user") %>
|
||||
<%= button_to admin_promote_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-level-up-alt"></i> <%= t("administrator.users.settings.promote") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_to admin_ban_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-lock"></i> <%= t("administrator.users.settings.ban") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td colspan="7" class="text-center h4 p-6 font-weight-normal" >
|
||||
<%= t("administrator.users.table.no_users") %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="float-right mt-4">
|
||||
<%== pagy_bootstrap_nav(@pagy) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/modals/invite_user_modal" %>
|
@ -34,8 +34,8 @@
|
||||
<div class="card-footer">
|
||||
<p>
|
||||
<%= t("modal.delete_room.warning").html_safe %>
|
||||
<% if room.recordings.length > 0 %>
|
||||
<%= t("modal.delete_room.recording_warning", recordings_num: room.recordings.length).html_safe %>
|
||||
<% if recording_count > 0 %>
|
||||
<%= t("modal.delete_room.recording_warning", recordings_num: recording_count).html_safe %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user