mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
registrar flash cleanup
This commit is contained in:
parent
ec4c06bb06
commit
eeec5705d9
3 changed files with 13 additions and 8 deletions
|
@ -17,6 +17,10 @@ class Registrar::DeppController < RegistrarController # EPP controller
|
||||||
redirect_to registrar_login_url and return unless depp_current_user
|
redirect_to registrar_login_url and return unless depp_current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def depp_controller?
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
def depp_current_user
|
def depp_current_user
|
||||||
return nil unless current_user
|
return nil unless current_user
|
||||||
@depp_current_user ||= Depp::User.new(
|
@depp_current_user ||= Depp::User.new(
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
class RegistrarController < ApplicationController
|
class RegistrarController < ApplicationController
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
layout 'registrar/application'
|
layout 'registrar/application'
|
||||||
|
|
||||||
|
helper_method :depp_controller?
|
||||||
|
def depp_controller?
|
||||||
|
false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,14 +56,10 @@
|
||||||
|
|
||||||
/ /.nav-collapse
|
/ /.nav-collapse
|
||||||
.container
|
.container
|
||||||
-# - if params[:controller].start_with?('depp/')
|
= render 'registrar/shared/flash'
|
||||||
-# = render 'depp/shared/flash'
|
- if depp_controller?
|
||||||
-# = render 'depp/shared/epp_results'
|
= render 'registrar/shared/epp_results'
|
||||||
-# - else
|
|
||||||
- display = (flash.empty?) ? 'none' : 'block'
|
|
||||||
#flash{style: "display: #{display};"}
|
|
||||||
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
|
||||||
.alert{class: type}= flash[:notice] || flash[:alert]
|
|
||||||
= yield
|
= yield
|
||||||
|
|
||||||
.footer.text-right
|
.footer.text-right
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue