forked from External/greenlight
Admin panel (#496)
* Added the administrator role and functionality that comes with it (#403) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * Update user.rb * Update admins.js * GRN-15: Added the ability to change color and image from admin interface (#425) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Update user.rb * Update user.rb * Update routes.rb * Update admins_controller.rb * GRN-87:Added a super admin role and made changes to how to the design works (#430) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * Update user.rb * Update themes_controller_spec.rb * Update routes.rb * Update admins_controller.rb * Removed duplicated code that broke the build after last merge * GRN-78: Restructured some of the views to make the UI more consistent and responsive (#435) * GRN-20: Added roles to the user model * GRN-75: Added a view for admins to see their users * GRN-77: Added Edit/Delete/Promote ability for admins * GRN-71: Added admin account by default * GRN-15: Added the ability for admins to customize color and image * Added the super admin and completed the design tab * GRN-78: Cleaned up buttons and moved signin to its own page * GRN-78: Moved the Rooms and Recordings link to nav bar * Merge fix * Views restructure fix (#458) * Added cache to gitlab-ci.yml * Restructured seed * GRN2-99 -> GRN2-106: UI cleanup and refactoring (#478) * GRN2-98: Change Fullname to Full name * GRN2-105: Changed View Users to Manage Users * GRN2-101/103: Updated email to match branding * GRN2-100: Updated Email Sent flash to be more descriptive * GRN2-104: Redirect user to sign in page w/ flash after clicking activation link * GRN2-102: Changed the wording in the verification email * GRN2-99: Added email form validation * GRN2-106: Cleaned up Users list front end * Fixes to rake and admin password validator for passing rubocop * GRN2-113: Fixed issues with admin panel (#479) * GRN2-116: Code clean up after restructure of views (#482) * Removed unused references * Rubocop * Added pagination to admin view (#483) * GRN2-114: Added the ability for admins to ban/unban users (#487) * Added the ability for admins to ban and unban users * Update sessions_helper.rb * Merge branch 'master' into admin-panel (#492) * Updated rubocop gem * Updated rubocop and fixed issues (#490) * Rubocop fixes * GRN2-122: Updated sign in flow for admins and switch design tab to site settings (#489) * Switched design tab to site settings * Update _header with spaces instead of tabs * Added more test cases to increase coverage (#494)
This commit is contained in:
@ -15,16 +15,19 @@
|
||||
|
||||
<% flash.each do |key,value| %>
|
||||
<% if key.eql? "success" %>
|
||||
<div class="alert alert-icon alert-success text-center mb-0">
|
||||
<%= content_tag :div, value, class: "flash #{key} d-inline" %>
|
||||
<div class="alert alert-success alert-dismissible text-center mb-0">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= value %>
|
||||
</div>
|
||||
<% elsif key.eql? "alert" %>
|
||||
<div class="alert alert-icon alert-danger text-center mb-0">
|
||||
<%= content_tag :div, value, class: "flash #{key} d-inline" %>
|
||||
<div class="alert alert-danger alert-dismissible text-center mb-0">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= value %>
|
||||
</div>
|
||||
<% elsif key.eql? "info" %>
|
||||
<div class="alert alert-icon alert-info text-center mb-0">
|
||||
<%= content_tag :div, value, class: "flash #{key} d-inline" %>
|
||||
<div class="alert alert-info alert-dismissible text-center mb-0">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= value %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -14,65 +14,77 @@
|
||||
%>
|
||||
|
||||
<div class="header py-4">
|
||||
<div class="container">
|
||||
<div class="d-flex">
|
||||
<%= link_to (current_user ? current_user.main_room : root_path), class: "header-brand" do %>
|
||||
<%= image_tag(Rails.configuration.branding_image,class: "header-brand-img") %>
|
||||
<% end %>
|
||||
<div class="container">
|
||||
<div class="d-flex">
|
||||
<%= link_to (current_user ? home_page : root_path), class: "header-brand" do %>
|
||||
<%= image_tag(logo_image, class: "header-brand-img", alt:"") %>
|
||||
<% end %>
|
||||
|
||||
<div class="d-flex ml-auto">
|
||||
<% if current_user %>
|
||||
<a id="create-room" class="px-5 ml-2 mt-1" href="" data-toggle="modal" data-target="#createRoomModal">
|
||||
<i class="fas fa-plus"></i> <%= t("header.create_room") %>
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
<a href="#" class="nav-link pr-0" data-toggle="dropdown">
|
||||
<% if current_user.image.blank? %>
|
||||
<span class="avatar"><%= current_user.name.first %></span>
|
||||
<% else %>
|
||||
<span id="user-avatar" class="avatar d-none"><%= current_user.name.first %></span>
|
||||
<%= image_tag(current_user.image, id: "user-image", class: "avatar") %>
|
||||
<% end %>
|
||||
<span class="ml-2 d-none d-lg-block">
|
||||
<span class="text-default username"><%= current_user.name %></span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" x-placement="bottom-end">
|
||||
<%= link_to current_user.main_room, class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-home"></i> <%= t("header.dropdown.home") %>
|
||||
<% end %>
|
||||
<%= link_to get_user_recordings_path(current_user), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-video"></i> <%= t("room.recordings") %>
|
||||
<% end %>
|
||||
<%= link_to edit_user_path(current_user), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-cog"></i> <%= t("header.dropdown.settings") %>
|
||||
<% end %>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="http://docs.bigbluebutton.org/install/greenlight-v2.html" target="_blank">
|
||||
<i class="dropdown-icon far fa-question-circle"></i> <%= t("header.dropdown.help") %>
|
||||
</a>
|
||||
<%= link_to logout_path, class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-sign-out-alt"></i> <%= t("header.dropdown.signout") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex ml-auto">
|
||||
<% if current_user %>
|
||||
|
||||
<% if current_user.has_role? :super_admin %>
|
||||
<% admins_page = params[:controller] == "admins" && params[:action] == "index" ? "active" : "" %>
|
||||
<%= link_to admins_path, class: "px-3 mx-1 mt-1 header-nav #{admins_page}" do %>
|
||||
<i class="fas fa-home pr-1 "></i> <%= t("header.dropdown.home") %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% rooms_page = params[:controller] == "rooms" && params[:action] == "show" ? "active" : "" %>
|
||||
<%= link_to current_user.main_room, class: "px-3 mx-1 mt-1 header-nav #{rooms_page}" do %>
|
||||
<i class="fas fa-home pr-1 "></i> <%= t("header.dropdown.home") %>
|
||||
<% end %>
|
||||
|
||||
<% all_rec_page = params[:controller] == "users" && params[:action] == "recordings" ? "active" : "" %>
|
||||
<%= link_to get_user_recordings_path(current_user), class: "px-3 mx-1 mt-1 header-nav #{all_rec_page}" do %>
|
||||
<i class="fas fa-video pr-1"></i> <%= t("header.all_recordings") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="dropdown">
|
||||
<a href="#" class="nav-link pr-0" data-toggle="dropdown">
|
||||
<% if current_user.image.blank? %>
|
||||
<span class="avatar"><%= current_user.name.first %></span>
|
||||
<% else %>
|
||||
<span id="user-avatar" class="avatar d-none"><%= current_user.name.first %></span>
|
||||
<%= image_tag(current_user.image, id: "user-image", class: "avatar") %>
|
||||
<% end %>
|
||||
<span class="ml-2 d-none d-lg-block">
|
||||
<span class="text-default username"><%= current_user.name %></span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" x-placement="bottom-end">
|
||||
<%= link_to edit_user_path(current_user), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-id-card mr-3"></i><%= t("header.dropdown.settings") %>
|
||||
<% end %>
|
||||
<% if current_user.has_role? :admin %>
|
||||
<%= link_to admins_path, class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-user-tie mr-3"></i><%= t("header.dropdown.account_settings") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="http://docs.bigbluebutton.org/install/greenlight-v2.html" target="_blank">
|
||||
<i class="dropdown-icon far fa-question-circle"></i> <%= t("header.dropdown.help") %>
|
||||
</a>
|
||||
<%= link_to logout_path, class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon fas fa-sign-out-alt"></i> <%= t("header.dropdown.signout") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% allow_greenlight_accounts = allow_greenlight_accounts? %>
|
||||
<% if Rails.configuration.omniauth_ldap %>
|
||||
<%= link_to t("login"), omniauth_login_url(:ldap), :class => "btn btn-pill btn-outline-primary mx-2 sign-in-button" %>
|
||||
<%= link_to t("login"), omniauth_login_url(:ldap), :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% elsif allow_greenlight_accounts %>
|
||||
<%= link_to t("login"), "#loginModal", :class => "btn btn-pill btn-outline-primary mx-2 sign-in-button", "data-toggle": "modal" %>
|
||||
<%= link_to t("login"), signin_path, :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% elsif Rails.configuration.loadbalanced_configuration %>
|
||||
<%= link_to t("login"), omniauth_login_url(:bn_launcher), :class => "btn btn-pill btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% else %>
|
||||
<%= link_to t("login"), "#loginModal", :class => "btn btn-pill btn-outline-primary mx-2 sign-in-button", "data-toggle": "modal" %>
|
||||
<%= link_to t("login"), signin_path, :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% end %>
|
||||
|
||||
<% if allow_user_signup? && allow_greenlight_accounts %>
|
||||
<%= link_to t("signup.title"), signup_path, :class => "btn btn-pill btn-outline-primary mx-2 sign-in-button" %>
|
||||
<%= link_to t("signup.title"), signup_path, :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% end %>
|
||||
|
||||
<%= render "shared/modals/login_modal" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,4 +40,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/sessions", recordings: @room.public_recordings, only_public: true, user_recordings: false %>
|
||||
<%= render "shared/sessions", recordings: @room.public_recordings, only_public: true, user_recordings: false, title: t("room.recordings") %>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div class="sessions pb-5">
|
||||
<div class="container pt-6">
|
||||
|
||||
<%= render "shared/components/subtitle", subtitle: (only_public ? t("recording.visibility.public") + " " : "") + t("room.recordings"), search: true %>
|
||||
<%= render "shared/components/subtitle", subtitle: (only_public ? t("recording.visibility.public") + " " : "") + title, search: true %>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
|
47
app/views/shared/admin_settings/_site_settings.html.erb
Normal file
47
app/views/shared/admin_settings/_site_settings.html.erb
Normal file
@ -0,0 +1,47 @@
|
||||
<%
|
||||
# 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-7 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 onclick="changeBrandingImage('<%= admin_branding_path %>')" class="btn btn-primary" type="button"><%= t("administrator.site_settings.branding.change") %></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="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="row gutters-xs">
|
||||
<div class="col-auto">
|
||||
<input id="coloring-path" value="<%= admin_coloring_path %>" hidden>
|
||||
<label class="colorinput">
|
||||
<input name="color" type="color" value="<%= user_color %>" class="colorinput-input" />
|
||||
<span class="colorinput-color" style="background: <%= user_color %>;">
|
||||
<i class="p-1 fas fa-paint-brush"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
143
app/views/shared/admin_settings/_users.html.erb
Normal file
143
app/views/shared/admin_settings/_users.html.erb
Normal file
@ -0,0 +1,143 @@
|
||||
<%
|
||||
# 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="table-responsive">
|
||||
<table class="table table-hover table-outline table-vcenter text-nowrap 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><%= user.email && user.email != "" ? user.email : user.username%></td>
|
||||
<td><%= user.provider %></td>
|
||||
<td class="text-center">
|
||||
<% if user.has_role? :denied %>
|
||||
<div class="user-role btn btn-sm btn-gray-dark">
|
||||
<%= t("roles.banned") %>
|
||||
</div>
|
||||
<% elsif user.has_role? :super_admin %>
|
||||
<div class="user-role btn btn-sm btn-red">
|
||||
<%= t("roles.super_admin") %>
|
||||
</div>
|
||||
<% elsif user.has_role? :admin %>
|
||||
<div class="user-role btn btn-sm btn-yellow">
|
||||
<%= t("roles.administrator") %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="user-role btn btn-sm btn-gray">
|
||||
<%= t("roles.user") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% unless user.has_role? :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 user.has_role? :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 user.has_role? :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 user.has_role? :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>
|
29
app/views/shared/components/_create_room_block.html.erb
Normal file
29
app/views/shared/components/_create_room_block.html.erb
Normal file
@ -0,0 +1,29 @@
|
||||
<%
|
||||
# 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="col-lg-4 col-md-6 col-sm-12">
|
||||
<div id="create-room-block" class="card-body p-1 mb-5 background" data-toggle="modal" data-target="#createRoomModal">
|
||||
<div class="row p-3">
|
||||
<div class="col-4">
|
||||
<span class="stamp stamp-md bg-primary">
|
||||
<i class="fas fa-plus"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<h4 class="my-2"><%= t("room.create_room") %></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -18,7 +18,7 @@
|
||||
<table class="table table-hover table-vcenter text-wrap table-no-border">
|
||||
<tbody class="no-border-top">
|
||||
<td>
|
||||
<span class="stamp stamp-md bg-cyan">
|
||||
<span class="stamp stamp-md bg-primary">
|
||||
<% if room == current_user.main_room %>
|
||||
<i class="fas fa-home"></i>
|
||||
<% else %>
|
||||
|
@ -14,11 +14,11 @@
|
||||
%>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-9">
|
||||
<div class="col-8">
|
||||
<p class="subtitle"><%= subtitle %></p>
|
||||
</div>
|
||||
<% if search %>
|
||||
<div id="search_bar" class="col-3">
|
||||
<div id="search_bar" class="col-4">
|
||||
<div class="input-icon">
|
||||
<input type="text" class="form-control btn-pill" placeholder="Search...">
|
||||
<span class="input-icon-addon">
|
||||
|
@ -63,8 +63,8 @@
|
||||
<span class="custom-switch-indicator float-right"></span>
|
||||
</label>
|
||||
<div class="mt-4">
|
||||
<%= f.submit t("header.create_room"), id: "create-room-submit", class: "create-only btn btn-outline-primary btn-block btn-pill" %>
|
||||
<%= f.submit t("modal.room_settings.update"), id: "create-room-submit", class: "update-only btn btn-outline-primary btn-block btn-pill" %>
|
||||
<%= f.submit t("modal.create_room.create"), id: "create-room-submit", class: "create-only btn btn-primary btn-block" %>
|
||||
<%= f.submit t("modal.room_settings.update"), id: "create-room-submit", class: "update-only btn btn-primary btn-block" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -22,11 +22,11 @@
|
||||
<h3><%= t("modal.delete_account.confirm") %></h3>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-pill btn-info my-1 btn-del-room" data-dismiss="modal">
|
||||
<button type="button" class="btn btn-info my-1 btn-del-room" data-dismiss="modal">
|
||||
<%= t("modal.delete_account.keep") %>
|
||||
</button>
|
||||
|
||||
<%= button_to delete_user_path, method: :delete, id: "delete-confirm", class: "btn btn-pill btn-danger my-1 btn-del-room" do %>
|
||||
<%= button_to delete_location, method: :delete, id: "delete-confirm", class: "btn btn-danger my-1 btn-del-room" do %>
|
||||
<%= t("modal.delete_account.delete") %>
|
||||
<% end %>
|
||||
|
||||
|
@ -22,11 +22,11 @@
|
||||
<h3><%= t("modal.delete_room.confirm", room: room.name) %></h3>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-pill btn-info my-1 btn-del-room" data-dismiss="modal">
|
||||
<button type="button" class="btn btn-info my-1 btn-del-room" data-dismiss="modal">
|
||||
<%= t("modal.delete_room.keep") %>
|
||||
</button>
|
||||
|
||||
<%= button_to room, method: :delete, id: "delete-confirm", class: "btn btn-pill btn-danger my-1 btn-del-room" do %>
|
||||
<%= button_to room, method: :delete, id: "delete-confirm", class: "btn btn-danger my-1 btn-del-room" do %>
|
||||
<%= t("modal.delete_room.delete") %>
|
||||
<% end %>
|
||||
|
||||
|
@ -1,73 +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="modal fade" id="loginModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content text-center">
|
||||
<div class="modal-body">
|
||||
<div class="card-body p-6">
|
||||
<div class="card-title">
|
||||
<h3><%= t("login") %></h3>
|
||||
</div>
|
||||
<% unless iconset_providers.length.zero? %>
|
||||
<% iconset_providers.each do |provider| %>
|
||||
<%= link_to omniauth_login_url(provider), class: "customBtn-#{provider}" do %>
|
||||
<span class="customBtn-icon">
|
||||
<img class="customBtn-image"></img>
|
||||
</span>
|
||||
<span class="customBtn-text"><%= t("modal.login.with", provider: t("provider.#{provider}")) %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="or-line my-6">
|
||||
<div>
|
||||
<span class="text-uppercase">
|
||||
<%= t("modal.login.or") %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form_for(:session, url: create_session_path) do |f| %>
|
||||
<div class="form-group">
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-at"></i>
|
||||
</span>
|
||||
<%= f.text_field :email, class: "form-control", placeholder: t("email"), value: "" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-key"></i>
|
||||
</span>
|
||||
<%= f.password_field :password, class: "form-control", placeholder: t("password"), value: "" %>
|
||||
</div>
|
||||
</div>
|
||||
<% if Rails.configuration.enable_email_verification %>
|
||||
<div class="form-group">
|
||||
<div class="input-icon">
|
||||
<%= link_to t("modal.login.forgot_password"), new_password_reset_path %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-footer">
|
||||
<%= f.submit t("login"), class: "btn btn-outline-primary btn-block btn-pill" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -27,4 +27,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/modals/delete_account_modal" %>
|
||||
<%= render "shared/modals/delete_account_modal", delete_location: delete_user_path %>
|
||||
|
@ -16,10 +16,44 @@
|
||||
<%= content_tag(:div, id: setting_id, class: "setting-view card") do %>
|
||||
<div class="card-body p-6">
|
||||
<div class="card-title text-primary">
|
||||
<h4><%= setting_title %></h4>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<% if setting_id == "users" %>
|
||||
<div class="col-7 mt-2">
|
||||
<h4><%= setting_title %></h4>
|
||||
</div>
|
||||
|
||||
<div class="col-5 float-right">
|
||||
<div id="search-bar">
|
||||
<div class="input-group">
|
||||
<input id="search-input" type="text" class="form-control" placeholder="<%= t("settings.search") %>..." value="<%= @search %>">
|
||||
<% unless @search.blank? %>
|
||||
<span id="clear-search" class="text-primary" onclick="clearSearch()">
|
||||
<i class="fas fa-times"></i>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-primary" type="button" onclick="searchPage()">
|
||||
<i class="fas fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="col-12 mt-2">
|
||||
<h4 class="text-primary"><%= setting_title %></h4>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<%= render "shared/settings/#{setting_id}" %>
|
||||
<% unless (defined?(admin_view)).nil? %>
|
||||
<%= render "shared/admin_settings/#{setting_id}" %>
|
||||
<% else %>
|
||||
<%= render "shared/settings/#{setting_id}" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
Reference in New Issue
Block a user