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 +4 -4
- data/app/views/standard_view/_breadcrumbs.html.erb +48 -44
- data/lib/standard_view/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e43e739653a8742d9bcd3a060b306ed5d196d356ac911d1ec966d593b66cf57
|
4
|
+
data.tar.gz: 9f4249f7c5161262c9e4d74cca5498fc6a8d4b92bf6764af2340bbdbcd148071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cc631b4f6ddf8caa4b46984df3da4df9071c4500291a0b4daaccc8f5121870f7c5f05d10bec3901f2a0d1f0b3b008959222f09d4565eef901317314a9881b75
|
7
|
+
data.tar.gz: 8152be5ff9e8ccd141ec2dd3cc940b7b99d217eb25bdf6f2f8534f3c57218d92259950b09807c434c28399b833e0348c46080caa946d1003660bac592ecdd9b4
|
@@ -1,48 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
+
…
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
+
…
|
26
|
+
<% end %>
|
27
|
+
</li>
|
16
28
|
<% end %>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<%
|
22
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
-
|
34
|
-
|
35
|
-
|
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 %>
|