express_admin 1.7.24 → 1.7.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/express_admin/sections/_main_region.sass +2 -1
- data/app/assets/stylesheets/express_admin/sections/_page_body.sass +1 -1
- data/app/assets/stylesheets/express_admin/sections/_page_sidebar.sass +1 -1
- data/app/assets/stylesheets/express_admin/sections/_sidebar_region.sass +3 -0
- data/app/components/express_admin/smart_table.rb +3 -1
- data/lib/express_admin/version.rb +1 -1
- data/test/dummy/test/components/smart_table_test.rb +9 -0
- data/test/fixtures/widgets.yml +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ead2f7234d30986e7ae5191a3b2ab0e52255f4e1
|
|
4
|
+
data.tar.gz: 12034e77823a4c1f6c5235366b1cca85397320e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41eeca514e5102d7d5fd3df73296e49142c1b5eee4c450cd466408ed77d37528ba6f6e755c9ec726d2ed696cfd71dc8bf52424fe14d34eb9d758ed5ed8b31e3f
|
|
7
|
+
data.tar.gz: 162968e3617a7c3db30d5e626887e8e6e3dba6672098aa2f7f2edd5651dcddb198a2c68b84474e67f59130f97953241b7daf2840cbab0e75a984a07d7cfeb566
|
|
@@ -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
|
-
|
|
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)
|
|
@@ -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: {
|
data/test/fixtures/widgets.yml
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-12-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: express_templates
|