effective_pages 3.0.2 → 3.0.3

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: 2624cae83c49b16480071da85aaac6bf14daac37bb3c761af9a5eb463c4f1559
4
- data.tar.gz: 5cea72cad0f89b57bd47d62a25f1d694e0b5accd1546bd0f190dc104da3fbe10
3
+ metadata.gz: b6b7d0d5523e2ff95f473af071206ced883ffd26b1ecf55f0ada3d1976cf8826
4
+ data.tar.gz: be7222499f8473aa65af8c7f10e6c9e2a57f729cb59f677717cc4287f1a4d5c1
5
5
  SHA512:
6
- metadata.gz: 576642b33ebfe721192d30e860d6d864d659abba485a24e158e33234f4dde18b4a3548b33d043024114fe89eae8e3c6ab8854b3dd9dc8e5e23b6c5d617d0d023
7
- data.tar.gz: 512237ffc6d895b2d547fe0ffd8d9807931c5e925bcabb912eec86defe56745335a3f1d9c6b3fe848ed0e5613bf90505c79e91504cf125440896029eaa9b0c0e
6
+ metadata.gz: 970193c5f49a070d5006c5b5ecc41d48772481c65a2a9c5397f5562f6a46e4fd5bea087e5637834dfa83c480ee08fa253fede6f9d24f13a3f69bc4a2efe97b35
7
+ data.tar.gz: 7c4ce2f0896399ce6aaf8f69dcf1632565bd59fc80e0c155d4d5133955801f642b0e7e1268c9bdfca71c4e0da0ae70dfbb0a239f46ce9825f0057590d62461b9
@@ -31,6 +31,7 @@ module Effective
31
31
  menu :boolean
32
32
  menu_name :string
33
33
 
34
+ menu_title :string
34
35
  menu_url :string
35
36
  menu_position :integer
36
37
 
@@ -8,6 +8,8 @@
8
8
  - else
9
9
  = f.hidden_field :menu_name, value: menus.first
10
10
 
11
+ = f.text_field :menu_title, hint: "Display this title on menus instead of full page title"
12
+
11
13
  = f.text_field :menu_url, label: "Redirect to path or url instead of displaying page",
12
14
  hint: "Must start with http(s):// or /"
13
15
 
@@ -9,7 +9,7 @@
9
9
  - menu_children = page.menu_children.select { |page| page.menu_name == menu }
10
10
 
11
11
  - if menu_children.blank?
12
- = nav_link_to(page, page.menu_url.presence || effective_pages.page_path(page))
12
+ = nav_link_to((page.menu_title.presence || page.title), (page.menu_url.presence || effective_pages.page_path(page)))
13
13
  - else
14
14
  = nav_dropdown(page.to_s) do
15
15
  - ([page] + menu_children).each do |page|
@@ -17,4 +17,4 @@
17
17
  - next if (page.authenticate_user || page.roles.present?) && current_user.blank?
18
18
  - next if page.roles.present? && !current_user.roles.include?(page.roles)
19
19
 
20
- = nav_link_to(page, page.menu_url.presence || effective_pages.page_path(page))
20
+ = nav_link_to((page.menu_title.presence || page.title), (page.menu_url.presence || effective_pages.page_path(page)))
@@ -17,6 +17,7 @@ class CreateEffectivePages < ActiveRecord::Migration[4.2]
17
17
  t.integer :menu_parent_id
18
18
  t.boolean :menu, default: false
19
19
  t.string :menu_name
20
+ t.string :menu_title
20
21
  t.string :menu_url
21
22
  t.integer :menu_position
22
23
 
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.0.2'.freeze
2
+ VERSION = '3.0.3'.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.0.2
4
+ version: 3.0.3
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: 2021-03-08 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails