Skip to content

niedhui/bootstrap-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails 3.1

Include BootstrapHelper in Gemfile:

gem 'bootstrap-helper',git: 'git://github.com/niedhui/bootstrap-helper.git'

topbar(Navigation)

- topbar do |bar|
  = bar.brand_name "YourBrandName",root_path
  = bar.nav do
    = bar.item 'label1',               "/url/url"
    = bar.dropdown "dropdown_menu" do
      = bar.item 'label2',              "/url2/url2"
      = bar.item 'label3',              "/url3/url3"
  = bar.second_nav do     
    = bar.item 'label4',               "/url4/url4"

modal

- modal id: "my_modal" do |m| 
  = m.header "修改备注"
  = m.body do
    %textarea#remark_field{style:"width: 95%"}
  = m.footer do
    = primary_link_to "确定","#"

table

  - bt_table users do |table|
    = table.ths "email","name"
    = table.tds :email, ->(user) { user.first_name+ user.last_name}

buttons

  - bt_button_group "Actions" do
    %li= link_to "hello",   hello_path
    %li= link_to "bye",     bye_path
    %li.divider
    %li= link_to "nihao"

About

Some view helpers for twitter bootstrap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published