godmin 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/godmin.gemspec +2 -2
- data/lib/godmin/helpers/forms.rb +11 -4
- data/lib/godmin/version.rb +1 -1
- data/screenshot.png +0 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53be376cd7a129561b4522def2402cccb39d3058
|
4
|
+
data.tar.gz: 0d6f5077a4d56bbdb7bc4dcdd53fd2175f7383ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd9ef0ee561183456d29bdcfb9790f5c7779ac1fd38cd6655a860daff9b7094c2fe7c139956f0a973c42fb876ea6f6d38d4b8bc3f407e01057b27094c04d001b
|
7
|
+
data.tar.gz: 904eb969e8b6a2b9086bf630b5efd3ab0113fa6a95aa3472121e10dfb25f6ce6ff4ac758f3b9875888c3aafd1b2c0cfeb4c4ab08c17303c94585d2580b69d91d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Build Status](https://img.shields.io/travis/varvet/godmin/master.svg)](https://travis-ci.org/varvet/godmin)
|
5
5
|
[![Code Climate](https://img.shields.io/codeclimate/github/varvet/godmin.svg)](https://codeclimate.com/github/varvet/godmin)
|
6
6
|
|
7
|
-
Godmin is an admin
|
7
|
+
Godmin is an admin framework for Rails 4+.
|
8
8
|
|
9
9
|
- [Installation](#installation)
|
10
10
|
- [Standalone installation](#standalone-installation)
|
data/godmin.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.authors = ["Jens Ljungblad", "Linus Pettersson", "Varvet"]
|
11
11
|
gem.email = ["info@varvet.se"]
|
12
12
|
gem.homepage = "https://github.com/varvet/godmin"
|
13
|
-
gem.summary = "Godmin is an admin
|
14
|
-
gem.description = "Godmin is an admin
|
13
|
+
gem.summary = "Godmin is an admin framework for Rails 4+"
|
14
|
+
gem.description = "Godmin is an admin framework for Rails 4+"
|
15
15
|
gem.license = "MIT"
|
16
16
|
|
17
17
|
gem.files = `git ls-files`.split($/)
|
data/lib/godmin/helpers/forms.rb
CHANGED
@@ -34,11 +34,17 @@ module Godmin
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def date_field(attribute, options = {})
|
37
|
-
text_field(attribute,
|
37
|
+
text_field(attribute, options.deep_merge(
|
38
|
+
value: datetime_value(attribute, options, :datepicker),
|
39
|
+
data: { behavior: "datepicker" }
|
40
|
+
))
|
38
41
|
end
|
39
42
|
|
40
43
|
def datetime_field(attribute, options = {})
|
41
|
-
text_field(attribute,
|
44
|
+
text_field(attribute, options.deep_merge(
|
45
|
+
value: datetime_value(attribute, options, :datetimepicker),
|
46
|
+
data: { behavior: "datetimepicker" }
|
47
|
+
))
|
42
48
|
end
|
43
49
|
|
44
50
|
private
|
@@ -59,8 +65,9 @@ module Godmin
|
|
59
65
|
@object.class.reflect_on_association(attribute)
|
60
66
|
end
|
61
67
|
|
62
|
-
def datetime_value(attribute, format)
|
63
|
-
@object.send(attribute)
|
68
|
+
def datetime_value(attribute, options, format)
|
69
|
+
value = options[:value] || @object.send(attribute)
|
70
|
+
value.try(:strftime, @template.translate_scoped("datetimepickers.#{format}"))
|
64
71
|
end
|
65
72
|
end
|
66
73
|
end
|
data/lib/godmin/version.rb
CHANGED
data/screenshot.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: godmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ljungblad
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-02-
|
13
|
+
date: 2015-02-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bcrypt
|
@@ -144,7 +144,7 @@ dependencies:
|
|
144
144
|
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
|
-
description: Godmin is an admin
|
147
|
+
description: Godmin is an admin framework for Rails 4+
|
148
148
|
email:
|
149
149
|
- info@varvet.se
|
150
150
|
executables: []
|
@@ -227,6 +227,7 @@ files:
|
|
227
227
|
- lib/godmin/resource/scopes.rb
|
228
228
|
- lib/godmin/version.rb
|
229
229
|
- lib/tasks/godmin_tasks.rake
|
230
|
+
- screenshot.png
|
230
231
|
- test/dummy/README.rdoc
|
231
232
|
- test/dummy/Rakefile
|
232
233
|
- test/dummy/app/assets/images/.keep
|
@@ -297,7 +298,7 @@ rubyforge_project:
|
|
297
298
|
rubygems_version: 2.2.2
|
298
299
|
signing_key:
|
299
300
|
specification_version: 4
|
300
|
-
summary: Godmin is an admin
|
301
|
+
summary: Godmin is an admin framework for Rails 4+
|
301
302
|
test_files:
|
302
303
|
- test/dummy/README.rdoc
|
303
304
|
- test/dummy/Rakefile
|