biola_wcms_components 0.3.0 → 0.4.0

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: e8923842f9aa5259010d882588b06970b3bfd005
4
- data.tar.gz: af976f1cb38616b4424f28583c1f73af615c3e58
3
+ metadata.gz: 4b7c9131f6a8993ed4d9841d0ff47790c3479c2e
4
+ data.tar.gz: fe85bab8dbbc289140df5948ead403fa0532dd66
5
5
  SHA512:
6
- metadata.gz: b128af6f966ae9eaacb5073a0313a2d6a8dddc6615a21d59884d33f0d7e691d5f44ebddada43c1c2090099907616cf608140d490b186ca52d34b1ae9efbb4260
7
- data.tar.gz: ea35749a0432ddee47197d3acdc3ddf79edaa0049c169bf16f8b715805347e84cdd8ef441970416a8605f17563410729adcecd1723f83bda7b3b8f59411713e7
6
+ metadata.gz: bf4652f7261bd846c94eabef8da28f19b9b7cd540e7c9bc927a54bbeebdee228578e90519915c2dfa9d350f595724d1b14c16ef3e006449f8c8f3a29987ecead
7
+ data.tar.gz: bc7f4c6147a713771e0338d8ccd86b98cf24a5882eb345b680bff7e2830d3901f8f7f92b1948e9c7d7f5bd88cbf6f5772b4ffb66046649d5bc6f34fb95c6cfb8
@@ -12,6 +12,8 @@
12
12
  #= require redactor
13
13
  #= require redactor_fullscreen
14
14
  #
15
+ #= require chronic_ping
16
+ #
15
17
  #= require_tree ./configuration
16
18
  #= require_tree ./components
17
19
  #= require_self
@@ -0,0 +1,15 @@
1
+ ruby:
2
+ form ||= nil
3
+ attribute ||= nil
4
+ placeholder ||= nil
5
+ required ||= false
6
+ value ||= nil
7
+ format ||= 'date'
8
+
9
+ = wcms_component 'forms/datetime',
10
+ form: form,
11
+ attribute: attribute,
12
+ placeholder: placeholder,
13
+ required: required,
14
+ value: value,
15
+ format: format
@@ -0,0 +1,21 @@
1
+ ruby:
2
+ # If you change parameters here, also change them in _date.html.slim
3
+ form ||= nil
4
+ attribute ||= nil
5
+ placeholder ||= nil
6
+ required ||= false
7
+ value ||= nil
8
+ format ||= 'datetime'
9
+
10
+ html_options = {
11
+ placeholder: placeholder,
12
+ required: required,
13
+ class: 'form-control chronic_ping',
14
+ data: {format: format}
15
+ }
16
+
17
+
18
+ - if form
19
+ = form.text_field attribute, html_options
20
+ - else
21
+ = text_field_tag attribute, value, html_options
@@ -10,6 +10,7 @@ ruby:
10
10
  form ||= nil
11
11
  attribute ||= nil
12
12
  value ||= value
13
+ separator ||= ','
13
14
  html_class ||= 'form-control'
14
15
  typeahead ||= nil # for available options see tag_input.js.coffee
15
16
  options ||= {}
@@ -17,8 +18,12 @@ ruby:
17
18
  class: html_class,
18
19
  data: {role: 'tagsinput', typeahead: typeahead}
19
20
  })
20
- html_options[:value] = value unless value.nil?
21
21
 
22
+ if form && attribute && form.object.respond_to?(attribute)
23
+ value ||= form.object[attribute]
24
+ end
25
+ value = value.join(separator) if value.is_a?(Array)
26
+ html_options[:value] = value unless value.nil?
22
27
 
23
28
  - if form
24
29
  = form.text_field attribute, html_options
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency "ace-rails-ap", "~> 3.0"
22
22
  spec.add_dependency "buweb_content_models", ">= 0.82"
23
23
  spec.add_dependency "coffee-rails", ">= 4.0"
24
+ spec.add_dependency "chronic_ping", "~> 0.4"
24
25
  spec.add_dependency "pundit", "~> 0.3"
25
26
  spec.add_dependency "sass-rails", ">= 4.0"
26
27
  spec.add_dependency "slim", ">= 2.0"
@@ -2,6 +2,7 @@ require "biola_wcms_components/version"
2
2
  require "biola_wcms_components/engine" if defined?(::Rails)
3
3
  require "ace-rails-ap"
4
4
  require "buweb_content_models"
5
+ require "chronic_ping"
5
6
  require "pundit"
6
7
  require "coffee-rails"
7
8
  require "sass-rails"
@@ -1,3 +1,3 @@
1
1
  module BiolaWcmsComponents
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biola_wcms_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-13 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ace-rails-ap
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: chronic_ping
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.4'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.4'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: pundit
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -160,6 +174,8 @@ files:
160
174
  - app/helpers/wcms_components/component_helper.rb
161
175
  - app/helpers/wcms_components/navigation_helper.rb
162
176
  - app/views/wcms_components/alerts/_message_list.html.slim
177
+ - app/views/wcms_components/forms/_date.html.slim
178
+ - app/views/wcms_components/forms/_datetime.html.slim
163
179
  - app/views/wcms_components/forms/_json_editor.html.slim
164
180
  - app/views/wcms_components/forms/_person_lookup.html.slim
165
181
  - app/views/wcms_components/forms/_presentation_data_editor.html.slim