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: caacd7b23e517d9d0c528e93119f7f9f0cdd1649
4
- data.tar.gz: b1e08d6e4d5dff2f857c0e9443e98ff8f4c279c7
3
+ metadata.gz: 4a8bb0bca18cbcbc70219a6f036f736f01099a77
4
+ data.tar.gz: 5efbbedf3e424fba28efcff799878198db927635
5
5
  SHA512:
6
- metadata.gz: 6f76c52bb4b012e5e12f4bab65c72ebe418bcfb91328e59101378cdef0ebf2045ae2c44a029ba62bc4322324697bc26d7828637fc32bec9c5e31e0744494202a
7
- data.tar.gz: 27b1a8572d51de1f21290bd6aaf468333048fff7a41b35a3e0e4ab71de066b841ed95becc28f169d669a34740dec399ca5eb05c878510d814927ef4b2982d779
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
@@ -2,6 +2,12 @@ module PhantomHelpers
2
2
  module ViewHelpers
3
3
  module HtmlHelper
4
4
 
5
+ def title(text)
6
+ content_for(:title) do
7
+ text
8
+ end
9
+ end
10
+
5
11
  def hr
6
12
  content_tag :div, class: "row" do
7
13
  content_tag :div, class: "col-md-12" do
@@ -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
@@ -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.alpha5'
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.alpha5
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-09 00:00:00.000000000 Z
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