phantom_helpers 0.11.0.alpha5 → 0.11.0.alpha6
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: 4a8bb0bca18cbcbc70219a6f036f736f01099a77
|
4
|
+
data.tar.gz: 5efbbedf3e424fba28efcff799878198db927635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223765dcdae801b3b57b1157df010d2be295b9d8034f79fb073a77d587611487b007b6923f8efd8a4a0cc8c9f1e2cf96a5bb3ba491f61a1829acd638fc18e9c1
|
7
|
+
data.tar.gz: 3889793b1234a48cf8dba9f741511bff55f729dad4639c1575e4864cd533206084b51ac17e872261ff15e8fe6e7832513ad931c1c663e50881eb6f347cdf735e
|
@@ -16,6 +16,9 @@ module PhantomHelpers
|
|
16
16
|
content_tag :div, nil, style: "width:100px;height:20px;background-color:#{color}"
|
17
17
|
end
|
18
18
|
|
19
|
+
def datepicker_date_format(date)
|
20
|
+
date ? date.strftime('%Y-%m-%d') : Time.now.strftime('%Y-%m-%d')
|
21
|
+
end
|
19
22
|
|
20
23
|
def comma_separated_list(objects, &block)
|
21
24
|
if objects.any?
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module PhantomHelpers
|
2
|
+
module ViewHelpers
|
3
|
+
module FlashHelper
|
4
|
+
|
5
|
+
def flash_color(type)
|
6
|
+
case type
|
7
|
+
when :notice then 'alert alert-info'
|
8
|
+
when :success then 'alert alert-success'
|
9
|
+
when :error then 'alert alert-danger'
|
10
|
+
when :alert then 'alert alert-danger'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -8,6 +8,7 @@ require 'phantom_helpers/view_helpers/link_helper'
|
|
8
8
|
require 'phantom_helpers/view_helpers/modal_helper'
|
9
9
|
require 'phantom_helpers/view_helpers/sort_helper'
|
10
10
|
require 'phantom_helpers/view_helpers/table_helper'
|
11
|
+
require 'phantom_helpers/view_helpers/flash_helper'
|
11
12
|
|
12
13
|
module PhantomHelpers
|
13
14
|
module ViewHelpers
|
@@ -21,5 +22,6 @@ module PhantomHelpers
|
|
21
22
|
ActionView::Base.send :include, ModalHelper
|
22
23
|
ActionView::Base.send :include, SortHelper
|
23
24
|
ActionView::Base.send :include, TableHelper
|
25
|
+
ActionView::Base.send :include, FlashHelper
|
24
26
|
end
|
25
27
|
end
|
data/phantom_helpers.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'phantom_helpers'
|
5
|
-
s.version = '0.11.0.
|
5
|
+
s.version = '0.11.0.alpha6'
|
6
6
|
s.summary = 'Phantom View Helpers'
|
7
7
|
s.description = 'rails helpers for bootstrap 3'
|
8
8
|
s.licenses = ['GNU GPL-3', 'AGPL-3']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phantom_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.0.
|
4
|
+
version: 0.11.0.alpha6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vassil Kalkov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-12-
|
13
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: rails helpers for bootstrap 3
|
16
16
|
email: info@genshin.org
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- lib/phantom_helpers/view_helpers/controller_helper.rb
|
28
28
|
- lib/phantom_helpers/view_helpers/count_helper.rb
|
29
29
|
- lib/phantom_helpers/view_helpers/extras_helper.rb
|
30
|
+
- lib/phantom_helpers/view_helpers/flash_helper.rb
|
30
31
|
- lib/phantom_helpers/view_helpers/html_helper.rb
|
31
32
|
- lib/phantom_helpers/view_helpers/icon_helper.rb
|
32
33
|
- lib/phantom_helpers/view_helpers/image_helper.rb
|