bootstrap_builder 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.DS_Store ADDED
Binary file
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Jack Neto, The Working Group
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Bootstrap Builder
2
+ Author: [The Working Group](http://www.theworkinggroup.ca)
3
+
4
+ ---
5
+
6
+ ## What is it?
7
+
8
+ A Rails form builder that generates [Twitter Bootstrap](http://twitter.github.com/bootstrap) markup and helps keep your code clean.
9
+
10
+ * Uses existing Rails helpers
11
+ * Autogenerates labels
12
+
13
+
14
+ ## Installation
15
+
16
+ Add gem definition to your Gemfile:
17
+
18
+ gem 'bootstrap_builder'
19
+
20
+ Then from the Rails project's root run:
21
+
22
+ bundle install
23
+
24
+ ## Usage (with haml)
25
+
26
+ ### A sample user form
27
+
28
+ Override the autogenerated label by using the `:label` option on any element
29
+
30
+ = bootstrap_form_for @user, :url => [:admin, @user] do |f|
31
+ = f.text_field :name
32
+ = f.text_field :email
33
+ = f.password_field :password
34
+ = f.password_field :password_confirmation
35
+ = f.select :role, User::ROLES
36
+ = f.time_zone_select :time_zone
37
+ = f.check_box :reminder, :label => 'Send Daily Reminder?'
38
+ = f.submit 'Save'
39
+
40
+ ### A login form
41
+
42
+ Add a class to the form or any field to change the way it is rendered.
43
+
44
+ = bootstrap_form_for @session_user, :url => login_path, :class => 'form-horizontal' do |f|
45
+ = f.text_field :email
46
+ = f.password_field :password
47
+ = f.check_box :remember_me, :label => 'Remember me when I come back'
48
+ = f.submit 'Log In'
49
+
50
+ ### A search form
51
+
52
+ Hide the label by passing `:label => ''` on any field.
53
+
54
+ Useful for inline search forms.
55
+
56
+
57
+ = bootstrap_form_for @search, :url => [:admin, :users], :html => {:method => :get, :class => 'form-search'} do |f|
58
+ = f.text_field :name_equals, :label => 'Find by', :placeholder => 'Name'
59
+ = f.select :role_equals, User::ROLES, :label => ''
60
+ = f.submit 'Search', :class => 'btn-default'
61
+
62
+ *(Example using [MetaSearch](https://github.com/ernie/meta_search) helpers)*
63
+
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'jeweler'
4
+
5
+ Jeweler::Tasks.new do |gem|
6
+ gem.name = "bootstrap_builder"
7
+ gem.homepage = "http://github.com/twg/bootstrap_builder"
8
+ gem.license = "MIT"
9
+ gem.summary = "A Rails form builder that generates Twitter Bootstrap markup"
10
+ gem.description = ''
11
+ gem.email = "jack@twg.ca"
12
+ gem.authors = ["Jack Neto", 'The Working Group Inc.']
13
+ end
14
+ Jeweler::RubygemsDotOrgTasks.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
data/app/.DS_Store ADDED
Binary file