twitter_bootstrap_builder 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/.gitignore +18 -18
  2. data/Gemfile +4 -4
  3. data/LICENSE +21 -21
  4. data/README.md +29 -29
  5. data/Rakefile +2 -2
  6. data/app/views/kaminari/twitter_bootstrap/_first_page.html.haml +15 -15
  7. data/app/views/kaminari/twitter_bootstrap/_gap.html.haml +8 -8
  8. data/app/views/kaminari/twitter_bootstrap/_last_page.html.haml +12 -12
  9. data/app/views/kaminari/twitter_bootstrap/_next_page.html.haml +13 -13
  10. data/app/views/kaminari/twitter_bootstrap/_page.html.haml +15 -15
  11. data/app/views/kaminari/twitter_bootstrap/_paginator.html.haml +20 -20
  12. data/app/views/kaminari/twitter_bootstrap/_prev_page.html.haml +13 -13
  13. data/lib/twitter_bootstrap_builder.rb +26 -26
  14. data/lib/twitter_bootstrap_builder/builders/base.rb +19 -19
  15. data/lib/twitter_bootstrap_builder/builders/drop_down_builder.rb +19 -19
  16. data/lib/twitter_bootstrap_builder/builders/drop_down_button_builder.rb +10 -10
  17. data/lib/twitter_bootstrap_builder/builders/drop_down_link_builder.rb +10 -10
  18. data/lib/twitter_bootstrap_builder/builders/fieldset_builder.rb +116 -116
  19. data/lib/twitter_bootstrap_builder/builders/form_builder.rb +10 -10
  20. data/lib/twitter_bootstrap_builder/builders/link_button_builder.rb +14 -14
  21. data/lib/twitter_bootstrap_builder/builders/nav_bar_builder.rb +24 -24
  22. data/lib/twitter_bootstrap_builder/builders/nav_container_builder.rb +38 -38
  23. data/lib/twitter_bootstrap_builder/builders/nav_list_builder.rb +37 -37
  24. data/lib/twitter_bootstrap_builder/builders/submit_button_builder.rb +14 -14
  25. data/lib/twitter_bootstrap_builder/builders/tab_builder.rb +22 -22
  26. data/lib/twitter_bootstrap_builder/builders/table_builder.rb +77 -77
  27. data/lib/twitter_bootstrap_builder/engine.rb +16 -16
  28. data/lib/twitter_bootstrap_builder/extensions/twitter_bootstrap_markup.rb +6 -6
  29. data/lib/twitter_bootstrap_builder/helpers/buttons_helper.rb +50 -50
  30. data/lib/twitter_bootstrap_builder/helpers/commons_helper.rb +148 -114
  31. data/lib/twitter_bootstrap_builder/helpers/dropdowns_helper.rb +32 -32
  32. data/lib/twitter_bootstrap_builder/version.rb +3 -3
  33. data/twitter_bootstrap_builder.gemspec +20 -20
  34. data/vendor/assets/javascripts/bootstrap.js +1737 -1737
  35. data/vendor/assets/javascripts/twitter_bootstrap_builder.js +27 -27
  36. data/vendor/assets/stylesheets/bootstrap.css +4914 -4914
  37. data/vendor/assets/stylesheets/twitter_bootstrap_builder.css +57 -33
  38. metadata +17 -7
data/.gitignore CHANGED
@@ -1,18 +1,18 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- .idea
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .idea
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in twitter_bootstrap_builder.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in twitter_bootstrap_builder.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2012 gabriel
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ Copyright (c) 2012 gabriel
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,29 +1,29 @@
1
- # TwitterBootstrapBuilder
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'twitter_bootstrap_builder'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install twitter_bootstrap_builder
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Added some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
1
+ # TwitterBootstrapBuilder
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'twitter_bootstrap_builder'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install twitter_bootstrap_builder
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -1,15 +1,15 @@
1
- -# Link to the "First" page
2
- - available local variables
3
- url: url to the first page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -
9
- %li{:class => '.first' + (current_page.first? ? ' active' : '')}
10
- - if current_page.first?
11
- %a= raw(t 'views.pagination.first')
12
- - else
13
- = link_to raw(t 'views.pagination.first'), url, :remote => remote
14
-
15
-
1
+ -# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -
9
+ %li{:class => '.first' + (current_page.first? ? ' active' : '')}
10
+ - if current_page.first?
11
+ %a= raw(t 'views.pagination.first')
12
+ - else
13
+ = link_to raw(t 'views.pagination.first'), url, :remote => remote
14
+
15
+
@@ -1,9 +1,9 @@
1
- -# Non-link tag that stands for skipped pages...
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- -
8
- %li.page.gap
1
+ -# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -
8
+ %li.page.gap
9
9
  %a= raw(t 'views.pagination.truncate')
@@ -1,13 +1,13 @@
1
- -# Link to the "Last" page
2
- - available local variables
3
- url: url to the last page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -
9
- %li{:class => 'last' + (current_page.last? ? ' active' : '')}
10
- - if current_page.last?
11
- %a= raw(t 'views.pagination.last')
12
- - else
1
+ -# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -
9
+ %li{:class => 'last' + (current_page.last? ? ' active' : '')}
10
+ - if current_page.last?
11
+ %a= raw(t 'views.pagination.last')
12
+ - else
13
13
  = link_to raw(t 'views.pagination.last'), url, {:remote => remote}
@@ -1,13 +1,13 @@
1
- -# Link to the "Next" page
2
- - available local variables
3
- url: url to the next page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -
9
- %li{:class => 'next' + (current_page.last? ? ' active' : '')}
10
- - if current_page.last?
11
- %a= raw(t 'views.pagination.next')
12
- - else
13
- = link_to raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
1
+ -# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -
9
+ %li{:class => 'next' + (current_page.last? ? ' active' : '')}
10
+ - if current_page.last?
11
+ %a= raw(t 'views.pagination.next')
12
+ - else
13
+ = link_to raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
@@ -1,15 +1,15 @@
1
- -# Link showing page number
2
- - available local variables
3
- page: a page object for "this" page
4
- url: url to this page
5
- current_page: a page object for the currently displayed page
6
- num_pages: total number of pages
7
- per_page: number of items to fetch per page
8
- remote: data-remote
9
- -
10
- %li{:class => 'page' + (page.current? ? ' active' : '')}
11
- - if page.current?
12
- %a= page
13
- - else
14
- = link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
15
-
1
+ -# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -
10
+ %li{:class => 'page' + (page.current? ? ' active' : '')}
11
+ - if page.current?
12
+ %a= page
13
+ - else
14
+ = link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
15
+
@@ -1,20 +1,20 @@
1
- -# The container tag
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- paginator: the paginator that renders the pagination tags inside
8
- -
9
- = paginator.render do
10
- %nav.pagination
11
- %ul
12
- = first_page_tag
13
- = prev_page_tag
14
- - each_page do |page|
15
- - if page.left_outer? || page.right_outer? || page.inside_window?
16
- = page_tag page
17
- - elsif !page.was_truncated?
18
- = gap_tag
19
- = next_page_tag
20
- = last_page_tag
1
+ -# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -
9
+ = paginator.render do
10
+ %nav.pagination
11
+ %ul
12
+ = first_page_tag
13
+ = prev_page_tag
14
+ - each_page do |page|
15
+ - if page.left_outer? || page.right_outer? || page.inside_window?
16
+ = page_tag page
17
+ - elsif !page.was_truncated?
18
+ = gap_tag
19
+ = next_page_tag
20
+ = last_page_tag
@@ -1,13 +1,13 @@
1
- -# Link to the "Previous" page
2
- - available local variables
3
- url: url to the previous page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -
9
- %li{:class => 'prev' + (current_page.first? ? ' active' : '')}
10
- - if current_page.first?
11
- %a= raw(t 'views.pagination.previous')
12
- - else
13
- = link_to raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
1
+ -# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -
9
+ %li{:class => 'prev' + (current_page.first? ? ' active' : '')}
10
+ - if current_page.first?
11
+ %a= raw(t 'views.pagination.previous')
12
+ - else
13
+ = link_to raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
@@ -1,26 +1,26 @@
1
- require 'twitter_bootstrap_builder/version'
2
- require 'twitter_bootstrap_builder/engine'
3
-
4
- require 'twitter_bootstrap_markup'
5
- require 'kaminari'
6
-
7
- require 'twitter_bootstrap_builder/extensions/twitter_bootstrap_markup'
8
-
9
- require 'twitter_bootstrap_builder/helpers/commons_helper'
10
- require 'twitter_bootstrap_builder/helpers/buttons_helper'
11
- require 'twitter_bootstrap_builder/helpers/dropdowns_helper'
12
-
13
- require 'twitter_bootstrap_builder/builders/base'
14
- require 'twitter_bootstrap_builder/builders/drop_down_builder'
15
- require 'twitter_bootstrap_builder/builders/drop_down_link_builder'
16
- require 'twitter_bootstrap_builder/builders/drop_down_button_builder'
17
- require 'twitter_bootstrap_builder/builders/fieldset_builder'
18
- require 'twitter_bootstrap_builder/builders/form_builder'
19
- require 'twitter_bootstrap_builder/builders/link_button_builder'
20
- require 'twitter_bootstrap_builder/builders/nav_bar_builder'
21
- require 'twitter_bootstrap_builder/builders/nav_container_builder'
22
- require 'twitter_bootstrap_builder/builders/nav_list_builder'
23
- require 'twitter_bootstrap_builder/builders/submit_button_builder'
24
- require 'twitter_bootstrap_builder/builders/tab_builder'
25
- require 'twitter_bootstrap_builder/builders/table_builder'
26
-
1
+ require 'twitter_bootstrap_builder/version'
2
+ require 'twitter_bootstrap_builder/engine'
3
+
4
+ require 'twitter_bootstrap_markup'
5
+ require 'kaminari'
6
+
7
+ require 'twitter_bootstrap_builder/extensions/twitter_bootstrap_markup'
8
+
9
+ require 'twitter_bootstrap_builder/helpers/commons_helper'
10
+ require 'twitter_bootstrap_builder/helpers/buttons_helper'
11
+ require 'twitter_bootstrap_builder/helpers/dropdowns_helper'
12
+
13
+ require 'twitter_bootstrap_builder/builders/base'
14
+ require 'twitter_bootstrap_builder/builders/drop_down_builder'
15
+ require 'twitter_bootstrap_builder/builders/drop_down_link_builder'
16
+ require 'twitter_bootstrap_builder/builders/drop_down_button_builder'
17
+ require 'twitter_bootstrap_builder/builders/fieldset_builder'
18
+ require 'twitter_bootstrap_builder/builders/form_builder'
19
+ require 'twitter_bootstrap_builder/builders/link_button_builder'
20
+ require 'twitter_bootstrap_builder/builders/nav_bar_builder'
21
+ require 'twitter_bootstrap_builder/builders/nav_container_builder'
22
+ require 'twitter_bootstrap_builder/builders/nav_list_builder'
23
+ require 'twitter_bootstrap_builder/builders/submit_button_builder'
24
+ require 'twitter_bootstrap_builder/builders/tab_builder'
25
+ require 'twitter_bootstrap_builder/builders/table_builder'
26
+
@@ -1,20 +1,20 @@
1
- module TwitterBootstrapBuilder
2
- module Builders
3
- class Base
4
- include TwitterBootstrapMarkup
5
-
6
- attr_reader :template, :options, :block
7
-
8
- def initialize(template, options={}, &block)
9
- @template = template
10
- @options = options
11
- @block = block
12
- end
13
-
14
- def html_safe
15
- to_s.html_safe
16
- end
17
-
18
- end
19
- end
1
+ module TwitterBootstrapBuilder
2
+ module Builders
3
+ class Base
4
+ include TwitterBootstrapMarkup
5
+
6
+ attr_reader :template, :options, :block
7
+
8
+ def initialize(template, options={}, &block)
9
+ @template = template
10
+ @options = options
11
+ @block = block
12
+ end
13
+
14
+ def html_safe
15
+ to_s.html_safe
16
+ end
17
+
18
+ end
19
+ end
20
20
  end