forked from External/greenlight
GRN2-180: First stages of refactoring code for v2.4 (#748)
* Email rescues and authenticator concern * Application controller and helper clean up * Moved controller code out of helpers * More helper and email clean up * Cleaned up remaining helpers and create omniauth_options * Controller code clean up * restructured views structure * Restructured role code * Restructured profile and code clean up * Master merge * Added bbb server concern to deal with bbb calls * Bug fixes and changes after changes * rspec * More rubocop fixes
This commit is contained in:
18
app/views/admins/components/_admins_role.html.erb
Normal file
18
app/views/admins/components/_admins_role.html.erb
Normal file
@ -0,0 +1,18 @@
|
||||
<%
|
||||
# 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/>.
|
||||
%>
|
||||
|
||||
<button style="<%= "background-color: #{role_colour(role)};border-color: #{role_colour(role)}" %>" class="user-role btn btn-sm" onclick="filterRole('<%= role.name %>')">
|
||||
<%= translated_role_name(role) %>
|
||||
</button>
|
27
app/views/admins/components/_admins_tags.html.erb
Normal file
27
app/views/admins/components/_admins_tags.html.erb
Normal file
@ -0,0 +1,27 @@
|
||||
<%
|
||||
# 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 tags">
|
||||
<span style="<%= "background-color: #{role_colour(@role)};border-color: #{role_colour(@role)};" %>" class="tag custom-role-tag">
|
||||
<%= translated_role_name(@role) %>
|
||||
<a class="tag-addon clear-role">
|
||||
<i class="fas fa-times"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -22,7 +22,7 @@
|
||||
<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>
|
||||
<button id="branding-image" onclick="changeBrandingImage('<%= admin_update_settings_path(setting: 'Branding Image') %>')" class="btn btn-primary" type="button"><%= t("administrator.site_settings.branding.change") %></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,9 +34,9 @@
|
||||
<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%>">
|
||||
<input id="coloring-path-regular" type="hidden" value="<%= admin_coloring_path %>">
|
||||
<input id="coloring-path-lighten" type="hidden" value="<%= admin_update_settings_path(setting: "Primary Color Lighten") %>">
|
||||
<input id="coloring-path-darken" type="hidden" value="<%= admin_update_settings_path(setting: "Primary Color Darken") %>">
|
||||
|
||||
<div id="colorinput-regular" class="btn primary-regular mr-3">
|
||||
<%= t("administrator.site_settings.color.regular") %>
|
||||
@ -64,13 +64,13 @@
|
||||
<%= registration_method_string %>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="registrationMethods">
|
||||
<%= button_to admin_change_registration_path("open"), class: "dropdown-item" do %>
|
||||
<%= button_to admin_change_registration_path(value: "open"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.registration.methods.open") %>
|
||||
<% end %>
|
||||
<%= button_to admin_change_registration_path("invite"), class: "dropdown-item" do %>
|
||||
<%= button_to admin_change_registration_path(value: "invite"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.registration.methods.invite") %>
|
||||
<% end %>
|
||||
<%= button_to admin_change_registration_path("approval"), class: "dropdown-item" do %>
|
||||
<%= button_to admin_change_registration_path(value: "approval"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.registration.methods.approval") %>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -88,10 +88,10 @@
|
||||
<%= room_authentication_string %>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="room-auth">
|
||||
<%= button_to admin_room_authentication_path(value: "true"), class: "dropdown-item" do %>
|
||||
<%= button_to admin_update_settings_path(setting: "Room Authentication", 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 %>
|
||||
<%= button_to admin_update_settings_path(setting: "Room Authentication", value: "false"), class: "dropdown-item" do %>
|
||||
<%= t("administrator.site_settings.authentication.disabled") %>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -109,10 +109,10 @@
|
||||
<%= recording_default_visibility_string %>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="room-auth">
|
||||
<%= button_to admin_recording_visibility_path(visibility: "public"), class: "dropdown-item" do %>
|
||||
<%= button_to admin_update_settings_path(setting: "Default Recording Visibility", value: "public"), class: "dropdown-item" do %>
|
||||
<%= t("recording.visibility.public") %>
|
||||
<% end %>
|
||||
<%= button_to admin_recording_visibility_path(visibility: "private"), class: "dropdown-item" do %>
|
||||
<%= button_to admin_update_settings_path(setting: "Default Recording Visibility", value: "private"), class: "dropdown-item" do %>
|
||||
<%= t("recording.visibility.unlisted") %>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -128,25 +128,25 @@
|
||||
<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 %>
|
||||
<%= button_to admin_update_settings_path(setting: "Room Limit", value: 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 %>
|
||||
<%= button_to admin_update_settings_path(setting: "Room Limit", value: 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 %>
|
||||
<%= button_to admin_update_settings_path(setting: "Room Limit", value: 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 %>
|
||||
<%= button_to admin_update_settings_path(setting: "Room Limit", value: 15), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 15 ? "btn-primary" : "btn-outline-primary" %>">15+</span>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@
|
||||
%>
|
||||
|
||||
<% unless @role.nil? %>
|
||||
<%= render "shared/components/admins_tags" %>
|
||||
<%= render "admins/components/admins_tags" %>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
@ -88,7 +88,7 @@
|
||||
<td><%= user.provider %></td>
|
||||
<td class="text-center">
|
||||
<% roles = user.roles().pluck(:name) %>
|
||||
<%= render "shared/components/admins_role", role: user.highest_priority_role %>
|
||||
<%= render "admins/components/admins_role", role: user.highest_priority_role %>
|
||||
</td>
|
||||
<td>
|
||||
<% if roles.include?("pending") %>
|
||||
|
Reference in New Issue
Block a user