express_admin 1.7.24 → 1.7.25

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: cd9ac1eda63fbbe8d3c7730b963ab6ce4c3010d1
4
- data.tar.gz: b518962a086923b836ad72a6202ae43b9fba04a3
3
+ metadata.gz: ead2f7234d30986e7ae5191a3b2ab0e52255f4e1
4
+ data.tar.gz: 12034e77823a4c1f6c5235366b1cca85397320e1
5
5
  SHA512:
6
- metadata.gz: fd1b549d3cf7ac097f4053f04c54d0a466217925ea6d8ad9cd3a5bd003a9f1034ed3d0818e5753027fa602d61e4960559042121efc6e667227d4a4495d79e2db
7
- data.tar.gz: 5a04a5f5e20eef582b15263c084bacb0ed0e0b38debe7007c74357925cbd8fff4a70f7f079d56138b059239ae96aca24ec0ac55d1b8264a20c490797f034b57d
6
+ metadata.gz: 41eeca514e5102d7d5fd3df73296e49142c1b5eee4c450cd466408ed77d37528ba6f6e755c9ec726d2ed696cfd71dc8bf52424fe14d34eb9d758ed5ed8b31e3f
7
+ data.tar.gz: 162968e3617a7c3db30d5e626887e8e6e3dba6672098aa2f7f2edd5651dcddb198a2c68b84474e67f59130f97953241b7daf2840cbab0e75a984a07d7cfeb566
@@ -6,7 +6,8 @@
6
6
  @include grid-size(8)
7
7
  @include breakpoint(large)
8
8
  @include grid-size(9)
9
-
9
+ @include breakpoint(xlarge)
10
+ @include grid-size(10)
10
11
  border:
11
12
  right: 1px solid $border-color
12
13
 
@@ -6,4 +6,4 @@
6
6
  @include grid-orient(horizontal)
7
7
  @include grid-size(10)
8
8
  @include breakpoint(xlarge)
9
- @include grid-size(11)
9
+ @include grid-size(10)
@@ -5,5 +5,5 @@
5
5
  @include breakpoint(medium)
6
6
  @include grid-size(2)
7
7
  @include breakpoint(xlarge)
8
- @include grid-size(1)
8
+ @include grid-size(2)
9
9
  border-right: #dedede 1px solid
@@ -6,3 +6,6 @@
6
6
  @include grid-size(4)
7
7
  @include breakpoint(large)
8
8
  @include grid-size(3)
9
+ @include breakpoint(xlarge)
10
+ @include grid-size(2)
11
+
@@ -190,7 +190,9 @@ module ExpressAdmin
190
190
  end
191
191
  elsif attrib = accessor.to_s.match(COLUMN_REGEX_LIST[:link]).try(:[], 1)
192
192
  # TODO: only works with non-namespaced routes
193
- helpers.link_to item.send(attrib), resource_path(item)
193
+ if item.send(attrib).present?
194
+ helpers.link_to item.send(attrib), resource_path(item)
195
+ end
194
196
  elsif attrib = accessor.to_s.match(COLUMN_REGEX_LIST[:checkmark]).try(:[], 1)
195
197
  "<i class='ion-checkmark-round'></i>".html_safe if item.send(attrib)
196
198
  elsif attrib = accessor.to_s.match(COLUMN_REGEX_LIST[:in_words]).try(:[], 1)
@@ -1,3 +1,3 @@
1
1
  module ExpressAdmin
2
- VERSION = "1.7.24"
2
+ VERSION = "1.7.25"
3
3
  end
@@ -91,6 +91,15 @@ module Components
91
91
  assert_match /column3.*href="\/widgets\/(\d+)/, fragment
92
92
  end
93
93
 
94
+ test '_link does not generate a link when nil' do
95
+ fragment = arbre(widgets: Widget.all) {
96
+ smart_table(:widgets, columns: {
97
+ 'A link column' => :column3_link
98
+ })
99
+ }
100
+ assert_match "<td class=\"column3_link\"></td>", fragment
101
+ end
102
+
94
103
  test 'timestamp accessor appeneded with _in_words generates code that uses time_ago_in_words' do
95
104
  fragment = arbre(widget: Widget.first, widgets: Widget.all) {
96
105
  smart_table(:widgets, columns: {
@@ -18,3 +18,11 @@ two:
18
18
  column5: false
19
19
  column6: MyString
20
20
  column7: 1
21
+
22
+ three:
23
+ category: tools
24
+ column2: Hammer
25
+ column3: ''
26
+ column4: 2015-05-25 15:12:06
27
+ column5: false
28
+ column6: MyString
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: express_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.24
4
+ version: 1.7.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Talcott Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-10 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: express_templates