rails_admin_settings 0.7.4 → 0.7.5

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: 015b9c7212b0472dd83706edcd790c417057b357
4
- data.tar.gz: 7c73ecbac3122835384cb56e4d39c697a6a676be
3
+ metadata.gz: ad79a19617b69695b657e11e36a3df0d06c4f003
4
+ data.tar.gz: f181e4ef7ee94eb0ab296bb70e52bf26465d1fb9
5
5
  SHA512:
6
- metadata.gz: a599a697d23e2e6be8203ba321733b1f5dec8938ffd39cd2664b7c547011118376376e66d543c876cb99432d9da4fd45c7f7de0ee120b73574fe5daf9aef1d67
7
- data.tar.gz: c34095c9e25a40a7773b0330673cf6ef0418833ec4dbf88614801e2f6232dd650d65cd8daf5c389eff6ec6b975201f8cf0367a11d9fe04afd4f32ceaf7541b5c
6
+ metadata.gz: 8a846dbbd1fea9ea0ca1492088d92cee3287d94c2ca31cce05c21839f5e3e030b51c9f57d9f6b101416194aa60979dbd05f8f261e480cfda027aebe4f57606af
7
+ data.tar.gz: fcf2383e74d2dac42a9abf7eb9de661ddcdd698f8aae159ed77b702ce3e3f64c6b54634500eb94b500ffd9dbaa644a2a830e394933e15980afada6bd38f1dba2
@@ -14,7 +14,17 @@ module RailsAdminSettings
14
14
  field :type
15
15
  field :ns
16
16
  field :name
17
- field :raw
17
+ field :raw do
18
+ pretty_value do
19
+ if bindings[:object].file_type?
20
+ "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'>#{CGI::escapeHTML(bindings[:object].to_path)}</a>".html_safe
21
+ elsif bindings[:object].image_type?
22
+ "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'><img src='#{CGI::escapeHTML(bindings[:object].file.url)}' /></a>".html_safe
23
+ else
24
+ value
25
+ end
26
+ end
27
+ end
18
28
  end
19
29
 
20
30
  edit do
@@ -30,13 +40,13 @@ module RailsAdminSettings
30
40
  field :raw do
31
41
  partial "setting_value"
32
42
  visible do
33
- !bindings[:object].file_type?
43
+ !bindings[:object].upload_type?
34
44
  end
35
45
  end
36
46
  if Settings.file_uploads_supported
37
47
  field :file, Settings.file_uploads_engine do
38
48
  visible do
39
- bindings[:object].file_type?
49
+ bindings[:object].upload_type?
40
50
  end
41
51
  end
42
52
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminSettings
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Tv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-15 00:00:00.000000000 Z
11
+ date: 2014-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid