express_admin 1.7.12 → 1.7.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a69e82e8a3cc8b7bf34bc7cf346832361f1b4bd
4
- data.tar.gz: 80feed45c4298db113e753cb5db379d7956883da
3
+ metadata.gz: 81fe37a40731f39853fdce70fdc3a8fd7fa7610e
4
+ data.tar.gz: 15e175b9c9f0c733b41cbd6c3845ddd41b2b194b
5
5
  SHA512:
6
- metadata.gz: d14626ed2f47b344e3c769eeaff580783e882fb5f4f3bd57aa3064a5583e078ea465634486eecca72c9637910fb26b71575fa0c9dd2b5b5fe2595aa42383abca
7
- data.tar.gz: 578d067b2acfc1035ebfb38970eb5879cfc83d471f3e80503c075b0ffc21349193dd39366488e5e74637f5e464547f5949036eaf5dbeee0d59a3bb53b5925070
6
+ metadata.gz: b0909bc0a14feca5297021605926f3a0dbd514febeed2108023e42b5689bb4a4a61955a32534ab99ec97f6b45400f25c231bd29eb26818e98db7edbdc1365083
7
+ data.tar.gz: 5c88ba44be27e78875eba353a8db6343857505d7ee1738c5828bab41448cba080e91791d36446c7568c042fe30198d6b07e01e5a5119eb2f0d79a636432b6a3d
@@ -1,4 +1,3 @@
1
- @import 'bourbon'
2
1
  @import 'foundation'
3
2
  @import 'select2'
4
3
 
@@ -1,3 +1,3 @@
1
1
  .progress
2
2
  .meter
3
- @include transition(all 200ms ease-in-out)
3
+ transition: all 200ms ease-in-out
@@ -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
- content_for?(:title) ? yield(:title) : Rails.application.class.parent_name.underscore.titleize
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
@@ -9,7 +9,6 @@ require 'select2-rails'
9
9
  require 'dropzonejs-rails'
10
10
  require 'sass-rails'
11
11
  require 'foundation_apps_styles'
12
- require 'bourbon'
13
12
  require 'gravatar_image_tag'
14
13
  require 'kaminari'
15
14
  require 'responders'
@@ -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.map(&:type).include? :string
10
- @search_results = @search_results | scope.fuzzy_search(params) if scope.columns.map(&:type).include? :string
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
@@ -1,3 +1,3 @@
1
1
  module ExpressAdmin
2
- VERSION = "1.7.12"
2
+ VERSION = "1.7.13"
3
3
  end
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.12
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-22 00:00:00.000000000 Z
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