shopapp 0.2.6 → 0.2.7
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/controllers/concerns/shoplift_client.rb +16 -1
- data/app/helpers/shopapp_helper.rb +8 -0
- data/app/views/shopapp/_shopapp.html.haml +3 -3
- data/shopapp.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7358bcd191eca835a745a359c283c2c021a89578552c09b82fdecfcd44c2ca1
|
|
4
|
+
data.tar.gz: 8d1f82dfba08d9da9dd1a19d55db02b121ca65d5d904fe1ab5750d1b47184736
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4767ee96a987c7000aa21f81a1084cb6851d120e19c16d144bd1b477dae3a75853d2126e9ca4f84ecf0b931962f7fe8c47ca478c4889b3d6d69940b16586f901
|
|
7
|
+
data.tar.gz: e9f323c0da1970f17c8bfcb27e4e7b5308cb2902fa83c90e1a5d7f9b9d5554b8351d57382282170f737e57f5eefd01192c0e18cd2055854b15b4e07749e939e4
|
|
@@ -9,6 +9,8 @@ module ShopliftClient
|
|
|
9
9
|
attr_reader :api_key
|
|
10
10
|
attr_reader :current_user
|
|
11
11
|
attr_reader :current_company
|
|
12
|
+
attr_reader :do_hide_search_for_this_action
|
|
13
|
+
helper_method :company_logo_path_defined
|
|
12
14
|
end
|
|
13
15
|
|
|
14
16
|
class_methods do
|
|
@@ -18,6 +20,7 @@ module ShopliftClient
|
|
|
18
20
|
|
|
19
21
|
def set_search_path(value)
|
|
20
22
|
@search_path = value
|
|
23
|
+
return if @search_path == :current_path
|
|
21
24
|
@search_path = "/#{@search_path}" unless @search_path[0] == '/'
|
|
22
25
|
@search_path = "#{@search_path}/" unless @search_path[-1] == '/'
|
|
23
26
|
end
|
|
@@ -34,6 +37,10 @@ module ShopliftClient
|
|
|
34
37
|
end
|
|
35
38
|
end
|
|
36
39
|
|
|
40
|
+
def hide_search_for_this_action
|
|
41
|
+
@do_hide_search_for_this_action = true
|
|
42
|
+
end
|
|
43
|
+
|
|
37
44
|
def session_cookie
|
|
38
45
|
session["authlift_session_id"]
|
|
39
46
|
end
|
|
@@ -195,4 +202,12 @@ module ShopliftClient
|
|
|
195
202
|
Rails.configuration.settings['authlift_app_secret'],
|
|
196
203
|
site: Rails.configuration.settings['authlift_url']
|
|
197
204
|
end
|
|
198
|
-
|
|
205
|
+
|
|
206
|
+
def company_logo_path_defined
|
|
207
|
+
if defined? self.company_logo_path
|
|
208
|
+
company_logo_path
|
|
209
|
+
else
|
|
210
|
+
"https://media.shoplift.fi/company_logos/#{@current_company.code}_company_logo_24.png"
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
%nav.navbar.navbar-dark.fixed-top.bg-dark.flex-md-nowrap.p-0.shadow.navbar-expand-md
|
|
5
5
|
-#= link_to(Rails.configuration.settings['shopapp_name'], '/', class: 'navbar-brand col-3 col-md-2 mr-0')
|
|
6
6
|
= link_to('/', class: 'navbar-brand col-3 col-md-2 mr-0') do
|
|
7
|
-
= image_tag
|
|
7
|
+
= image_tag company_logo_path_defined, style: "padding-bottom: 3px;"
|
|
8
8
|
%span= Rails.configuration.settings['shopapp_name']
|
|
9
9
|
%button.navbar-toggler(type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation")
|
|
10
10
|
%span.navbar-toggler-icon
|
|
11
11
|
#navbarSupportedContent.collapse.navbar-collapse.navbar-toggleable-xs
|
|
12
|
-
- unless controller.class.do_hide_search_for_this_controller
|
|
12
|
+
- unless controller.class.do_hide_search_for_this_controller || controller.do_hide_search_for_this_action
|
|
13
13
|
.w-75.mx-md-auto.mt-4.mt-md-0.ml-3
|
|
14
|
-
%form(action=
|
|
14
|
+
%form(action=search_path)
|
|
15
15
|
.input-group.input-group-sm
|
|
16
16
|
%input#search.form-control(name="search" placeholder="Search" type="text" value=@search)
|
|
17
17
|
.input-group-append
|
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.
|
|
4
|
-
s.date = '2018-09-
|
|
3
|
+
s.version = '0.2.7'
|
|
4
|
+
s.date = '2018-09-25'
|
|
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.
|
|
4
|
+
version: 0.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zeljko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|