twitter-bootswatch-rails-helpers 3.0.0.0 → 3.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22b893bd4ac6fdd38135497dc5aa01c9b4523fa4
|
4
|
+
data.tar.gz: 1b98faa33e4b8460d9df01013afb06eb3a67aaf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b168fe5a2ee3ff2a82051dd92ced0528cb4a2e6f94919af110f2368153135f5b9383bd9362c33e53302adaf8eeebdd9613418ea007ef116b64420d8ee77946f8
|
7
|
+
data.tar.gz: d79f888d1c128bdfb01db2698e2f8ccb8b6cb2f54603723709a83a8f00cceb2fc9b700a3f677b5deb9e18ee974520b1a91ffaeca9628c1af4a7c674d039238e3
|
data/{travis.yml → .travis.yml}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Bootswatch Rails 3.0.0 Helpers gem
|
2
2
|
|
3
|
+
[![Build Status](https://www.travis-ci.org/scottvrosenthal/twitter-bootswatch-rails-helpers.png?branch=master)](https://www.travis-ci.org/scottvrosenthal/twitter-bootswatch-rails-helpers)
|
4
|
+
|
3
5
|
- Requires [twitter-bootswatch-rails](https://github.com/scottvrosenthal/twitter-bootswatch-rails/)
|
4
6
|
- Provides rails view helpers for [Twitter Bootstrap](http://getbootstrap.com/) alerts and breadcrumbs
|
5
7
|
|
@@ -7,7 +7,11 @@ module Twitter
|
|
7
7
|
flash_messages = ''
|
8
8
|
flash.each do |type, message|
|
9
9
|
alert_type_class = bootswatch_alert_types(type)
|
10
|
+
if alert_dismissable
|
10
11
|
alert_div = content_tag(:div, raw('<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>') + message, :class => "alert #{alert_type_class}#{alert_dismissable_class}")
|
12
|
+
else
|
13
|
+
alert_div = content_tag(:div, raw(message), :class => "alert #{alert_type_class}")
|
14
|
+
end
|
11
15
|
flash_messages << alert_div if message
|
12
16
|
end
|
13
17
|
raw(flash_messages)
|
@@ -27,9 +31,15 @@ module Twitter
|
|
27
31
|
def bootswatch_flash_container(type, alert_dismissable=true, &message)
|
28
32
|
alert_dismissable_class = alert_dismissable ? ' alert-dismissable' : ''
|
29
33
|
alert_type_class = bootswatch_alert_types(type)
|
30
|
-
|
31
|
-
|
32
|
-
|
34
|
+
message_html = capture(&message)
|
35
|
+
if alert_dismissable
|
36
|
+
output = content_tag(:div, :class => "alert #{alert_type_class}#{alert_dismissable_class}") do
|
37
|
+
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'.html_safe.safe_concat(message_html)
|
38
|
+
end
|
39
|
+
else
|
40
|
+
output = content_tag(:div, :class => "alert #{alert_type_class}") do
|
41
|
+
message_html.html_safe
|
42
|
+
end
|
33
43
|
end
|
34
44
|
|
35
45
|
raw(output)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter-bootswatch-rails-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott V. Rosenthal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter-bootswatch-rails
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- .gitignore
|
36
36
|
- .ruby-gemset
|
37
37
|
- .ruby-version
|
38
|
+
- .travis.yml
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE.txt
|
40
41
|
- README.md
|
@@ -47,7 +48,6 @@ files:
|
|
47
48
|
- lib/twitter/bootswatch/rails/helpers/breadcrumbs.rb
|
48
49
|
- lib/twitter/bootswatch/rails/helpers/engine.rb
|
49
50
|
- lib/twitter/bootswatch/rails/helpers/version.rb
|
50
|
-
- travis.yml
|
51
51
|
- twitter-bootswatch-rails-helpers.gemspec
|
52
52
|
homepage: https://github.com/scottvrosenthal/twitter-bootswatch-rails-helpers
|
53
53
|
licenses:
|