standard_view 0.1.28 → 0.1.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2d8e80dc394b24c29717924a1adaf10ff2b2c565082f73b224349fbf013ca28
4
- data.tar.gz: 8a21ceadc7944c8153d8fa494d4cfc5b3dd3996bc2ae09f5263014aa417427d3
3
+ metadata.gz: 2e43e739653a8742d9bcd3a060b306ed5d196d356ac911d1ec966d593b66cf57
4
+ data.tar.gz: 9f4249f7c5161262c9e4d74cca5498fc6a8d4b92bf6764af2340bbdbcd148071
5
5
  SHA512:
6
- metadata.gz: a23e8ffa63d4a7a7142a076190b044e62aab408f94bc4761da8e600bfe35440ee7eaac073defd70947d745d84d4ba82fd7aa5d859a98241b2a5a9f42c6b50d0c
7
- data.tar.gz: a5a5973920625a54f9643c6fef573feec9d077561d8a606504dcaf5534f8cfab88c09fbed86851ae2dbb965332c8c46c3bee2274adffcf06269eb40d1756a114
6
+ metadata.gz: 1cc631b4f6ddf8caa4b46984df3da4df9071c4500291a0b4daaccc8f5121870f7c5f05d10bec3901f2a0d1f0b3b008959222f09d4565eef901317314a9881b75
7
+ data.tar.gz: 8152be5ff9e8ccd141ec2dd3cc940b7b99d217eb25bdf6f2f8534f3c57218d92259950b09807c434c28399b833e0348c46080caa946d1003660bac592ecdd9b4
@@ -1,48 +1,52 @@
1
- <nav aria-label="breadcrumb">
2
- <ol class="breadcrumb">
3
- <% if material.parent? %>
4
- <% parent = material.parent %>
5
- <li class="breadcrumb-item">
6
- <% if parent.index_path? %>
7
- <%= link_to title_for_model(parent), public_send(parent.index_path) %>
8
- <% else %>
9
- &hellip;
1
+ <% if content_for?(:breadcrumbs) %>
2
+ <%= content_for(:breadcrumbs) %>
3
+ <% else %>
4
+ <nav aria-label="breadcrumb">
5
+ <ol class="breadcrumb">
6
+ <% if material.parent? %>
7
+ <% parent = material.parent %>
8
+ <li class="breadcrumb-item">
9
+ <% if parent.index_path? %>
10
+ <%= link_to title_for_model(parent), public_send(parent.index_path) %>
11
+ <% else %>
12
+ &hellip;
13
+ <% end %>
14
+ </li>
15
+ <li class="breadcrumb-item"><%= link_to parent.breadcrumb_title, parent %></li>
16
+
17
+ <% unless on_page?(controller: parent.route_key, action: material.route_key) %>
18
+ <li class="breadcrumb-item"><%= link_to title_for_model(material), [ parent, material.route_key ] %></li>
10
19
  <% end %>
11
- </li>
12
- <li class="breadcrumb-item"><%= link_to parent.breadcrumb_title, parent %></li>
13
-
14
- <% unless on_page?(controller: parent.route_key, action: material.route_key) %>
15
- <li class="breadcrumb-item"><%= link_to title_for_model(material), [ parent, material.route_key ] %></li>
20
+ <% else %>
21
+ <li class="breadcrumb-item">
22
+ <% if material.index_path? %>
23
+ <%= link_to title_for_model(material), public_send(material.index_path) %>
24
+ <% else %>
25
+ &hellip;
26
+ <% end %>
27
+ </li>
16
28
  <% end %>
17
- <% else %>
18
- <li class="breadcrumb-item">
19
- <% if material.index_path? %>
20
- <%= link_to title_for_model(material), public_send(material.index_path) %>
21
- <% else %>
22
- &hellip;
29
+
30
+ <% if on_page?(controller: material.route_key, action: :show) %>
31
+ <li class="breadcrumb-item active" aria-current="page"><%= material.breadcrumb_title %></li>
32
+ <% else %>
33
+ <% if on_page?(controller: material.route_key) %>
34
+ <li class="breadcrumb-item"><%= link_to material.breadcrumb_title, material %></li>
23
35
  <% end %>
24
- </li>
25
- <% end %>
26
-
27
- <% if on_page?(controller: material.route_key, action: :show) %>
28
- <li class="breadcrumb-item active" aria-current="page"><%= material.breadcrumb_title %></li>
29
- <% else %>
30
- <% if on_page?(controller: material.route_key) %>
31
- <li class="breadcrumb-item"><%= link_to material.breadcrumb_title, material %></li>
36
+ <li class="breadcrumb-item active" aria-current="page">
37
+ <% if local_assigns[:label].present? %>
38
+ <%= local_assigns[:label] %>
39
+ <% elsif I18n.exists?("breadcrumbs.#{controller_path}.#{action_name}") %>
40
+ <%= t("breadcrumbs.#{controller_path}.#{action_name}") %>
41
+ <% elsif I18n.exists?("breadcrumbs.actions.#{action_name}") %>
42
+ <%= t("breadcrumbs.actions.#{action_name}") %>
43
+ <% elsif I18n.exists?("breadcrumbs.controllers.#{controller_path}") %>
44
+ <%= t("breadcrumbs.controllers.#{controller_path}") %>
45
+ <% else %>
46
+ <%= action_name.humanize %>
47
+ <% end %>
48
+ </li>
32
49
  <% end %>
33
- <li class="breadcrumb-item active" aria-current="page">
34
- <% if local_assigns[:label].present? %>
35
- <%= local_assigns[:label] %>
36
- <% elsif I18n.exists?("breadcrumbs.#{controller_path}.#{action_name}") %>
37
- <%= t("breadcrumbs.#{controller_path}.#{action_name}") %>
38
- <% elsif I18n.exists?("breadcrumbs.actions.#{action_name}") %>
39
- <%= t("breadcrumbs.actions.#{action_name}") %>
40
- <% elsif I18n.exists?("breadcrumbs.controllers.#{controller_path}") %>
41
- <%= t("breadcrumbs.controllers.#{controller_path}") %>
42
- <% else %>
43
- <%= action_name.humanize %>
44
- <% end %>
45
- </li>
46
- <% end %>
47
- </ol>
48
- </nav>
50
+ </ol>
51
+ </nav>
52
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StandardView
4
- VERSION = "0.1.28"
4
+ VERSION = "0.1.29"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Garside