Sha256: 6c17767d4de472c5d19f7ecc58576c91898eaf67782dd49b9b94fb54edb0ded2

Contents?: true

Size: 865 Bytes

Versions: 21

Compression:

Stored size: 865 Bytes

Contents

module Fiona7LoginHelper
  def fiona7_login_path
    fiona7_engine.fiona7_login_path
  end

  def fiona7_login_url
    fiona7_engine.fiona7_login_url
  end

  def fiona7_logout_path
    fiona7_engine.fiona7_logout_path
  end

  def fiona7_logout_url
    fiona7_engine.fiona7_logout_url
  end

  def fiona7_logged_in?
    rsession.user?
  end

  def fiona7_login_button(classes='navbar-btn navbar-right')
    if fiona7_logged_in?
      link_to fiona7_logout_path, class: classes, method: :delete do
        "<button class=\"btn btn-warning\">#{t(:'fiona7.logout')}</button>".html_safe
      end
    else

      link_to scrivito_path(Fiona7LoginPage.instance || raise("Object of class 'Fiona7LoginPage' count not be found in the CM")), class: classes do
        "<button class=\"btn btn-success\">#{t(:'fiona7.login')}</button>".html_safe
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.6.1.1.1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.6.1.1.0 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.2.3 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.2.1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.2.2 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.5.5.1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.5.5.0 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.1.4 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.5.4.1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.5.4.0 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.1.3 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.5.3.1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.4.3.0 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.3.2.0 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.5.2.0.0 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.1.1 app/helpers/fiona7_login_helper.rb
infopark_fiona7-1.2.0.0.1 app/helpers/fiona7_login_helper.rb