forked from External/greenlight
Merge branch 'master' into translations_en-yml--master_es_MX
This commit is contained in:
commit
6acb924c38
|
@ -23,7 +23,12 @@ $(document).on('turbolinks:load', function(){
|
|||
// show the modal with the correct form action url
|
||||
$(".delete-user").click(function(data){
|
||||
var uid = $(data.target).closest("tr").data("user-uid")
|
||||
$("#delete-confirm").parent().attr("action", "/u/" + uid)
|
||||
var url = $("body").data("relative-root")
|
||||
if (!url.endsWith("/")) {
|
||||
url += "/"
|
||||
}
|
||||
url += "u/" + uid
|
||||
$("#delete-confirm").parent().attr("action", url)
|
||||
})
|
||||
|
||||
// Change the color of the color inputs when the color is changed
|
||||
|
@ -66,13 +71,13 @@ $(document).on('turbolinks:load', function(){
|
|||
|
||||
// Only run on the admins edit user page.
|
||||
if (controller == "admins" && action == "edit_user") {
|
||||
$("#users").click(function(data){
|
||||
$(".setting-btn").click(function(data){
|
||||
var url = $("body").data("relative-root")
|
||||
if (!url.endsWith("/")) {
|
||||
url += "/"
|
||||
}
|
||||
url += "admins"
|
||||
|
||||
url += "admins?setting=" + data.target.id
|
||||
window.location.href = url
|
||||
})
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ class AdminsController < ApplicationController
|
|||
@search = params[:search] || ""
|
||||
@order_column = params[:column] && params[:direction] != "none" ? params[:column] : "created_at"
|
||||
@order_direction = params[:direction] && params[:direction] != "none" ? params[:direction] : "DESC"
|
||||
puts @order_direction.to_s
|
||||
|
||||
if Rails.configuration.loadbalanced_configuration
|
||||
@pagy, @users = pagy(User.without_role(:super_admin)
|
||||
|
|
|
@ -36,7 +36,7 @@ module SessionsHelper
|
|||
redirect_to admins_path
|
||||
elsif user.activated?
|
||||
# Dont redirect to any of these urls
|
||||
dont_redirect_to = [root_url, signup_url, unauthorized_url, internal_error_url, not_found_url]
|
||||
dont_redirect_to = [root_url, signin_url, signup_url, unauthorized_url, internal_error_url, not_found_url]
|
||||
url = if cookies[:return_to] && !dont_redirect_to.include?(cookies[:return_to])
|
||||
cookies[:return_to]
|
||||
else
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<%= render "shared/settings/setting_view", admin_view: true, setting_id: "site_settings", setting_title: t("administrator.site_settings.subtitle") %>
|
||||
<% end %>
|
||||
|
||||
<%= render "shared/modals/delete_account_modal", delete_location: "/" %>
|
||||
<%= render "shared/modals/delete_account_modal", delete_location: relative_root %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<% elsif allow_greenlight_accounts %>
|
||||
<%= 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" %>
|
||||
<%= link_to t("login"), omniauth_login_url(:bn_launcher), :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% else %>
|
||||
<%= link_to t("login"), signin_path, :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue