effective_pages 3.7.8 → 3.7.10

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: 9afdd8eb4b1d378a4b39eadc3325e838e8ce70b1af6bdfb520c95a0d42b8b2ea
4
- data.tar.gz: 06402fc18cfa14a6db2dcc791e497b00d0977fedcbac4294bea4238723d6bce5
3
+ metadata.gz: 9923265ae5ffd15b5e24700ee80932ea234bbe445c82fe25ea42b4e3da063da7
4
+ data.tar.gz: e380773f8395dd67e5489579eaa5e4ed4e666ad2c8b17dc22f7247e591bd581d
5
5
  SHA512:
6
- metadata.gz: 11e71da9e8cf5711b52df703fc3ff934c323bf07fc0abc264b877069029c9371ba2e5e7bc17e783ab0edb555af50711f68c9dddfe5aea67915572730593316c1
7
- data.tar.gz: ca68767a16dbac14fdc57690297d273a4674d6b89d9ceac64d7ac73af8b0408f39cf00fdf48e6d68d0ba94cbb574e5dbeb1f0de71ead02aa4a899874f6a11836
6
+ metadata.gz: 2eb13f6e7bce93c2701ee025feed47700f5b5ef07562fa6aee835ef2ff5b162cc64d57c007bd114370fd2a051b3f88e0fc9df325eb0c10078d4db7eb77460f4e
7
+ data.tar.gz: 97f23361eff3499ab78cd31f917323559441f8ee7a6efd14be5de12087225bfa3934b40fe8c92a161633b057c0e4b6db2530b22cf8c912bc56c691f8ab626c83
@@ -1,13 +1,11 @@
1
1
  // Add Google Analytics Code
2
2
  // Supports Turbolinks and Turbo
3
- document.addEventListener('turbolinks:load', function(event){
3
+ document.addEventListener("turbolinks:load", function(event) {
4
4
  if(typeof(gtag) != 'function') { return }
5
5
 
6
- var code = $('head').find('script[data-gtag-code]').first().data('gtag-code');
7
- if(typeof(code) == undefined) { return }
8
-
9
- gtag('config', code, {
10
- 'page_title': document.title,
11
- 'page_path': location.href.replace(location.origin, "")
6
+ gtag('event', 'page_view', {
7
+ page_title: event.target.title,
8
+ page_location: event.data.url,
9
+ page_path: location.href.replace(location.origin, "")
12
10
  });
13
11
  })
@@ -25,7 +25,7 @@ module Effective
25
25
  flash.now[:warning] = [
26
26
  'Hi Admin!',
27
27
  ('You are viewing a draft page.' unless @page.published?),
28
- ("<a href='#{effective_pages.edit_admin_page_path(@page)}' class='alert-link'>Click here to edit this page</a>.")
28
+ ("<a href='#{effective_pages.edit_admin_page_path(@page)}' class='alert-link' data-turbolinks='false'>Click here to edit this page</a>.")
29
29
  ].compact.join(' ')
30
30
  end
31
31
 
@@ -1,6 +1,9 @@
1
1
  = effective_form_with(model: [:admin, permalink], engine: true) do |f|
2
2
  = f.text_field :title, required: true, hint: 'Title of the permalink to be displayed'
3
- = f.text_field :slug, required: true, hint: 'Slug for link of the permalink'
3
+
4
+ - current_url = (effective_pages.permalink_redirect_url(f.object) rescue nil)
5
+ = f.text_field :slug, required: true, hint: "The slug controls this permalink's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This permalink is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe
6
+
4
7
  = f.text_field :summary, required: true, hint: 'Summary explanation of the permalink not displayed'
5
8
  = f.url_field :url, required: false, hint: 'The link if redirecting to a website or specific page'
6
9
  = f.file_field :attachment, required: false, hint: 'The attachment of the permalink if redirecting to a document, image or other file'
@@ -4,4 +4,5 @@
4
4
  window.dataLayer = window.dataLayer || [];
5
5
  function gtag(){dataLayer.push(arguments);}
6
6
  gtag('js', new Date());
7
+ gtag('config', "<%= code %>");
7
8
  </script>
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.7.8'.freeze
2
+ VERSION = '3.7.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.8
4
+ version: 3.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2023-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails