Sha256: 389d954f968bad26f4dcdb6b79af1dfcd4f975d5a51710f16f5c387ec56c5791

Contents?: true

Size: 842 Bytes

Versions: 10

Compression:

Stored size: 842 Bytes

Contents

class ViewWithVars < Garterbelt::View
  needs :user, :params => {}
  
  def content
    div.c(:line) do
      div.c(:unit, :size1of2) do
        h4 "Login"
        form :action => "/login", :class => :inner do
          label.c(:input) do
            text "Username or Email"
            input :name => 'login', :type => :text, :value => user.email || user.name
          end
          
          label.c(:input) do
            text "Password"
            input :name => 'password', :type => :password
          end
          
          label.c(:remember_me) do
            text "Remember Me"
            input :name => 'remember_me', :type => :checkbox, :checked => params[:remember_me]
          end
          
          hr.c(:light)
          
          input :type => :submit, :value => "Login"
        end 
      end
    end
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
garterbelt-0.1.1 spec/integration/templates/view_with_vars.rb
garterbelt-0.1.0 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.9 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.8 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.7 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.6 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.5 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.4 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.3 spec/integration/templates/view_with_vars.rb
garterbelt-0.0.2 spec/integration/templates/view_with_vars.rb