registrar flash cleanup

This commit is contained in:
Priit Tark 2015-04-09 17:21:49 +03:00
parent ec4c06bb06
commit eeec5705d9
3 changed files with 13 additions and 8 deletions

View file

@ -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(

View file

@ -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

View file

@ -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