forked from External/greenlight
finish settings and public recordings
This commit is contained in:
@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/sessions", recordings: @recordings %>
|
||||
<%= render "shared/sessions", recordings: @recordings, only_public: false %>
|
||||
|
||||
<script>
|
||||
var invite_url;
|
||||
|
@ -18,7 +18,7 @@
|
||||
</a>
|
||||
<div class="dropdown">
|
||||
<a href="#" class="nav-link pr-0" data-toggle="dropdown">
|
||||
<% if current_user.image.nil? %>
|
||||
<% if current_user.image.blank? %>
|
||||
<span class="avatar"><%= current_user.name.first %></span>
|
||||
<% else %>
|
||||
<span class="avatar" style="background-image: url(<%= current_user.image %>)"></span>
|
||||
|
@ -24,3 +24,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/sessions", recordings: @recordings, only_public: true %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="sessions pb-5">
|
||||
<div class="container pt-6">
|
||||
|
||||
<%= render "shared/components/subtitle", subtitle: "Recordings", search: true %>
|
||||
<%= render "shared/components/subtitle", subtitle: (only_public ? "Public " : "") + "Recordings", search: true %>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
@ -22,7 +22,7 @@
|
||||
<% if recordings.empty? %>
|
||||
<tr>
|
||||
<td colspan="7" class="text-center h4 p-6 font-weight-normal">
|
||||
This room has no recordings.
|
||||
<%= "This room has no #{(only_public ? "public " : "")} recordings." %>
|
||||
</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
|
@ -3,11 +3,10 @@
|
||||
<div class="modal-content text-center">
|
||||
<div class="modal-body">
|
||||
<div class="card-body p-6">
|
||||
<div class="card-title text-primary">
|
||||
<div class="card-title">
|
||||
<h3>Create New Room</h3>
|
||||
</div>
|
||||
|
||||
<hr class="small-rule">
|
||||
<%= form_for(:room, url: rooms_path) do |f| %>
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
|
@ -5,26 +5,34 @@
|
||||
<div class="col-6">
|
||||
<%= f.label "Fullname", class: "form-label" %>
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-user"></i>
|
||||
</span>
|
||||
<%= f.text_field :name, class: "form-control", value: @user.name, placeholder: "Fullname" %>
|
||||
<%= f.text_field :name, class: "form-control #{form_is_invalid?(@user, :name)}", value: @user.name, placeholder: "Fullname" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<%= f.label "Email", class: "form-label" %>
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-at"></i>
|
||||
</span>
|
||||
<%= f.text_field :email, class: "form-control #{'is-invalid' if !@user.errors.messages[:email].empty?}", value: @user.email, placeholder: "Email" %>
|
||||
<%= f.text_field :email, class: "form-control #{form_is_invalid?(@user, :email)}", value: @user.email, placeholder: "Email" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<%= f.label "Provider", class: "form-label" %>
|
||||
<%= f.text_field :provider, class: "form-control", value: @user.provider.capitalize, readonly: "" %>
|
||||
|
||||
<%= f.label "Image", class: "form-label mt-5" %>
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<% if current_user.image.blank? %>
|
||||
<span class="avatar avatar-xxl mr-5 mt-2"><%= current_user.name.first %></span>
|
||||
<% else %>
|
||||
<span class="avatar avatar-xxl mr-5 mt-2" style="background-image: url(<%= current_user.image %>)"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-10" style="transform: translateY(25%);">
|
||||
<%= f.text_field :image, class: "form-control #{form_is_invalid?(@user, :image)}", value: @user.image, placeholder: "Profile Image URL" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<%= f.submit "Update", class: "btn btn-primary float-right" %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
|
||||
<div class="col-12">
|
||||
<center>Customization not currently supported.</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div>
|
@ -4,13 +4,13 @@
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<%= f.label "Old Password", class: "form-label" %>
|
||||
<%= f.password_field :password, class: "form-control" %>
|
||||
<%= f.password_field :password, class: "form-control #{form_is_invalid?(@user, :password)}" %>
|
||||
<br>
|
||||
<%= f.label "New Password", class: "form-label" %>
|
||||
<%= f.password_field :new_password, class: "form-control" %>
|
||||
<%= f.password_field :new_password, class: "form-control #{form_is_invalid?(@user, :password)}" %>
|
||||
<br>
|
||||
<%= f.label "New Password Confirmation", class: "form-label" %>
|
||||
<%= f.password_field :password_confirmation, class: "form-control" %>
|
||||
<%= f.password_field :password_confirmation, class: "form-control #{form_is_invalid?(@user, :password_confirmation)}" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,23 +5,19 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-3 mb-4">
|
||||
<div class="list-group list-group-transparent mb-0">
|
||||
<%= link_to edit_user_path(@user, setting: "account"), id: "account", class: "list-group-item list-group-item-action setting-btn" do %>
|
||||
<button id="account" class="list-group-item list-group-item-action setting-btn active">
|
||||
<span class="icon mr-3"><i class="fe fe-user"></i></span>Account
|
||||
<% end %>
|
||||
|
||||
<%= link_to edit_user_path(@user, setting: "image"), id: "image", class: "list-group-item list-group-item-action setting-btn" do %>
|
||||
<span class="icon mr-3"><i class="fe fe-image"></i></span>Profile Image
|
||||
<% end %>
|
||||
</button>
|
||||
|
||||
<% if @user.social_uid.nil? %>
|
||||
<%= link_to edit_user_path(@user, setting: "password"), id: "password", class: "list-group-item list-group-item-action setting-btn" do %>
|
||||
<button id="password" class="list-group-item list-group-item-action setting-btn">
|
||||
<span class="icon mr-3"><i class="fe fe-lock"></i></span>Password
|
||||
<% end %>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
<%= link_to edit_user_path(@user, setting: "design"), id: "design", class: "list-group-item list-group-item-action setting-btn" do %>
|
||||
<button id="design" class="list-group-item list-group-item-action setting-btn">
|
||||
<span class="icon mr-3"><i class="fe fe-edit-2"></i></span>Design
|
||||
<% end %>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<% if @user.errors.any? %>
|
||||
@ -41,7 +37,6 @@
|
||||
|
||||
<div class="col-lg-9">
|
||||
<%= render "shared/settings/setting_view", setting_id: "account", setting_title: "Update your Account Info" %>
|
||||
<%= render "shared/settings/setting_view", setting_id: "image", setting_title: "Change your Profile Image" %>
|
||||
|
||||
<% if @user.social_uid.nil? %>
|
||||
<%= render "shared/settings/setting_view", setting_id: "password", setting_title: "Change your Password" %>
|
||||
@ -53,34 +48,23 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
/*
|
||||
// Helper for grabbing URL params.
|
||||
$.urlParam = function(name){
|
||||
var results = new RegExp('[\?&]' + name + '=([^]*)').exec(window.location.href);
|
||||
if (results==null){
|
||||
return null;
|
||||
} else {
|
||||
return results[1] || 0;
|
||||
}
|
||||
}
|
||||
|
||||
settingsButtons = $('.setting-btn');
|
||||
settingsViews = $('.setting-view');
|
||||
|
||||
$(document).ready(function(){
|
||||
var setting = $.urlParam("setting");
|
||||
|
||||
/*if (!["account", "image", "password", "design"].includes(setting)){
|
||||
var url = [location.protocol, '//', location.host, location.pathname].join('');
|
||||
window.location.href = url + "?setting=account";
|
||||
}
|
||||
if (!["account", "image", "password", "design"].includes(setting)){ setting = "account"; }
|
||||
|
||||
$("#" + setting).addClass("active");
|
||||
|
||||
settingsViews.each(function(i, view){
|
||||
if($(view).attr("id") != setting){
|
||||
$(view).hide();
|
||||
}
|
||||
settingsButtons.each(function(i, btn) {
|
||||
if(i != 0){ $(settingsViews[i]).hide(); }
|
||||
$(btn).click(function(){
|
||||
$(btn).addClass("active");
|
||||
settingsViews.each(function(i, view){
|
||||
if($(view).attr("id") == $(btn).attr("id")){
|
||||
$(view).show();
|
||||
} else {
|
||||
$(settingsButtons[i]).removeClass("active");
|
||||
$(view).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});*/
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user