shopapp 0.2.24 → 0.2.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
  SHA256:
3
- metadata.gz: 34e94a820838a81f31b9a63449450eb559816f0b9acf2f1ee2b7f91cc63895e9
4
- data.tar.gz: 455c487d5be37bcea6ec14b5f303cac27f8c767ff4c34414bab8242cae26b027
3
+ metadata.gz: '072874c8a7e91e6aeca35f8bb6063b3e1d456cb404ba6b485319e129e1672488'
4
+ data.tar.gz: 259a6604814c7a12c15a5879177aca5150570b62e8d56905eb85c55fb250668b
5
5
  SHA512:
6
- metadata.gz: 7196867de8eb9fa4072bb90e3f9ce36162d5c704cd819051537e38cace18d7b776cc4a6d8bf734ea65cc18722aa516f6c01cdf2da3fcd47a5d6bfbedaaf6a0f8
7
- data.tar.gz: d3472af90d102283aa52d490b3157936b8404f678fcf0501e75c095cdb471ab14e5c1c26c3b0d1f7e00b4f6545504e21557832c9564029a0558af425b3c7c28a
6
+ metadata.gz: c62b380297e2be67e1ee058d888e0887e7a1c60a23c5730e1f9b6e3c51bf0878d9c03c5c35216b8889af3e3ec28c443c4f4f9b06fa7a555d48e50e16c029793e
7
+ data.tar.gz: e4bfed6507bc70ccc5675706c4f0e1ead409d94d9d4d7f706f5813c1ce8348dddb3a7ed68c9ad3cbd2d3b22cdedc4a18e32e5ee94e17296ceb0734d971457489
@@ -10,6 +10,7 @@ module ShopliftClient
10
10
  attr_reader :current_user
11
11
  attr_reader :current_company
12
12
  attr_reader :do_hide_search_for_this_action
13
+ attr_accessor :search_placeholder
13
14
  helper_method :company_logo_path_defined
14
15
  end
15
16
 
@@ -57,6 +58,10 @@ module ShopliftClient
57
58
  @do_hide_search_for_this_action = true
58
59
  end
59
60
 
61
+ def show_search_for_this_action
62
+ @do_hide_search_for_this_action = false
63
+ end
64
+
60
65
  def session_cookie
61
66
  session["authlift_session_id"]
62
67
  end
@@ -50,6 +50,10 @@ module ShopappHelper
50
50
  HTML
51
51
  end
52
52
 
53
+ def search_placeholder
54
+ controller.search_placeholder || "Search..."
55
+ end
56
+
53
57
  def search_path
54
58
  if controller.class.search_path == :current_path
55
59
  request.path
@@ -31,11 +31,12 @@
31
31
  %main.col-lg-10.ml-lg-auto{:role => "main"}
32
32
  .row.justify-content-center
33
33
  .col-lg-8.px-lg-0.pt-lg-3
34
- %nav.navbar.navbar-light.justify-content-start.flex-nowrap
35
- %span.material-icons.d-inline-block.text-muted.mr-1 search
36
- %form.w-100(action=search_path)
37
- .form-group.mb-0
38
- %input.form-control{"aria-describedby" => "basic-addon1", "aria-label" => "Search", :placeholder => "Search here for names, dates and ID's", :type => "search"}/
34
+ - unless controller.class.do_hide_search_for_this_controller && (controller.do_hide_search_for_this_action != false)
35
+ %nav.navbar.navbar-light.justify-content-start.flex-nowrap
36
+ %span.material-icons.d-inline-block.text-muted.mr-1 search
37
+ %form.w-100(action=search_path)
38
+ .form-group.mb-0
39
+ %input.form-control{"aria-describedby" => "basic-addon1", "aria-label" => "Search", :placeholder => search_placeholder, :type => "search"}/
39
40
  .col-lg-4.px-lg-0.pt-lg-3.d-none.d-lg-flex.align-items-center.justify-content-end
40
41
  .dropdown
41
42
  %a#dropdownMenuButton.chip.chip-action.dropdown-toggle.mr-lg-4{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#"}
@@ -60,7 +61,7 @@
60
61
  .row.justify-content-end
61
62
  .col
62
63
  - flash.keys.each do |flash_key|
63
- .alert.alert-dismissible.container.fade.show(role="alert" class="alert-#{flash_key}")
64
+ .alert.alert-dismissible.mt-3.fade.show(role="alert" class="alert-#{flash_key.gsub('notice', 'primary')}")
64
65
  = flash[flash_key].html_safe
65
66
  %button.close{"aria-label" => "Close", "data-dismiss" => "alert", :type => "button"}
66
67
  %span{"aria-hidden" => "true"} ×
data/shopapp.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopapp'
3
- s.version = '0.2.24'
4
- s.date = '2019-01-29'
3
+ s.version = '0.2.25'
4
+ s.date = '2019-02-01'
5
5
  s.summary = 'Do a shoplift.'
6
6
  s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
7
7
  I am qualmish at the smell of leek.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.24
4
+ version: 0.2.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-29 00:00:00.000000000 Z
11
+ date: 2019-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties