express_admin 1.7.12 → 1.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/express_admin/screen.sass +0 -1
- data/app/assets/stylesheets/express_admin/shared/_progress.sass +1 -1
- data/app/helpers/express_admin/admin_helper.rb +12 -2
- data/app/views/layouts/devise.html.et +1 -1
- data/app/views/layouts/express_admin/admin.html.et +2 -1
- data/lib/express_admin/engine.rb +0 -1
- data/lib/express_admin/search.rb +9 -2
- data/lib/express_admin/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81fe37a40731f39853fdce70fdc3a8fd7fa7610e
|
4
|
+
data.tar.gz: 15e175b9c9f0c733b41cbd6c3845ddd41b2b194b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0909bc0a14feca5297021605926f3a0dbd514febeed2108023e42b5689bb4a4a61955a32534ab99ec97f6b45400f25c231bd29eb26818e98db7edbdc1365083
|
7
|
+
data.tar.gz: 5c88ba44be27e78875eba353a8db6343857505d7ee1738c5828bab41448cba080e91791d36446c7568c042fe30198d6b07e01e5a5119eb2f0d79a636432b6a3d
|
@@ -52,8 +52,18 @@ module ExpressAdmin
|
|
52
52
|
humanized_money_with_symbol Money.new(amount, currency)
|
53
53
|
end
|
54
54
|
|
55
|
-
def title_content
|
56
|
-
|
55
|
+
def title_content(content = '', base_title = '')
|
56
|
+
base_title = base_title.present? ? base_title : app_title
|
57
|
+
|
58
|
+
if content.present?
|
59
|
+
"#{content} · #{base_title}"
|
60
|
+
else
|
61
|
+
base_title
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def app_title
|
66
|
+
Rails.application.class.parent_name.underscore.titleize
|
57
67
|
end
|
58
68
|
|
59
69
|
def description_meta_content
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'<!DOCTYPE html>'.html_safe+
|
2
2
|
html(lang: 'en') {
|
3
3
|
head {
|
4
|
-
title { title_content }
|
4
|
+
title { title_content(yield(:title), yield(:base_title)) }
|
5
5
|
meta(charset: 'utf-8')
|
6
6
|
meta(name: "description", content: "#{helpers.description_meta_content}")
|
7
7
|
meta(name: "viewport", content: "width=device-width, initial-scale=1.0")
|
@@ -1,7 +1,8 @@
|
|
1
1
|
'<!DOCTYPE html>'.html_safe+
|
2
2
|
html {
|
3
3
|
head {
|
4
|
-
title { title_content }
|
4
|
+
title { title_content(yield(:title), yield(:base_title)) }
|
5
|
+
|
5
6
|
meta(name: "description", content: "#{helpers.description_meta_content}")
|
6
7
|
meta(name: "viewport", content: "width=device-width, initial-scale=1.0")
|
7
8
|
admin_javascript_and_css_includes
|
data/lib/express_admin/engine.rb
CHANGED
data/lib/express_admin/search.rb
CHANGED
@@ -6,8 +6,8 @@ module ExpressAdmin
|
|
6
6
|
@scope = scope
|
7
7
|
@params = params
|
8
8
|
self.search_parent_tables(scope)
|
9
|
-
@search_results = @search_results | scope.basic_search(params) if scope.columns
|
10
|
-
@search_results = @search_results | scope.fuzzy_search(params) if scope.columns
|
9
|
+
@search_results = @search_results | scope.basic_search(params) if searchable?(scope.columns)
|
10
|
+
@search_results = @search_results | scope.fuzzy_search(params) if searchable?(scope.columns)
|
11
11
|
@search_results
|
12
12
|
end
|
13
13
|
|
@@ -47,5 +47,12 @@ module ExpressAdmin
|
|
47
47
|
string_columns
|
48
48
|
end
|
49
49
|
|
50
|
+
def self.searchable?(columns)
|
51
|
+
type = columns.map(&:type)
|
52
|
+
|
53
|
+
type.include?(:string) || type.include?(:text)
|
54
|
+
end
|
55
|
+
|
56
|
+
private_class_method :searchable?
|
50
57
|
end
|
51
58
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
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.13
|
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-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bourbon
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.2'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '3.2'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: express_templates
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|