Sha256: a32c2e7250c72ac3c403dbd35d5382232c294918ffda8556af293a5db2044a2c

Contents?: true

Size: 1.17 KB

Versions: 12

Compression:

Stored size: 1.17 KB

Contents

module Widgets
  module Login
    class Base < ErpApp::Widgets::Base

      def index
        @logout_to  = params[:logout_to]
        @login_to   = (session[:return_to_url] or params[:login_to])
        @signup_url = params[:signup_url]
        @reset_password_url = params[:reset_password_url]
    
        render
      end

      def login_header
        @login_url     = params[:login_url]
        @signup_url    = params[:signup_url]
        @authenticated = logged_in?
        @user = current_user if logged_in?
        
        render
      end

      def reset_password
        @login_url     = params[:login_url]
        
        render
      end

      #should not be modified
      #modify at your own risk
      def locate
        File.dirname(__FILE__)
      end
        
      class << self
        def title
          "Login"
        end

        def views_location
          File.join(File.dirname(__FILE__),"/views")
        end
          
        def base_layout
          begin
            file = File.join(File.dirname(__FILE__),"/views/layouts/base.html.erb")
            IO.read(file)
          rescue
            return nil
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
knitkit-2.1.15 app/widgets/login/base.rb
knitkit-2.1.14 app/widgets/login/base.rb
knitkit-2.1.13 app/widgets/login/base.rb
knitkit-2.1.12 app/widgets/login/base.rb
knitkit-2.1.11 app/widgets/login/base.rb
knitkit-2.1.10 app/widgets/login/base.rb
knitkit-2.1.9 app/widgets/login/base.rb
knitkit-2.1.8 app/widgets/login/base.rb
knitkit-2.1.7 app/widgets/login/base.rb
knitkit-2.1.6 app/widgets/login/base.rb
knitkit-2.1.5 app/widgets/login/base.rb
knitkit-2.1.4 app/widgets/login/base.rb