hancock_cms_goto 1.0.1.2 → 1.0.1.3
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/helpers/hancock/goto/goto_helper.rb +2 -2
- data/lib/hancock/goto/configuration.rb +12 -0
- data/lib/hancock/goto/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9771d8e1b490bf827afc4e10ab3e970cd6ed66da
|
|
4
|
+
data.tar.gz: f947668e1a9d7afdde70f4046e3a20261bff84bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc4e4f86484628d774e4e105167a22411e7a027852dd85cf4488065ae6645a1ea71a90dee736d4d27f9bb7a9ad108604f4c7f4cdd60c86afba8dddd305496ccf
|
|
7
|
+
data.tar.gz: 4a77dae4bd934d11d0e7ec3c456180f9d990f02c7186bbc87a516f95f1846e0f98baaee5f0ef1ff67df6f677d0af67400f1cddbb7950fcacf0e6400ab542740b
|
|
@@ -4,9 +4,9 @@ module Hancock::Goto::GotoHelper
|
|
|
4
4
|
html_options, options, name = options, name, block if block_given?
|
|
5
5
|
options ||= {}
|
|
6
6
|
|
|
7
|
-
options.
|
|
7
|
+
options.reverse_merge!({only_path: false}) if options.is_a?(Hash)
|
|
8
8
|
options = {controller: "hancock/goto/transfers", action: 'index', url: url_for(options)}
|
|
9
|
-
html_options.
|
|
9
|
+
html_options.reverse_merge!(Hancock::Goto.config.default_html_options) if html_options.is_a?(Hash)
|
|
10
10
|
|
|
11
11
|
if block_given?
|
|
12
12
|
link_to(options, html_options, &block)
|
|
@@ -41,6 +41,18 @@ module Hancock
|
|
|
41
41
|
@user_abilities_support = !!defined?(RailsAdminUserAbilities)
|
|
42
42
|
@ra_comments_support = !!defined?(RailsAdminComments)
|
|
43
43
|
end
|
|
44
|
+
|
|
45
|
+
def default_html_options
|
|
46
|
+
return @default_html_options if @default_html_options
|
|
47
|
+
@default_html_options = {target: :_blank}
|
|
48
|
+
_rel = []
|
|
49
|
+
_rel << 'nofollow' if Hancock::Goto.config.add_nofollow
|
|
50
|
+
_rel << 'noindex' if Hancock::Goto.config.add_noindex
|
|
51
|
+
_rel << 'noreferrer' if Hancock::Goto.config.add_noreferrer
|
|
52
|
+
_rel << 'noopener' if Hancock::Goto.config.add_noopener
|
|
53
|
+
@default_html_options[:rel] = _rel.join(" ")
|
|
54
|
+
@default_html_options
|
|
55
|
+
end
|
|
44
56
|
end
|
|
45
57
|
end
|
|
46
58
|
end
|
data/lib/hancock/goto/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hancock_cms_goto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.1.
|
|
4
|
+
version: 1.0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Kiseliev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-12-
|
|
11
|
+
date: 2016-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|