workarea-admin 3.5.7 → 3.5.8

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
  SHA256:
3
- metadata.gz: a50c0890b678de1a3775d9227c9a1cf3a9c2a874e933342d986c943937d9b369
4
- data.tar.gz: 0d30f205a6b061caa140360efdc87ebc9bc580a1673d09fb256a7dfc5a70b501
3
+ metadata.gz: 53aa69458136ce8230480fc4b89e0fc9dc19cd05fdab78b277f287593c5497d3
4
+ data.tar.gz: 6935d4c3bf8d003af7090e5185e7b47c755c259a94b37df926a1399ca9cd638a
5
5
  SHA512:
6
- metadata.gz: 04c7943314cf9a6fc8ffe116bbdd0f6d15ccfa0f13f55e037869106593759a03d70e7554f1d898d9c9e740a8602722de9383bf067427d59a1f7ad56b6d2d3085
7
- data.tar.gz: b305c1426413775da437f2887b25f42d8c4da83c75b4fbb32cf6a19bd05c1949b06425d25cc30feaeb7b2db35ecc64c6daef6ad50264d7c8a7b81a5a32ade014
6
+ metadata.gz: 9a8f7c29d253e12b2957552bc5739f4224dd63a40635bfb31baeb68539da0416da5e0e82dc478e47def44533fa30db49697c132bce882b4e68c1aa50dcea0896
7
+ data.tar.gz: 535dfa3ce18d746840c40d4f66d7bcaf41c75bddc3c6bb4e3359f988a67a33c853bf55d0bd02a5a8f4d0dded4bad3c25c40ef02bf9cd508d4b9c480b3f6c160c
@@ -65,6 +65,9 @@ module Workarea
65
65
  action: 'index'
66
66
  )
67
67
  )
68
+
69
+ rescue ActionController::UrlGenerationError
70
+ nil
68
71
  end
69
72
  end
70
73
  end
@@ -62,7 +62,9 @@ module Workarea
62
62
  #
63
63
  # @return [String]
64
64
  def sell_price
65
+ return if min_price.blank?
65
66
  return min_price.format unless show_range?
67
+
66
68
  "#{max_price.format} – #{min_price.format}"
67
69
  end
68
70
  end
@@ -28,7 +28,7 @@
28
28
 
29
29
  .property
30
30
  = label_tag 'product[meta_description]', t('workarea.admin.create_catalog_products.content.meta_description'), class: 'property__name'
31
- = text_field_tag 'product[meta_description]', @product.meta_description, class: 'text-box text-box--i18n', placeholder: t('workarea.admin.create_catalog_products.content.defaults_to_a_truncated_description')
31
+ = text_field_tag 'product[meta_description]', @product.meta_description, class: 'text-box text-box--i18n', placeholder: t('workarea.admin.create_catalog_products.content.defaults_to_description')
32
32
  %span.property__note= t('workarea.admin.create_catalog_products.content.provides_a_summary_that_is_displayed_on_search_engine_result_pages')
33
33
 
34
34
  .workflow-bar
@@ -1,4 +1,7 @@
1
- = render_schema_org(email_action_schema(index_url_for(@import.model_class), t('workarea.admin.data_file_mailer.import.email_action.name'), t('workarea.admin.data_file_mailer.import.email_action.description')))
1
+ - index_url = index_url_for(@import.model_class, only_path: false)
2
+
3
+ - if index_url.present?
4
+ = render_schema_org(email_action_schema(index_url, t('workarea.admin.data_file_mailer.import.email_action.name'), t('workarea.admin.data_file_mailer.import.email_action.description')))
2
5
 
3
6
  %tr
4
7
  %td
@@ -7,7 +10,9 @@
7
10
  %td
8
11
  %p
9
12
  = t('workarea.admin.data_file_mailer.import.success', count: pluralize(@import.succeeded, @import.format.unit.downcase))
10
- %tr
11
- %td
12
- %p
13
- = link_to t('workarea.admin.data_file_mailer.import.link_text', name: @import.name.pluralize), index_url_for(@import.model_class, only_path: false)
13
+
14
+ - if index_url.present?
15
+ %tr
16
+ %td
17
+ %p
18
+ = link_to t('workarea.admin.data_file_mailer.import.link_text', name: @import.name.pluralize), index_url
@@ -64,7 +64,7 @@
64
64
  = upcoming_changesets_icon_for(result)
65
65
  = append_partials('admin.pricing_skus_additional_fields', result: result)
66
66
  %td.align-right= number_to_currency result.msrp
67
- %td.align-right= result.sell_price
67
+ %td.align-right= result.sell_price || '–'
68
68
  %td.align-center= t("workarea.admin.#{result.on_sale?}")
69
69
  %td.align-center= t("workarea.admin.#{result.discountable?}")
70
70
  %td= local_time_ago(result.updated_at)
@@ -2,7 +2,7 @@
2
2
 
3
3
  .view
4
4
  .view__header
5
- .grid.grid--middle.grid--right
5
+ .grid.grid--right
6
6
  .grid__cell.grid__cell--50
7
7
  .view__heading
8
8
  = link_to "↑ #{t('workarea.admin.users.index.dashboard_link')}", people_dashboards_path, class: 'view__dashboard-button'
@@ -975,6 +975,7 @@ en:
975
975
  browser_title: Browser Title
976
976
  cancel: Cancel
977
977
  defaults_to_a_truncated_description: "(defaults to a truncated description)"
978
+ defaults_to_description: "(defaults to description)"
978
979
  description: Description
979
980
  meta_description: Meta Description
980
981
  or_skip_this: or skip this
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module Admin
5
+ class NavigationHelperTest < ViewTest
6
+ include Engine.routes.url_helpers
7
+
8
+ def test_index_url_for
9
+ assert_equal(admin.catalog_products_path, index_url_for(Catalog::Product))
10
+ assert_equal(admin.catalog_products_path, index_url_for(create_product))
11
+ assert_nil(index_url_for(Fulfillment))
12
+ assert_raises { index_url_for('foo') }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -250,6 +250,17 @@ module Workarea
250
250
  results.map { |r| r['type'] }
251
251
  )
252
252
  end
253
+
254
+ def test_sorting_by_recency
255
+ create_user(email: 'foo-one@workarea.com', updated_at: 1.day.ago)
256
+ create_user(email: 'foo-two@workarea.com', updated_at: 1.hour.ago)
257
+ get admin.jump_to_path(q: 'foo')
258
+
259
+ results = JSON.parse(response.body)['results']
260
+ assert_equal(2, results.length)
261
+ assert_match('foo-two@workarea.com', results.first['label'])
262
+ assert_match('foo-one@workarea.com', results.second['label'])
263
+ end
253
264
  end
254
265
  end
255
266
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.7
4
+ version: 3.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2020-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.5.7
19
+ version: 3.5.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.5.7
26
+ version: 3.5.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: workarea-storefront
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.5.7
33
+ version: 3.5.8
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.5.7
40
+ version: 3.5.8
41
41
  description: Provides site administration functionality for the Workarea Commerce
42
42
  Platform.
43
43
  email:
@@ -1293,6 +1293,7 @@ files:
1293
1293
  - test/helpers/workarea/admin/icons_helper_test.rb
1294
1294
  - test/helpers/workarea/admin/imports_helper_test.rb
1295
1295
  - test/helpers/workarea/admin/insights_helper_test.rb
1296
+ - test/helpers/workarea/admin/navigation_helper_test.rb
1296
1297
  - test/helpers/workarea/admin/products_helper_test.rb
1297
1298
  - test/helpers/workarea/admin/releases_helper_test.rb
1298
1299
  - test/helpers/workarea/admin/settings_helper_test.rb
@@ -1525,7 +1526,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1525
1526
  - !ruby/object:Gem::Version
1526
1527
  version: '0'
1527
1528
  requirements: []
1528
- rubygems_version: 3.0.6
1529
+ rubygems_version: 3.0.3
1529
1530
  signing_key:
1530
1531
  specification_version: 4
1531
1532
  summary: Admin for the Workarea Commerce Platform