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
|
||||
end
|
||||
|
||||
def depp_controller?
|
||||
true
|
||||
end
|
||||
|
||||
def depp_current_user
|
||||
return nil unless current_user
|
||||
@depp_current_user ||= Depp::User.new(
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
class RegistrarController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
layout 'registrar/application'
|
||||
|
||||
helper_method :depp_controller?
|
||||
def depp_controller?
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -56,14 +56,10 @@
|
|||
|
||||
/ /.nav-collapse
|
||||
.container
|
||||
-# - if params[:controller].start_with?('depp/')
|
||||
-# = render 'depp/shared/flash'
|
||||
-# = render 'depp/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]
|
||||
= render 'registrar/shared/flash'
|
||||
- if depp_controller?
|
||||
= render 'registrar/shared/epp_results'
|
||||
|
||||
= yield
|
||||
|
||||
.footer.text-right
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue