twitter-bootstrap-rails 3.2.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (148) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +263 -247
  3. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  4. data/app/assets/fonts/glyphicons-halflings-regular.svg +273 -214
  5. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  6. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  7. data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  8. data/app/assets/javascripts/twitter/bootstrap/affix.js +60 -35
  9. data/app/assets/javascripts/twitter/bootstrap/alert.js +15 -9
  10. data/app/assets/javascripts/twitter/bootstrap/button.js +33 -20
  11. data/app/assets/javascripts/twitter/bootstrap/carousel.js +79 -47
  12. data/app/assets/javascripts/twitter/bootstrap/collapse.js +84 -43
  13. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +65 -47
  14. data/app/assets/javascripts/twitter/bootstrap/modal.js +138 -44
  15. data/app/assets/javascripts/twitter/bootstrap/popover.js +12 -14
  16. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +57 -38
  17. data/app/assets/javascripts/twitter/bootstrap/tab.js +54 -24
  18. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +202 -87
  19. data/app/assets/javascripts/twitter/bootstrap/transition.js +19 -8
  20. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -1
  21. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -1
  22. data/app/helpers/bootstrap_flash_helper.rb +8 -3
  23. data/app/helpers/form_errors_helper.rb +11 -11
  24. data/app/helpers/glyph_helper.rb +7 -3
  25. data/app/helpers/modal_helper.rb +9 -13
  26. data/app/helpers/navbar_helper.rb +5 -2
  27. data/app/helpers/twitter_breadcrumbs_helper.rb +4 -1
  28. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +5 -5
  29. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
  30. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +7 -15
  31. data/lib/generators/bootstrap/layout/templates/layout.html.erb +5 -5
  32. data/lib/generators/bootstrap/layout/templates/layout.html.haml +3 -3
  33. data/lib/generators/bootstrap/layout/templates/layout.html.slim +3 -5
  34. data/lib/generators/bootstrap/themed/templates/_form.html.erb +12 -9
  35. data/lib/generators/bootstrap/themed/templates/_form.html.haml +7 -5
  36. data/lib/generators/bootstrap/themed/templates/_form.html.slim +8 -6
  37. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  38. data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -0
  39. data/lib/generators/bootstrap/themed/templates/index.html.haml +1 -0
  40. data/lib/generators/bootstrap/themed/templates/index.html.slim +4 -3
  41. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  42. data/lib/generators/bootstrap/themed/templates/show.html.slim +1 -1
  43. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +1 -1
  44. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +24 -13
  45. data/lib/twitter/bootstrap/rails/engine.rb +17 -12
  46. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  47. data/spec/lib/breadcrumbs_spec.rb +42 -17
  48. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +10 -4
  49. data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
  50. data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
  51. data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
  52. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +2 -2
  53. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +62 -12
  54. data/spec/spec_helper.rb +5 -1
  55. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -3
  56. data/vendor/toolkit/twitter/bootstrap/alerts.less +5 -0
  57. data/vendor/toolkit/twitter/bootstrap/badges.less +14 -3
  58. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +6 -1
  59. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +0 -0
  60. data/vendor/toolkit/twitter/bootstrap/button-groups.less +13 -14
  61. data/vendor/toolkit/twitter/bootstrap/buttons.less +14 -7
  62. data/vendor/toolkit/twitter/bootstrap/carousel.less +34 -7
  63. data/vendor/toolkit/twitter/bootstrap/close.less +1 -0
  64. data/vendor/toolkit/twitter/bootstrap/code.less +0 -0
  65. data/vendor/toolkit/twitter/bootstrap/component-animations.less +3 -1
  66. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +9 -8
  67. data/vendor/toolkit/twitter/bootstrap/forms.less +110 -41
  68. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +75 -3
  69. data/vendor/toolkit/twitter/bootstrap/grid.less +0 -0
  70. data/vendor/toolkit/twitter/bootstrap/input-groups.less +8 -3
  71. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +10 -4
  72. data/vendor/toolkit/twitter/bootstrap/labels.less +0 -0
  73. data/vendor/toolkit/twitter/bootstrap/list-group.less +11 -13
  74. data/vendor/toolkit/twitter/bootstrap/media.less +40 -30
  75. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +0 -0
  76. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +2 -1
  77. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +0 -0
  78. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +19 -6
  79. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +0 -0
  80. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +0 -0
  81. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +0 -0
  82. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +0 -0
  83. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +4 -4
  84. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +4 -4
  85. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +2 -2
  86. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +0 -0
  87. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +1 -1
  88. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +2 -1
  89. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +0 -0
  90. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +0 -0
  91. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +0 -0
  92. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +2 -1
  93. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +0 -0
  94. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +0 -0
  95. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +0 -0
  96. data/vendor/toolkit/twitter/bootstrap/mixins/reset-text.less +18 -0
  97. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +0 -0
  98. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +1 -1
  99. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +0 -0
  100. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +0 -0
  101. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +0 -0
  102. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +2 -1
  103. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +0 -0
  104. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +8 -5
  105. data/vendor/toolkit/twitter/bootstrap/mixins.less +1 -0
  106. data/vendor/toolkit/twitter/bootstrap/modals.less +3 -3
  107. data/vendor/toolkit/twitter/bootstrap/navbar.less +6 -1
  108. data/vendor/toolkit/twitter/bootstrap/navs.less +1 -1
  109. data/vendor/toolkit/twitter/bootstrap/normalize.less +12 -13
  110. data/vendor/toolkit/twitter/bootstrap/pager.less +1 -2
  111. data/vendor/toolkit/twitter/bootstrap/pagination.less +5 -4
  112. data/vendor/toolkit/twitter/bootstrap/panels.less +27 -4
  113. data/vendor/toolkit/twitter/bootstrap/popovers.less +5 -7
  114. data/vendor/toolkit/twitter/bootstrap/print.less +96 -96
  115. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +1 -14
  116. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +10 -9
  117. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +0 -0
  118. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +12 -1
  119. data/vendor/toolkit/twitter/bootstrap/tables.less +6 -5
  120. data/vendor/toolkit/twitter/bootstrap/theme.less +47 -16
  121. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +1 -1
  122. data/vendor/toolkit/twitter/bootstrap/tooltip.less +13 -7
  123. data/vendor/toolkit/twitter/bootstrap/type.less +2 -8
  124. data/vendor/toolkit/twitter/bootstrap/utilities.less +0 -1
  125. data/vendor/toolkit/twitter/bootstrap/variables.less +36 -14
  126. data/vendor/toolkit/twitter/bootstrap/wells.less +0 -0
  127. metadata +76 -52
  128. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  129. data/app/assets/fonts/fontawesome-webfont.svg +0 -504
  130. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  131. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  132. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  133. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  134. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -4
  135. data/vendor/static-source/fontawesome.less +0 -8
  136. data/vendor/toolkit/fontawesome/bordered-pulled.less +0 -16
  137. data/vendor/toolkit/fontawesome/core.less +0 -12
  138. data/vendor/toolkit/fontawesome/fixed-width.less +0 -6
  139. data/vendor/toolkit/fontawesome/font-awesome.less +0 -17
  140. data/vendor/toolkit/fontawesome/icons.less +0 -506
  141. data/vendor/toolkit/fontawesome/larger.less +0 -13
  142. data/vendor/toolkit/fontawesome/list.less +0 -19
  143. data/vendor/toolkit/fontawesome/mixins.less +0 -20
  144. data/vendor/toolkit/fontawesome/path.less +0 -14
  145. data/vendor/toolkit/fontawesome/rotated-flipped.less +0 -9
  146. data/vendor/toolkit/fontawesome/spinning.less +0 -32
  147. data/vendor/toolkit/fontawesome/stacked.less +0 -20
  148. data/vendor/toolkit/fontawesome/variables.less +0 -515
@@ -1 +1 @@
1
- @font-face{font-family:'Glyphicons Halflings';src:url('twitter/fonts/glyphicons-halflings-regular.eot');src:url('twitter/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('twitter/fonts/glyphicons-halflings-regular.woff') format('woff'),url('twitter/fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('twitter/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}
1
+ @font-face{font-family:'Glyphicons Halflings';src:url('<%= asset_path 'glyphicons-halflings-regular.eot' %>');src:url('<%= asset_path 'glyphicons-halflings-regular.eot?#iefix' %>') format('embedded-opentype'),url('<%= asset_path 'glyphicons-halflings-regular.woff' %>') format('woff'),url('<%= asset_path 'glyphicons-halflings-regular.ttf' %>') format('truetype'),url('<%= asset_path 'glyphicons-halflings-regular.svg#glyphicons-halflingsregular' %>') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}
@@ -13,10 +13,15 @@ module BootstrapFlashHelper
13
13
  type = :danger if type == :error
14
14
  next unless ALERT_TYPES.include?(type)
15
15
 
16
+ tag_class = options.extract!(:class)[:class]
17
+ tag_options = {
18
+ class: "alert fade in alert-#{type} #{tag_class}"
19
+ }.merge(options)
20
+
21
+ close_button = content_tag(:button, raw("&times;"), type: "button", class: "close", "data-dismiss" => "alert")
22
+
16
23
  Array(message).each do |msg|
17
- text = content_tag(:div,
18
- content_tag(:button, raw("&times;"), :class => "close", "data-dismiss" => "alert") +
19
- msg, :class => "alert fade in alert-#{type} #{options[:class]}")
24
+ text = content_tag(:div, close_button + msg, tag_options)
20
25
  flash_messages << text if msg
21
26
  end
22
27
  end
@@ -1,22 +1,22 @@
1
1
  module FormErrorsHelper
2
-
3
- attr_reader :template
4
- attr_reader :object
2
+ include ActionView::Helpers::FormTagHelper
5
3
 
6
4
  def error_span(attribute, options = {})
7
- options[:class] ||= 'help-inline'
5
+ options[:span_class] ||= 'help-block'
6
+ options[:error_class] ||= 'has-error'
8
7
 
9
- template.content_tag(
10
- :span, self.errors_for(attribute),
11
- :class => options[:class]
12
- ) if self.errors_on?(attribute)
8
+ if errors_on?(attribute)
9
+ @template.content_tag( :div, :class => options[:error_class] ) do
10
+ content_tag( :span, errors_for(attribute), :class => options[:span_class] )
11
+ end
12
+ end
13
13
  end
14
14
 
15
15
  def errors_on?(attribute)
16
- self.object.errors[attribute].present? if self.object.respond_to?(:errors)
16
+ object.errors[attribute].present? if object.respond_to?(:errors)
17
17
  end
18
18
 
19
19
  def errors_for(attribute)
20
- self.object.errors[attribute].try(:join, ', ')
20
+ object.errors[attribute].try(:join, ', ') || object.errors[attribute].try(:to_s)
21
21
  end
22
- end
22
+ end
@@ -8,12 +8,16 @@ module GlyphHelper
8
8
  # # => <i class="icon-thumbs-up pull-left"></i>
9
9
  # glyph(:lock, {tag: :span})
10
10
  # # => <span class="icon-lock"></span>
11
- def glyph(*names, options)
12
- names.map! { |name| name.to_s.gsub('_','-') }
11
+ # glyph(:lock, {class: 'foo'})
12
+ # # => <i class="icon-lock foo"></i>
13
+ def glyph(*names)
14
+ options = names.last.kind_of?(Hash) ? names.pop : {}
15
+ names.map! { |name| name.to_s.tr('_', '-') }
13
16
  names.map! do |name|
14
17
  name =~ /pull-(?:left|right)/ ? name : "glyphicon glyphicon-#{name}"
15
18
  end
16
19
  options[:tag] = options[:tag] ||= :i
17
- content_tag options[:tag], nil, :class => names
20
+ names.push options[:class] || ''
21
+ content_tag options[:tag], nil, class: names
18
22
  end
19
23
  end
@@ -1,18 +1,14 @@
1
1
  module ModalHelper
2
-
3
- def default_options
4
- return {:id => 'modal', :size => '', :show_close => true, :dismiss => true}
5
- end
6
2
 
7
3
  #modals have a header, a body, a footer for options.
8
4
  def modal_dialog(options = {}, &block)
9
- opts = default_options.merge(options)
10
- content_tag :div, :id => options[:id], :class => "bootstrap-modal modal fade" do
11
- content_tag :div, :class => "modal-dialog #{opts['size']}" do
5
+ options = {:id => 'modal', :size => '', :show_close => true, :dismiss => true}.merge options
6
+ content_tag :div, :class => "bootstrap-modal modal fade", :id => options[:id] do
7
+ content_tag :div, :class => "modal-dialog #{options['size']}" do
12
8
  content_tag :div, :class => "modal-content" do
13
- modal_header(opts, &block) +
14
- modal_body(opts, &block) +
15
- modal_footer(opts, &block)
9
+ modal_header(options[:header], &block) +
10
+ modal_body(options[:body], &block) +
11
+ modal_footer(options[:footer], &block)
16
12
  end
17
13
  end
18
14
  end
@@ -20,12 +16,12 @@ module ModalHelper
20
16
 
21
17
  def modal_header(options, &block)
22
18
  content_tag :div, :class => 'modal-header' do
23
- if options[:show_close]
19
+ if options[:show_close]
24
20
  close_button(options[:dismiss]) +
25
21
  content_tag(:h4, options[:title], :class => 'modal-title', &block)
26
22
  else
27
23
  content_tag(:h4, options[:title], :class => 'modal-title', &block)
28
- end
24
+ end
29
25
  end
30
26
  end
31
27
 
@@ -38,7 +34,7 @@ module ModalHelper
38
34
  end
39
35
 
40
36
  def close_button(dismiss)
41
- #It doesn't seem to like content_tag, so we do this instead.
37
+ #It doesn't seem to like content_tag, so we do this instead.
42
38
  raw("<button class=\"close\" data-dismiss=\"#{dismiss}\" aria-hidden=\"true\">&times;</button>")
43
39
  end
44
40
 
@@ -17,8 +17,11 @@ module NavbarHelper
17
17
  path = name || path if block_given?
18
18
  options = args.extract_options!
19
19
  content_tag :li, :class => is_active?(path, options) do
20
- name, path = path, options if block_given?
21
- link_to name, path, options, &block
20
+ if block_given?
21
+ link_to path, options, &block
22
+ else
23
+ link_to name, path, options, &block
24
+ end
22
25
  end
23
26
  end
24
27
 
@@ -1,5 +1,5 @@
1
1
  module TwitterBreadcrumbsHelper
2
- def render_breadcrumbs(divider = '/', options={}, &block)
2
+ def render_bootstrap_breadcrumbs(divider = '/', options={}, &block)
3
3
  default_options = { :class => '', :item_class => '', :divider_class => '', :active_class => 'active' }.merge(options)
4
4
  content = render :partial => 'twitter-bootstrap/breadcrumbs', :layout => false, :locals => { :divider => divider, options: options }
5
5
  if block_given?
@@ -8,4 +8,7 @@ module TwitterBreadcrumbsHelper
8
8
  content
9
9
  end
10
10
  end
11
+
12
+ # Add backward compatible alias unless BC on rails present
13
+ alias_method :render_breadcrumbs, :render_bootstrap_breadcrumbs unless defined?(::BreadcrumbsOnRails)
11
14
  end
@@ -1,14 +1,14 @@
1
- <% if @breadcrumbs.present? %>
1
+ <% if @__bs_breadcrumbs.present? %>
2
2
  <ul class="breadcrumb <%= options[:class] %>">
3
- <% separator = divider.html_safe %>
4
- <% @breadcrumbs[0..-2].each do |crumb| %>
3
+ <% separator = divider.html_safe if divider %>
4
+ <% @__bs_breadcrumbs[0..-2].each do |crumb| %>
5
5
  <li class="<%= options[:item_class] %>">
6
6
  <%= link_to crumb[:name], crumb[:url], crumb[:options] %>
7
- <span class="divider <%= options[:divider_class] %>"><%= separator %></span>
7
+ <span class="divider <%= options[:divider_class] %>"><%= separator if separator %></span>
8
8
  </li>
9
9
  <% end %>
10
10
  <li class="<%= options[:active_class] %>">
11
- <%= @breadcrumbs.last[:name] %>
11
+ <%= @__bs_breadcrumbs.last[:name] %>
12
12
  </li>
13
13
  </ul>
14
14
  <% end %>
@@ -1,7 +1,6 @@
1
1
  /*
2
2
  =require twitter-bootstrap-static/bootstrap
3
3
 
4
- Use Font Awesome icons (default)
5
- To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
6
- =require twitter-bootstrap-static/fontawesome
7
- */
4
+ Static version of css will use Glyphicons sprites by default
5
+ =require twitter-bootstrap-static/sprites
6
+ */
@@ -1,20 +1,12 @@
1
1
  @import "twitter/bootstrap/bootstrap";
2
2
 
3
- // Set the correct sprite paths
4
- @iconSpritePath: image-url("twitter/bootstrap/glyphicons-halflings.png");
5
- @iconWhiteSpritePath: image-url("twitter/bootstrap/glyphicons-halflings-white.png");
6
-
7
- // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
8
- @fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
9
- @fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
10
- @fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
11
- @fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
12
- @fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");
13
-
14
- // Font Awesome
15
- @import "fontawesome/font-awesome";
16
-
17
- // Glyphicons
3
+ // Glyphicons are not required by default, uncomment the following lines to enable them.
4
+ //@glyphiconsEotPath: font-url("glyphicons-halflings-regular.eot");
5
+ //@glyphiconsEotPath_iefix: font-url("glyphicons-halflings-regular.eot?#iefix");
6
+ //@glyphiconsWoffPath: font-url("glyphicons-halflings-regular.woff");
7
+ //@glyphiconsTtfPath: font-url("glyphicons-halflings-regular.ttf");
8
+ //@glyphiconsSvgPath: font-url("glyphicons-halflings-regular.svg#glyphicons_halflingsregular");
9
+ //
18
10
  //@import "twitter/bootstrap/glyphicons.less";
19
11
 
20
12
  // Your custom LESS stylesheets goes here
@@ -7,11 +7,6 @@
7
7
  <title><%%= content_for?(:title) ? yield(:title) : "<%= app_name %>" %></title>
8
8
  <%%= csrf_meta_tags %>
9
9
 
10
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
- <!--[if lt IE 9]>
12
- <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
13
- <![endif]-->
14
-
15
10
  <%%= stylesheet_link_tag "application", :media => "all" %>
16
11
 
17
12
  <!-- For third-generation iPad with high-resolution Retina display: -->
@@ -35,6 +30,11 @@
35
30
  <%%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
36
31
 
37
32
  <%%= javascript_include_tag "application" %>
33
+
34
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
35
+ <!--[if lt IE 9]>
36
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js" type="text/javascript"></script>
37
+ <![endif]-->
38
38
  </head>
39
39
  <body>
40
40
 
@@ -6,9 +6,6 @@
6
6
  %meta(name="viewport" content="width=device-width, initial-scale=1.0")
7
7
  %title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
8
8
  = csrf_meta_tags
9
- / Le HTML5 shim, for IE6-8 support of HTML elements
10
- /[if lt IE 9]
11
- = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
12
9
  = stylesheet_link_tag "application", :media => "all"
13
10
  = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
14
11
  = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
@@ -16,6 +13,9 @@
16
13
  = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
17
14
  = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
18
15
  = javascript_include_tag "application"
16
+ / Le HTML5 shim, for IE6-8 support of HTML elements
17
+ /[if lt IE 9]
18
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"
19
19
 
20
20
 
21
21
  %body
@@ -6,10 +6,6 @@ html lang="en"
6
6
  meta name="viewport" content="width=device-width, initial-scale=1.0"
7
7
  title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
8
8
  = csrf_meta_tags
9
-
10
- /! Le HTML5 shim, for IE6-8 support of HTML elements
11
- /[if lt IE 9]
12
- = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
13
9
  = stylesheet_link_tag "application", :media => "all"
14
10
  = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
15
11
  = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
@@ -17,7 +13,9 @@ html lang="en"
17
13
  = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
18
14
  = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
19
15
  = javascript_include_tag "application"
20
-
16
+ /! Le HTML5 shim, for IE6-8 support of HTML elements
17
+ /[if lt IE 9]
18
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"
21
19
 
22
20
 
23
21
  body
@@ -1,6 +1,6 @@
1
1
  <%%= form_for @<%= resource_name %>, :html => { :class => "form-horizontal <%= resource_name %>" } do |f| %>
2
2
 
3
- <%% if @<%= resource_name %>.errors.any? %>
3
+ <%% if @<%= resource_name %>.errors.any? %>
4
4
  <div id="error_expl" class="panel panel-danger">
5
5
  <div class="panel-heading">
6
6
  <h3 class="panel-title"><%%= pluralize(@<%= resource_name %>.errors.count, "error") %> prohibited this <%= resource_name %> from being saved:</h3>
@@ -16,18 +16,21 @@
16
16
  <%% end %>
17
17
 
18
18
  <%- columns.each do |column| -%>
19
- <div class="control-group">
20
- <%%= f.label :<%= column.name %>, :class => 'control-label' %>
21
- <div class="controls">
19
+ <div class="form-group">
20
+ <%%= f.label :<%= column.name %>, :class => 'control-label col-lg-2' %>
21
+ <div class="col-lg-10">
22
22
  <%%= f.<%= column.field_type %> :<%= column.name %>, :class => 'form-control' %>
23
23
  </div>
24
- <%%= error_span(@<%= resource_name %>[:<%= column.name %>]) %>
24
+ <%%=f.error_span(:<%= column.name %>) %>
25
25
  </div>
26
26
  <%- end -%>
27
27
 
28
-
29
- <%%= f.submit nil, :class => 'btn btn-primary' %>
30
- <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
31
- <%= controller_routing_path %>_path, :class => 'btn btn-default' %>
28
+ <div class="form-group">
29
+ <div class="col-lg-offset-2 col-lg-10">
30
+ <%%= f.submit nil, :class => 'btn btn-primary' %>
31
+ <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
32
+ <%= controller_routing_path %>_path, :class => 'btn btn-default' %>
33
+ </div>
34
+ </div>
32
35
 
33
36
  <%% end %>
@@ -1,10 +1,12 @@
1
1
  = form_for @<%= resource_name %>, html: { class: "form form-horizontal <%= resource_name %>" } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  .form-group
4
- = f.label :<%= column.name %>, class: 'control-label'
5
- .controls
4
+ = f.label :<%= column.name %>, class: 'control-label col-lg-2'
5
+ .col-lg-10
6
6
  = f.<%= column.field_type %> :<%= column.name %>, class: 'form-control', required: true
7
- = error_span(@<%= resource_name %>[:<%= column.name %>])
7
+ = f.error_span(:<%= column.name %>)
8
8
  <%- end -%>
9
- = f.submit nil,class: 'btn btn-primary'
10
- = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
9
+ .form-group
10
+ .col-lg-offset-2.col-lg-10
11
+ = f.submit nil,class: 'btn btn-primary'
12
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
@@ -1,11 +1,13 @@
1
1
  = form_for @<%= resource_name %>, html: { class: "form form-horizontal <%= resource_name %>" } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  .form-group
4
- = f.label :<%= column.name %>, :class => 'control-label'
5
- .controls
4
+ = f.label :<%= column.name %>, :class => 'control-label col-lg-2'
5
+ .col-lg-10
6
6
  = f.<%= column.field_type %> :<%= column.name %>, :class => 'form-control'
7
- = error_span(@<%= resource_name %>[:<%= column.name %>])
7
+ = f.error_span(:<%= column.name %>)
8
8
  <%- end -%>
9
- = f.submit nil, :class => 'btn btn-primary'
10
- '
11
- = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
9
+ .form-group
10
+ .col-lg-offset-2.col-lg-10
11
+ = f.submit nil, :class => 'btn btn-primary'
12
+ '
13
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
- div class="page-header"
2
+ .page-header
3
3
  h1=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize
4
4
  = render :partial => "form"
@@ -22,6 +22,8 @@
22
22
  <%- end -%>
23
23
  <td><%%=l <%= resource_name %>.created_at %></td>
24
24
  <td>
25
+ <%%= link_to t('.show', :default => t("helpers.links.show")),
26
+ <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs' %>
25
27
  <%%= link_to t('.edit', :default => t("helpers.links.edit")),
26
28
  edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs' %>
27
29
  <%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
@@ -19,6 +19,7 @@
19
19
  <%- end -%>
20
20
  %td=l <%= resource_name %>.created_at
21
21
  %td
22
+ = link_to t('.show', :default => t("helpers.links.show")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
22
23
  = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
23
24
  = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs btn-danger'
24
25
 
@@ -1,7 +1,7 @@
1
1
  - model_class = <%= resource_name.classify %>
2
- div class="page-header"
2
+ .page-header
3
3
  h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
4
- table class="table table-striped"
4
+ table.table.table-striped
5
5
  thead
6
6
  tr
7
7
  th= model_class.human_attribute_name(:id)
@@ -19,9 +19,10 @@ table class="table table-striped"
19
19
  <%- end -%>
20
20
  td=l <%= resource_name %>.created_at
21
21
  td
22
+ = link_to t('.show', :default => t("helpers.links.show")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
23
+ '
22
24
  = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
23
25
  '
24
26
  = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs btn-danger'
25
27
 
26
28
  = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
27
-
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
- div class="page-header"
2
+ .page-header
3
3
  h1=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize
4
4
  = render :partial => "form"
@@ -1,5 +1,5 @@
1
1
  - model_class = <%= resource_name.classify %>
2
- div class="page-header"
2
+ .page-header
3
3
  h1=t '.title', :default => model_class.model_name.human.titleize
4
4
 
5
5
  <%- columns.each do |column| -%>
@@ -1,7 +1,7 @@
1
1
  = simple_form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  = f.input :<%= column.name %>
4
- = error_span(@<%= resource_name %>[:<%= column.name %>])
4
+ = f.error_span :<%= column.name %>
5
5
  <%- end -%>
6
6
  <%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
7
7
  = f.button :wrapped, :cancel => <%= controller_routing_path %>_path
@@ -1,23 +1,39 @@
1
1
  module Twitter
2
2
  module Bootstrap
3
+
4
+ # Keep current method calls as is using aliases
3
5
  module Breadcrumbs
4
- def self.included(base)
5
- base.extend(ClassMethods)
6
+ extend ActiveSupport::Concern
7
+ included do
8
+ # Used to provide compatibility with breadcrumbs-on-rails gem, if detected
9
+ # breadcrumbs controller methods won't be overridden.
10
+ if defined?(::BreadcrumbsOnRails)
11
+ ::Rails.logger.info <<-EOT.squish
12
+ BreadcrumbsOnRails detected it won't be overridden. To use methods from this gem you need to call them
13
+ using bootstrap prefix i.e. add_bootstrap_breadcrumb and render_bootstrap_breadcrumbs.
14
+ EOT
15
+ else
16
+ # Provide backward compatibility with existing code
17
+ alias_method :add_breadcrumb, :add_bootstrap_breadcrumb
18
+ class << self
19
+ alias_method :add_breadcrumb, :add_bootstrap_breadcrumb
20
+ end
21
+ end
6
22
  end
7
23
 
8
24
  module ClassMethods
9
- def add_breadcrumb(name, url = '', options = {})
25
+ def add_bootstrap_breadcrumb(name, url = '', options = {})
10
26
  options.merge! :klass => self.name
11
- before_filter options do |controller|
12
- controller.send :add_breadcrumb, name, url, options
27
+ before_action options do |controller|
28
+ controller.send :add_bootstrap_breadcrumb, name, url, options
13
29
  end
14
30
  end
15
31
  end
16
32
 
17
33
  protected
18
34
 
19
- def add_breadcrumb(name, url = '', options = {})
20
- @breadcrumbs ||= []
35
+ def add_bootstrap_breadcrumb(name, url = '', options = {})
36
+ @__bs_breadcrumbs ||= []
21
37
 
22
38
  class_name = options.delete(:klass) || self.class.name
23
39
 
@@ -37,7 +53,7 @@ module Twitter
37
53
 
38
54
  url = eval(url.to_s) if url.is_a?(Symbol) && url =~ /_path|_url|@/
39
55
 
40
- @breadcrumbs << {:name => name, :url => url, :options => options}
56
+ @__bs_breadcrumbs << {:name => name, :url => url, :options => options}
41
57
  end
42
58
 
43
59
  def translate_breadcrumb(name, class_name)
@@ -48,11 +64,6 @@ module Twitter
48
64
 
49
65
  I18n.t name, :scope => scope
50
66
  end
51
-
52
- def render_breadcrumbs(divider = '/')
53
- s = render :partial => 'twitter-bootstrap/breadcrumbs', :locals => {:divider => divider}
54
- s.first
55
- end
56
67
  end
57
68
  end
58
69
  end
@@ -1,10 +1,12 @@
1
1
  require 'rails'
2
2
 
3
- require File.dirname(__FILE__) + '/breadcrumbs.rb'
4
- require File.dirname(__FILE__) + '/../../../../app/helpers/flash_block_helper.rb'
5
- require File.dirname(__FILE__) + '/../../../../app/helpers/modal_helper.rb'
6
- require File.dirname(__FILE__) + '/../../../../app/helpers/navbar_helper.rb'
7
- require File.dirname(__FILE__) + '/../../../../app/helpers/bootstrap_flash_helper.rb'
3
+ require_relative 'breadcrumbs.rb'
4
+ require_relative '../../../../app/helpers/flash_block_helper.rb'
5
+ require_relative '../../../../app/helpers/modal_helper.rb'
6
+ require_relative '../../../../app/helpers/navbar_helper.rb'
7
+ require_relative '../../../../app/helpers/bootstrap_flash_helper.rb'
8
+ require_relative '../../../../app/helpers/form_errors_helper.rb'
9
+ require_relative '../../../../app/helpers/badge_label_helper.rb'
8
10
 
9
11
  module Twitter
10
12
  module Bootstrap
@@ -21,14 +23,17 @@ module Twitter
21
23
  initializer 'twitter-bootstrap-rails.setup_helpers' do |app|
22
24
  app.config.to_prepare do
23
25
  ActionController::Base.send :include, Breadcrumbs
24
- ActionController::Base.send :helper, FlashBlockHelper
25
- ActionController::Base.send :helper, BootstrapFlashHelper
26
- ActionController::Base.send :helper, FormErrorsHelper
27
- ActionController::Base.send :helper, ModalHelper
28
- ActionController::Base.send :helper, NavbarHelper
29
- ActionController::Base.send :helper, BadgeLabelHelper
30
- #ActionController::Base.send :helper_method, :render_breadcrumbs
31
26
  end
27
+ [FlashBlockHelper,
28
+ BootstrapFlashHelper,
29
+ ModalHelper,
30
+ NavbarHelper,
31
+ BadgeLabelHelper].each do |h|
32
+ app.config.to_prepare do
33
+ ActionController::Base.send :helper, h
34
+ end
35
+ end
36
+ ActionView::Helpers::FormBuilder.send :include, FormErrorsHelper
32
37
  end
33
38
  end
34
39
  end
@@ -1,7 +1,7 @@
1
1
  module Twitter
2
2
  module Bootstrap
3
3
  module Rails
4
- VERSION = "3.2.0"
4
+ VERSION = "5.0.0"
5
5
  end
6
6
  end
7
7
  end