-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
339 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class UserSetting < ApplicationRecord | ||
belongs_to :user | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<% | ||
# 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/>. | ||
%> | ||
<%= form_for @user, url: user_update_settings_path, method: :post do |f| %> | ||
<%= hidden_field_tag :setting, "join_settings" %> | ||
<div class="form-group"> | ||
<div class="row"> | ||
<% @join_settings.each_with_index do |p, idx| %> | ||
<div class="col-8"> | ||
<label class="custom-switch pl-0 mt-3 mb-3 w-100 text-left d-inline-block"> | ||
<span class="ml-0 custom-switch-description"><%= t("settings.user_settings." + p ) %></span> | ||
<% if @user.user_settings_as_hash.key?(p) %> | ||
<%= f.check_box p, :checked => (@user.user_settings_as_hash[p] == "true"), class: "custom-switch-input", disabled: false %> | ||
<% else %> | ||
<%= f.check_box p, :checked => (@join_settings_defaults[idx] == "true"), class: "custom-switch-input", disabled: false %> | ||
<% end %> | ||
<span class="custom-switch-indicator float-right"></span> | ||
</label> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="card-footer"> | ||
<%= f.submit t("update"), class: "btn btn-primary float-right" %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<% | ||
# 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="container pt-6"> | ||
<%= render "shared/components/subtitle", subtitle: t("settings.title"), search: false %> | ||
|
||
<div class="row"> | ||
<div class="col-lg-3 mb-4"> | ||
<%= render "users/components/menu_buttons" %> | ||
<% if @user.errors.any? %> | ||
<h5 class="mt-8"><%= t("errors.title") %>:</h5> | ||
<ul> | ||
<% @user.errors.full_messages.each do |err| %> | ||
<li class="text-danger"><%= err %>.</li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
</div> | ||
<div class="col-lg-9"> | ||
<%= render "users/components/setting_view", setting_id: "join_settings", setting_title: "Settings" %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateUserSettings < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :user_settings do |t| | ||
t.string :name | ||
t.string :value, default: "" | ||
t.references :user, foreign_key: true | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.