Merge v2.6-alpha (#1672)

* GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299)

* First steps

* Fixes in account creation flow

* Fixed most testcases

* more test fixes

* Fixed more test cases

* Passing tests and rubocop

* Added rake task to remove rooms

* Adding translation (#1510)

* Update _account.html.erb

* Update en.yml

* Fix "for" attribute for label elements (#1488)

Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>

* Fix some issues reported by LGTM (#1478)

* Declare local JavaScript variables (reported by LGTM)

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* Remove unused local JavaScript variable (reported by LGTM)

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* Puma Worker Configuration (#1332)

We noticed that the current default settings perform very poorly under
load. We managed to literally take down Greenlight during a larger event
when people where accessing the landing page for rooms and when doing
some tests, I was more or less able to DoS Greenlight on my own.

This patch adds a default worker configuration which significantly
improves the situation. The small, 4 core machine I was testing on could
handle about thrice the amount of requests.

While the new default configuration should be reasonably well suited for
most deployments, this patch further allows users to easily configure
the worker pool on their own in the environment file.

* Made name and email readonly for no greenlight accounts (#1534)

* Fixed hardcoded string (#1532)

* fixed spelling error that was bugging me :) - sep a rat e (#1535)

Co-authored-by: Dave Lane <dave@oerfoundation.org>

* Improve Server Rooms View (#1524)

* Order rooms by status

* Cleaned up order function

* Now displays Started/Created/Ended

* Added participant count to rooms list

* Fix rake task user:create so that users can be created when terms are present (#1565)

* Changed user create task to always accept terms

* clean up

* More secure room ID (#1451)

* Legal and privpolicy link (#1421)

* add customizable Links to Imprint and Privacy Policy

* fix copy&paste error in spec

* replace "imprint" with "legal" since that is the correct term

* remove german translation of new strings, transifex will take care of them later

* GRN2-295:Refactored update profile and update password (#1591)

* Refactored update profile and update password

* Relowered rubocop settings

* Fixed email sending when not supposed to (#1592)

* Design changes for small screens  (#1580)

* now rap for pagination

* Update _subtitle.html.erb

* Update _rooms.html.erb

* Update _recordings.html.erb

* Update _rooms.html.erb

* Update _users.html.erb

* Update cant_create_rooms.html.erb

* Update room.js

* Update edit.html.erb

* Update new.html.erb

* Update cant_create_rooms.html.erb

* Update _sessions.html.erb

* Update _account.html.erb

* Make Greenlight work with Ruby 2.7 (#1560)

Greenlight's failure to start up with Ruby 2.7 seems to be caused by [an
issue in bootsnap](https://github.com/Shopify/bootsnap/issues/258).
Updating that library makes Greenlight work again.

However, there are still a lot of deprecation warnings. But that's
something to deal with separately.

This fixes #1558

* use email input for sign in (#1199)

* use email input for sign in

* use email input for registration

* use email input for invitation

* use email input for account settings

Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>

* Fix Gemfile (#1593)

* Fixed invalid token for password reset (#1632)

* HELP_URL env variable now works as expected (#1636)

* #1372 Fix for long Text in Table + Remove invalid HTML Tag (#1403)

* removed invalid HTML Tag

* removed invalid HTML Tag

* Update _public_recording_row.html.erb

* Update _recording_row.html.erb

* Update _server_recording_row.html.erb

form-inline replaced by own css

* Update _server_room_row.html.erb

* Update _public_recording_row.html.erb

* Update _recording_row.html.erb

* Update _public_recording_row.html.erb

* Update _recordings.html.erb

* Update _rooms.html.erb

* Update main.scss

fix for long text

* Update main.scss

* Update _public_recording_row.html.erb

* Added more validation on profile image (#1644)

* Users who can't create rooms but have shared rooms now have a different view (#1649)

* Revert "Puma Worker Configuration (#1332)" (#1667)

This reverts commit 78ed8d7460.

* Removed html safe from all flash messages (#1668)

* Remove hardcoded guest=true if require mod approval is set (#1669)

* Change random generation for room uid (#1670)

* GRN2-290: Update gems and update to Rails 5.2.4.3 (#1671)

* Update gems and update to Rails 5.2.4.3

* remove gemfile error

Co-authored-by: MrKeksi <mrkeksi@users.noreply.github.com>
Co-authored-by: Florian Weber <fnwbr@users.noreply.github.com>
Co-authored-by: Stefan Weil <sw@weilnetz.de>
Co-authored-by: Lars Kiesow <lkiesow@uos.de>
Co-authored-by: Dave Lane <dave@lane.net.nz>
Co-authored-by: Dave Lane <dave@oerfoundation.org>
Co-authored-by: Henning <hng@users.noreply.github.com>
Co-authored-by: Marcel Waldvogel <marcel@waldvogel.family>
Co-authored-by: Christian Marg <marg@rz.tu-clausthal.de>
Co-authored-by: Klaus <klaus@jsxc.org>
This commit is contained in:
Ahmad Farhat
2020-05-26 17:37:23 -04:00
committed by GitHub
parent 7411eba8e0
commit 51824ad84b
76 changed files with 903 additions and 735 deletions

View File

@ -14,7 +14,7 @@
%>
<div class="list-group list-group-transparent mb-0">
<% highest_role = current_user.highest_priority_role %>
<% highest_role = current_user.role %>
<% highest_role.name %>
<% if highest_role.get_permission("can_manage_users") || highest_role.name == "super_admin" %>
<%= link_to admins_path, class: "list-group-item list-group-item-action dropdown-item #{"active" if active_page == "index"}" do %>

View File

@ -16,7 +16,7 @@
<div class="row">
<div class="col-12">
<div class="table-responsive">
<table id="recordings-table" class="table table-hover table-outline table-vcenter text-nowrap card-table">
<table id="recordings-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" %>">
@ -94,10 +94,10 @@
</tbody>
</table>
<% if !@recordings.empty?%>
<div class="float-right mr-4 mt-4">
<div class="float-md-right mt-4">
<%== pagy_bootstrap_nav(@pagy) %>
</div>
<% end %>
</div>
</div>
</div>
</div>

View File

@ -15,7 +15,7 @@
<div class="container">
<div class="row">
<% current_role = current_user.highest_priority_role%>
<% current_role = current_user.role%>
<div class="col-lg-3 mb-4">
<div class="list-group list-group-transparent mb-0">
<div id="rolesSelect" data-url="<%= admin_roles_order_path %>">
@ -34,7 +34,7 @@
</div>
<div class="col-lg-9 <%="form-disable" if edit_disabled %>">
<%= form_with model: @selected_role, url: admin_update_role_path(@selected_role.id), method: :post do |f| %>
<%= f.label t('administrator.roles.name'), class: "form-label" %>
<%= f.label :name, t('administrator.roles.name'), class: "form-label" %>
<%= f.text_field :name, class: 'form-control mb-3', value: translated_role_name(@selected_role), readonly: edit_disabled || @selected_role.name == "user" || @selected_role.name == "admin", required: true %>
<%= f.hidden_field :colour, id: "role-colour", value: role_colour(@selected_role) %>

View File

@ -16,7 +16,7 @@
<div class="row">
<div class="col-12">
<div class="table-responsive">
<table id="rooms-table" class="table table-hover table-outline table-vcenter text-nowrap card-table">
<table id="rooms-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" %>">
@ -43,6 +43,9 @@
<% end %>
</th>
<th>
<%= t("administrator.rooms.table.participants") %>
</th>
<th>
<%= t("administrator.rooms.table.status") %>
</th>
@ -56,10 +59,10 @@
</tbody>
</table>
<% if !@rooms.empty?%>
<div class="float-right mr-4 mt-4">
<div class="float-md-right mt-4">
<%== pagy_bootstrap_nav(@pagy) %>
</div>
<% end %>
</div>
</div>
</div>
</div>

View File

@ -15,14 +15,14 @@
<tr>
<td>
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
<text id='recording-text'>
<div id="recording-title" class="edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
<span id='recording-text' title="<%= recording[:name] %>">
<% if recording[:metadata][:name] %>
<%= recording[:metadata][:name] %>
<% else %>
<%= recording[:name] %>
<% end %>
</text>
</span>
<a><i id="edit-record" class="fa fa-edit align-top ml-2" data-edit-recordid="<%= recording[:recordID] %>"></i></a>
</div>
<div class="small text-muted">

View File

@ -15,16 +15,23 @@
<tr class="room-block" data-path="<%= update_settings_path(room) %>" data-room-settings=<%= room.room_settings %> data-room-access-code="<%= room.access_code %>">
<td>
<div id="room-title" class="form-inline edit_hover_class">
<div id="room-title" class="edit_hover_class">
<% if room.id == room.owner.room_id %>
<i class="fas fa-home pr-1"></i>
<% end %>
<text class="room-name-text">
<span class="room-name-text" title="<%= room.name %>">
<%= room.name %>
</text>
</span>
</div>
<div class="small text-muted">
<%= [t("administrator.users.table.created"), ": ", room.created_at].join %>
<% running = room_is_running(room.bbb_id) %>
<% if running %>
<%= t("administrator.rooms.table.started", session: friendly_time(room.last_session)) %>
<% elsif room.last_session.present? %>
<%= t("administrator.rooms.table.ended", session: friendly_time(room.last_session)) %>
<% else %>
<%= [t("administrator.users.table.created"), ": ", friendly_time(room.created_at)].join %>
<% end %>
</div>
</td>
<td class="text-left">
@ -33,8 +40,10 @@
<td class="text-left">
<%= room.uid %>
</td>
<td class="text-center">
<%= @participants_count[room.bbb_id].presence || "-" %>
</td>
<td class="text-left">
<% running = room_is_running(room.bbb_id) %>
<% if running %>
<%= t("administrator.rooms.table.running") %>
<% else %>

View File

@ -28,6 +28,34 @@
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="mb-6 form-group">
<label class="form-label"><%= t("administrator.site_settings.legal.title") %></label>
<label class="form-label text-muted"><%= t("administrator.site_settings.legal.info") %></label>
<div class="input-group">
<input id="legal-url" type="text" class="form-control" value="<%= legal_url %>">
<span class="input-group-append">
<button id="legal-url" onclick="changeLegalURL('<%= admin_update_settings_path(setting: 'Legal URL') %>')" class="btn btn-primary" type="button"><%= t("administrator.site_settings.legal.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.privpolicy.title") %></label>
<label class="form-label text-muted"><%= t("administrator.site_settings.privpolicy.info") %></label>
<div class="input-group">
<input id="privpolicy-url" type="text" class="form-control" value="<%= privpolicy_url %>">
<span class="input-group-append">
<button id="privpolicy-url" onclick="changePrivacyPolicyURL('<%= admin_update_settings_path(setting: 'Privacy Policy URL') %>')" class="btn btn-primary" type="button"><%= t("administrator.site_settings.privpolicy.change") %></button>
</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="mb-6 form-group">

View File

@ -13,21 +13,6 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<%
# 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.nil? %>
<%= render "admins/components/manage_users_tags" %>
<% else %>
@ -89,11 +74,10 @@
<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 "admins/components/admins_role", role: user.highest_priority_role %>
<%= render "admins/components/admins_role", role: user.role %>
</td>
<td>
<% if !roles.include?("super_admin") %>
<% if !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>
@ -106,14 +90,14 @@
<button class="delete-user dropdown-item" data-path="<%= delete_user_path(user_uid: user.uid, permanent: "true") %>" data-toggle="modal" data-target="#deleteAccountModal">
<i class="dropdown-icon fas fa-skull-crossbones"></i> <%= t("administrator.users.settings.perm_delete") %>
</button>
<% elsif roles.include?("denied") %>
<% elsif user.has_role?("denied") %>
<%= button_to admin_unban_path(user_uid: user.uid), class: "dropdown-item", "data-disable": "" do %>
<i class="dropdown-icon fas fa-lock-open"></i> <%= t("administrator.users.settings.unban") %>
<% end %>
<button class= "delete-user dropdown-item" data-path="<%= delete_user_path(user_uid: user.uid) %>" data-delete="temp-delete" data-toggle="modal" data-target="#deleteAccountModal">
<i class="dropdown-icon fas fa-user-minus"></i> <%= t("administrator.users.settings.delete") %>
</button>
<% elsif roles.include?("pending") %>
<% elsif user.has_role?("pending") %>
<%= button_to admin_approve_path(user_uid: user.uid), class: "dropdown-item", "data-disable": "" do %>
<i class="dropdown-icon far fa-check-circle"></i> <%= t("administrator.users.settings.approve") %>
<% end %>
@ -150,7 +134,7 @@
<% end %>
</tbody>
</table>
<div class="float-right mt-4">
<div class="float-md-right mt-4">
<%== pagy_bootstrap_nav(@pagy) %>
</div>
</div>
@ -160,4 +144,4 @@
<%= render "shared/modals/invite_user_modal" %>
<%= render "shared/modals/delete_account_modal", delete_location: relative_root %>
<%= render "shared/modals/merge_user_modal" %>
<%= render "shared/modals/merge_user_modal" %>

View File

@ -16,5 +16,5 @@
<div class="container text-center pt-9">
<div class="display-1 text-muted mb-5"><%= t("errors.bigbluebutton.title") %></div>
<h1 class="h2 mb-3"><%= t("errors.bigbluebutton.message") %></h1>
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.bigbluebutton.help", doc_link: "http://docs.bigbluebutton.org/greenlight/gl-install.html#setting-bigbluebutton-credentials").html_safe %></p>
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.bigbluebutton.help", doc_link: "https://docs.bigbluebutton.org/greenlight/gl-install.html#setting-bigbluebutton-credentials").html_safe %></p>
</div>

View File

@ -16,7 +16,7 @@
<div class="container mt-8 mb-6 text-center">
<h2 class="mb-6">Greenlight <%= t("features.title") %></h2>
<h2 class="mb-6"><%= t("greenlight") %> <%= t("features.title") %></h2>
<div class="row feature-stamp">
<div class="col-lg-3 col-md-6">

View File

@ -15,7 +15,7 @@
<div class="container">
<div class="row pt-7">
<div class="col col-4 offset-4">
<div class="col col-md-4 col-sm-12 mx-auto">
<div class="card">
<div class="card-header background">
<h4 class="mt-2"><%= t("reset_password.subtitle") %></h4>
@ -25,11 +25,11 @@
<%= hidden_field_tag :email, @user.email %>
<%= f.label t('reset_password.password'), class: "form-label" %>
<%= f.label :password, t('reset_password.password'), class: "form-label" %>
<%= f.password_field :password, class: 'form-control' %>
<br>
<%= f.label t('reset_password.confirm'), class: "form-label" %>
<%= f.label :password_confirmation, t('reset_password.confirm'), class: "form-label" %>
<%= f.password_field :password_confirmation, class: 'form-control' %>
<br>

View File

@ -15,14 +15,14 @@
<div class="container">
<div class="row pt-7">
<div class="col col-4 offset-4">
<div class="col col-md-4 col-sm-12 mx-auto">
<div class="card">
<div class="card-header background">
<h4 class="mt-2"><%= t("forgot_password.subtitle") %></h4>
</div>
<div class="card-body background">
<%= form_for(:password_reset, url: password_resets_path) do |f| %>
<%= f.label t("forgot_password.email"), class: "form-label" %>
<%= f.label :email, t("forgot_password.email"), class: "form-label" %>
<%= f.email_field :email, class: "form-control" %>
<br>

View File

@ -1,5 +1,3 @@
<%
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
@ -15,12 +13,10 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<div id="cant-create-room-wrapper" class="background h-100 cant-create-room-wrapper">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<div class="row">
<div class="col-5">
<div id="cant-create-room-wrapper" class="d-flex align-content-md-center flex-wrap background h-100 cant-create-room-wrapper">
<div class="container">
<div class="row my-7">
<div class="col-lg-5 d-none d-lg-flex">
<div class="card card-profile h-100">
<div class="card-header bg-primary h-50"></div>
<div class="card-body text-center">
@ -36,15 +32,15 @@
</div>
</div>
</div>
<div class="col-7">
<div class="col-lg-7 col-sm-12">
<div class="card h-100">
<div class="card-status bg-primary"></div>
<div class="card-header cant-create-rooms-title">
<h3 class="card-title"><%= t("room.no_room.title") %></h3>
</div>
<div class="card-body d-flex flex-column justify-content-center align-items-center">
<p class="w-75"><%= t("room.no_room.description") %></p>
<%= form_for(:join_room, url: join_room_path, html: {class: "w-75"}) do |f| %>
<div class="card-body mx-auto col-sm-9 col-12">
<p><%= t("room.no_room.description") %></p>
<%= form_for(:join_room, url: join_room_path) do |f| %>
<div class="input-icon mb-2">
<span class="input-icon-addon">
<i class="fas fa-link"></i>
@ -57,8 +53,8 @@
<% end %>
</div>
<hr class="mt-0 mb-0">
<div class="card-body d-flex flex-column justify-content-center align-items-center">
<ul class="list-group w-75 text-center">
<div class="card-body mx-auto col-sm-9 col-12">
<ul class="list-group text-center">
<li class="list-group-item active"><%= t("room.no_room.recent_rooms") %></li>
<% @recent_rooms.each do |room| %>
<%= link_to room_path(room), class: "list-group-item list-group-item-action dropdown-item" do %>
@ -69,11 +65,9 @@
<li class="list-group-item"><%= t("room.no_room.no_recent_rooms") %></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -77,12 +77,14 @@
</div>
<div id="room_block_container" class="row pt-7 pb-5">
<% current_user.ordered_rooms.each do |room| %>
<div class="col-lg-4 col-md-6 col-sm-12">
<%= link_to room do %>
<%= render "rooms/components/room_block", room: room %>
<% end %>
</div>
<% if current_user.role.get_permission("can_create_rooms") %>
<% current_user.ordered_rooms.each do |room| %>
<div class="col-lg-4 col-md-6 col-sm-12">
<%= link_to room do %>
<%= render "rooms/components/room_block", room: room %>
<% end %>
</div>
<% end %>
<% end %>
<% if shared_access_allowed %>
@ -95,7 +97,7 @@
<% end %>
<% end %>
<% unless room_limit_exceeded %>
<% if current_user.role.get_permission("can_create_rooms") && !room_limit_exceeded %>
<%= render "rooms/components/create_room_block"%>
<% end %>
</div>

View File

@ -40,22 +40,22 @@
<% end %>
<%= form_for @user, url: create_user_path, method: :post do |f| %>
<div class="form-group">
<%= f.label t("settings.account.fullname"), class: "form-label" %>
<%= f.label :name, t("settings.account.fullname"), class: "form-label" %>
<%= f.text_field :name, class: "form-control #{form_is_invalid?(@user, :name)}", placeholder: t("settings.account.fullname") %>
<div class="invalid-feedback d-block"><%= @user.errors.full_messages_for(:name).first %></div>
</div>
<div class="form-group">
<%= f.label t("email"), class: "form-label" %>
<%= f.text_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", placeholder: t("email") %>
<%= f.label :email, t("email"), class: "form-label" %>
<%= f.email_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", placeholder: t("email") %>
<div class="invalid-feedback d-block"><%= @user.errors.full_messages_for(:email).first %></div>
</div>
<div class="form-group">
<%= f.label t("password"), class: "form-label" %>
<%= f.label :password, t("password"), class: "form-label" %>
<%= f.password_field :password, class: "form-control #{form_is_invalid?(@user, :password)}", placeholder: t("password") %>
<div class="invalid-feedback d-block"><%= @user.errors.full_messages_for(:password).first %></div>
</div>
<div class="form-group">
<%= f.label t("signup.password_confirm"), class: "form-label" %>
<%= f.label :password_confirmation, t("signup.password_confirm"), class: "form-label" %>
<%= f.password_field :password_confirmation, class: "form-control #{form_is_invalid?(@user, :password_confirmation)}", placeholder: t("signup.password_confirm") %>
<div class="invalid-feedback d-block"><%= @user.errors.full_messages_for(:password_confirmation).first %></div>
</div>

View File

@ -44,7 +44,7 @@
<span class="input-icon-addon">
<i class="fas fa-at"></i>
</span>
<%= f.text_field :email, class: "form-control", placeholder: t("email"), value: "" %>
<%= f.email_field :email, class: "form-control", placeholder: t("email"), value: "" %>
</div>
</div>
<div class="form-group">

View File

@ -17,22 +17,22 @@
<% if key.eql? "success" %>
<div class="alert alert-success alert-dismissible text-center mb-0">
<button type="button" class="close" data-dismiss="alert">&times</button>
<%= value.html_safe %>
<%= value %>
</div>
<% elsif key.eql? "alert" %>
<div class="alert alert-danger alert-dismissible text-center mb-0">
<button type="button" class="close" data-dismiss="alert">&times</button>
<%= value.html_safe %>
<%= value %>
</div>
<% elsif key.eql? "maintenance" %>
<div class="alert alert-info alert-dismissible text-center mb-0">
<%= value.html_safe %>
<%= value %>
<button id="maintenance-close" type="button" data-date="<%= Rails.configuration.maintenance_window %>" class="close" data-dismiss="alert">&times</button>
</div>
<% elsif key.eql? "info" %>
<div class="alert alert-info alert-dismissible text-center mb-0">
<button type="button" class="close" data-dismiss="alert">&times</button>
<%= value.html_safe %>
<%= value %>
</div>
<% end %>
<% end %>

View File

@ -14,7 +14,8 @@
%>
<footer class="footer pt-3">
<p class="text-center mb-1"><%= t("footer.powered_by", href: link_to(t("greenlight"), "https://bigbluebutton.org/2018/07/09/greenlight-2-0/", target: "_blank", rel: "noopener")).html_safe %> <%= Greenlight::Application::VERSION %></p>
<p class="text-center mb-1"><%= t("footer.powered_by", href: link_to(t("greenlight"), "https://bigbluebutton.org/2018/07/09/greenlight-2-0/", target: "_blank", rel: "noopener")).html_safe %> <%= Greenlight::Application::VERSION %>
<%= link_to( ' | ' + t("footer.legal"), legal_url ) if legal_url.present? %><%= link_to( ' | ' + t("footer.privpolicy"), privpolicy_url) if privpolicy_url.present? %></p>
</footer>
<%= render "shared/components/cookie_warning" %>

View File

@ -27,22 +27,14 @@
<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><span class="d-none d-sm-inline-block"><%= t("header.dropdown.home") %></span>
<% 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><span class="d-none d-sm-inline-block"><%= t("header.dropdown.home") %></span>
<% end %>
<%= link_to home_page, class: "px-3 mx-1 mt-1 header-nav #{active_home}" do %>
<i class="fas fa-home pr-1 "></i><span class="d-none d-sm-inline-block"><%= t("header.dropdown.home") %></span>
<% end %>
<% if current_user.highest_priority_role.get_permission("can_create_rooms") %>
<% 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><span class="d-none d-sm-inline-block"><%= t("header.all_recordings") %></span>
<% end %>
<% if current_user.role.get_permission("can_create_rooms") && !current_user.has_role?(:super_admin) %>
<% 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><span class="d-none d-sm-inline-block"><%= t("header.all_recordings") %></span>
<% end %>
<% end %>
@ -62,7 +54,7 @@
<%= 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 %>
<% highest_role = current_user.highest_priority_role %>
<% highest_role = current_user.role %>
<% if highest_role.get_permission("can_manage_users") || highest_role.name == "super_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") %>
@ -91,7 +83,7 @@
<i class="dropdown-icon fas fa-exclamation mr-3"></i><%= t("errors.internal.report") %>
</a>
<% end %>
<%= link_to logout_path, class: "dropdown-item" do %>
<%= button_to logout_path, class: "dropdown-item" do %>
<i class="dropdown-icon fas fa-sign-out-alt"></i> <%= t("header.dropdown.signout") %>
<% end %>
</div>

View File

@ -114,7 +114,7 @@
</tbody>
</table>
<% if !recordings.empty?%>
<div class="float-right mr-4 mt-4">
<div class="float-md-right mt-4">
<%== pagy_bootstrap_nav(pagy) %>
</div>
<% end %>

View File

@ -15,14 +15,14 @@
<tr>
<td>
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
<text>
<div id="recording-title" class="edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
<span id="recording-text" title="<%= recording[:name] %>">
<% if recording[:metadata][:name] %>
<%= recording[:metadata][:name] %>
<% else %>
<%= recording[:name] %>
<% end %>
</text>
</span>
</div>
<div class="small text-muted">
<%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %>

View File

@ -15,14 +15,14 @@
<tr>
<td>
<div id="recording-title" class="form-inline edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
<text id='recording-text'>
<div id="recording-title" class="edit_hover_class" data-recordid="<%= recording[:recordID] %>" data-room-uid="<%= room_uid_from_bbb(recording[:meetingID]) %>" data-path="<%= rename_recording_path(meetingID: recording[:meetingID], record_id: recording[:recordID]) %>">
<span id='recording-text' title="<%= recording[:name] %>">
<% if recording[:metadata][:name] %>
<%= recording[:metadata][:name] %>
<% else %>
<%= recording[:name] %>
<% end %>
</text>
</span>
<a><i id="edit-record" class="fa fa-edit align-top ml-2" data-edit-recordid="<%= recording[:recordID] %>"></i></a>
</div>
<div class="small text-muted">

View File

@ -15,11 +15,11 @@
<div class="row mt-2">
<% if search %>
<div class="col-4">
<div class="col-md-6">
<p class="subtitle"><%= subtitle %></p>
</div>
<div class="col-8">
<div class="col-md-6 mb-4">
<% if admin_invite_registration %>
<div id="invite-user" class="d-inline-block float-right ml-3">
<%= link_to "#inviteModal", :class => "btn btn-primary", "data-toggle": "modal" do %>
@ -51,4 +51,4 @@
<% end %>
</div>
<hr class="mt-0">
<hr class="mt-0">

View File

@ -27,7 +27,7 @@
<span class="input-icon-addon">
<i class="fas fa-envelope"></i>
</span>
<%= f.text_field :email, class: "form-control", value: "", placeholder: t("modal.invite_user.email_placeholder"), autocomplete: :off %>
<%= f.email_field :email, class: "form-control", value: "", placeholder: t("modal.invite_user.email_placeholder"), autocomplete: :off %>
<div class="invalid-feedback text-left"><%= t("modal.invite_user.not_blank") %></div>
</div>
<div class="mt-4">

View File

@ -13,63 +13,56 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<%= form_for @user, url: update_user_path, method: :patch do |f| %>
<%= form_for @user, url: update_user_path, method: :post do |f| %>
<%= hidden_field_tag :setting, "account" %>
<div class="form-group">
<div class="row">
<div class="col-6">
<%= f.label t("settings.account.fullname"), class: "form-label" %>
<div class="col-sm-6 mb-4">
<%= f.label :name, t("settings.account.fullname"), class: "form-label" %>
<div class="input-icon">
<%= f.text_field :name, class: "form-control #{form_is_invalid?(@user, :name)}", placeholder: t("settings.account.fullname") %>
<%= f.text_field :name, class: "form-control #{form_is_invalid?(@user, :name)}", placeholder: t("settings.account.fullname"), readonly: !@user.greenlight_account? %>
</div>
</div>
<div class="col-6">
<%= f.label t("email"), class: "form-label" %>
<div class="col-sm-6 mb-4">
<%= f.label :email, t("email"), class: "form-label" %>
<div class="input-icon">
<%= f.text_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", placeholder: t("email"), readonly: !@user.greenlight_account? %>
<%= f.email_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", placeholder: t("email"), readonly: !@user.greenlight_account? %>
</div>
</div>
</div>
<br>
<%= f.label t("settings.account.provider"), class: "form-label" %>
<%= f.label :provider, t("settings.account.provider"), class: "form-label" %>
<%= f.text_field :provider, class: "form-control", readonly: "" %>
<br>
<%= f.label t("settings.account.language"), class: "form-label" %>
<%= f.label :language, t("settings.account.language"), class: "form-label" %>
<%= f.select :language, language_options, {}, { class: "form-control custom-select" } %>
<% current_user_role = current_user.highest_priority_role %>
<br>
<br>
<%= f.label t("settings.account.roles"), class: "form-label" %>
<div id="role-tag-container" class="tags mb-1">
<% @user.roles.by_priority.each do |role| %>
<span id="<%= "user-role-tag_#{role.id}" %>" style="<%= "background-color: #{role_colour(role)};border-color: #{role_colour(role)};" %>" class="tag user-role-tag">
<%= translated_role_name(role) %>
<% if (current_user_role.get_permission("can_manage_users") || current_user_role.name == "super_admin") && (role.priority > current_user_role.priority || current_user_role.name == "admin") %>
<a data-role-id="<%= role.id %>" class="tag-addon clear-role">
<i data-role-id="<%= role.id %>" class="fas fa-times"></i>
</a>
<% end %>
</span>
<% end %>
</div>
<% if current_user_role.get_permission("can_manage_users") || current_user_role.name == "super_admin" %>
<% provider = Rails.configuration.loadbalanced_configuration ? current_user.provider : "greenlight" %>
<%= f.select :roles, Role.editable_roles(@user_domain).map{|role| [translated_role_name(role), role.id, {'data-colour' => role_colour(role)}]}.unshift(["", nil, {'data-colour' => nil}]), {disabled: disabled_roles(@user)}, { class: "form-control custom-select", id: "role-select-dropdown" } %>
<% end %>
<%= f.hidden_field :role_ids, id: "user_role_ids", value: @user.roles.by_priority.pluck(:id).uniq %>
<%= f.label :roles, t("settings.account.roles"), class: "form-label mt-5" %>
<% if current_user.role.get_permission("can_manage_users") %>
<select id="role-dropdown" class="selectpicker show-tick" >
<% role_options.each do |role| %>
<option value="<%=role.id%>"><%= translated_role_name(role) %></option>
<% end %>
</select>
<%= f.label t("settings.account.image"), class: "form-label mt-5" %>
<%= f.hidden_field :role_id, id: "user_role_id", value: @user.role.id %>
<% else %>
<span style="<%= "background-color: #{role_colour(@user.role)};border-color: #{role_colour(@user.role)};" %>" class="tag custom-role-tag">
<%= translated_role_name(@user.role) %>
</span>
<% end %>
<%= f.label :image, t("settings.account.image"), class: "form-label mt-5" %>
<div class="row">
<div class="col-2">
<% if @user.image.blank? %>
<div class="col-5 col-sm-2">
<% if @user.image.blank? || !valid_url?(@user.image) %>
<span class="avatar avatar-xxl mr-5 mt-2 bg-primary"><%= @user.name.first %></span>
<% else %>
<span class="avatar avatar-xxl mr-5 mt-2" style="background-image: url(<%= @user.image %>)"></span>
<%= image_tag(@user.image, class: "avatar avatar-xxl mr-5 mt-2") %>
<% end %>
</div>
<div class="col-10 mt-5">
<div class="col-7 col-sm-10 mt-5">
<%= f.text_field :image, class: "form-control #{form_is_invalid?(@user, :image)}", placeholder: t("settings.account.image_url") %>
</div>
</div>
@ -78,7 +71,7 @@
<%= f.submit t("update"), class: "btn btn-primary float-right ml-4" %>
<% if can_reset_password %>
<%= link_to "Reset user password", admin_reset_path(user_uid: @user.uid), class: "btn btn-primary float-right" %>
<%= link_to t("settings.account.reset_password"), admin_reset_path(user_uid: @user.uid), class: "btn btn-primary float-right" %>
<% end %>
</div>
<% end %>

View File

@ -13,7 +13,7 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<%= form_for @user, url: update_user_path, method: :patch do |f| %>
<%= form_for @user, url: update_password_path, method: :post do |f| %>
<%= hidden_field_tag :setting, "password" %>
<div class="form-group">
<div class="row">