standard_view 0.1.24 → 0.1.25
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 +5 -4
- data/app/views/standard_view/_edit.html.erb +1 -1
- data/app/views/standard_view/_index.html.erb +4 -4
- data/app/views/standard_view/_model_form.html.erb +2 -2
- data/app/views/standard_view/_new.html.erb +1 -1
- data/app/views/standard_view/_show.html.erb +4 -4
- data/lib/standard_view/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc8f6eee8d00babbc6708e89d2461e5bb903b9019f886c16a14f2baf31d7382
|
4
|
+
data.tar.gz: 675a5853056a178b6f2e63bed5c33207b918a4d5c096d30235938c8c9eca48a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa8e5aec6bea1e476c5787215356836bc6f72cbe9fa8a37567622237bb112adb2b4b59695c3fc63b2af2622ff50686af985e6e7787a94a5c126cc748eb2d7138
|
7
|
+
data.tar.gz: 7047d2fa1eb4bcab8fd74c8f3398bab134b9b58f663750432a2417d28ae924537b78c42757d5600f3684a241e75cd7ffefa8b91619d978a949adc325221dd4a4
|
@@ -31,14 +31,15 @@
|
|
31
31
|
<li class="breadcrumb-item"><%= link_to material.breadcrumb_title, material %></li>
|
32
32
|
<% end %>
|
33
33
|
<li class="breadcrumb-item active" aria-current="page">
|
34
|
+
<% controller_path_i18n = controller_path.gsub('/', '.') %>
|
34
35
|
<% if local_assigns[:label].present? %>
|
35
36
|
<%= local_assigns[:label] %>
|
36
|
-
<% elsif I18n.exists?("breadcrumbs.#{
|
37
|
-
<%= t("breadcrumbs.#{
|
37
|
+
<% elsif I18n.exists?("breadcrumbs.#{controller_path_i18n}.#{action_name}") %>
|
38
|
+
<%= t("breadcrumbs.#{controller_path_i18n}.#{action_name}") %>
|
38
39
|
<% elsif I18n.exists?("breadcrumbs.actions.#{action_name}") %>
|
39
40
|
<%= t("breadcrumbs.actions.#{action_name}") %>
|
40
|
-
<% elsif I18n.exists?("breadcrumbs.controllers.#{
|
41
|
-
<%= t("breadcrumbs.controllers.#{
|
41
|
+
<% elsif I18n.exists?("breadcrumbs.controllers.#{controller_path_i18n}") %>
|
42
|
+
<%= t("breadcrumbs.controllers.#{controller_path_i18n}") %>
|
42
43
|
<% else %>
|
43
44
|
<%= action_name.humanize %>
|
44
45
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%# For the good-spirited and impossibly lazy developer, we attempt to jump-start with no code, assuming conventions. %>
|
2
2
|
<% if local_assigns[:material].nil? %>
|
3
|
-
<% record = "#{
|
3
|
+
<% record = "#{controller_path.singularize.camelize}".constantize.find(params[:id]) if local_assigns[:record].nil? %>
|
4
4
|
<% material = Material::Base.for(record) %>
|
5
5
|
<% end %>
|
6
6
|
|
@@ -3,11 +3,11 @@
|
|
3
3
|
|
4
4
|
<% facet_source = local_assigns[:facet_source] || record_from_parent_route %>
|
5
5
|
<% if is_nested && facet_source.nil? %>
|
6
|
-
<% facet_source =
|
6
|
+
<% facet_source = controller_path.singularize.camelize.constantize.find(params[:id]) %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% if local_assigns[:facet].nil? %>
|
10
|
-
<% facet_name = is_nested ? action_name :
|
10
|
+
<% facet_name = is_nested ? action_name : controller_path %>
|
11
11
|
<% facet_class = local_assigns[:facet_class].presence || "#{facet_name.singularize.camelize}Facet".constantize %>
|
12
12
|
<% filter_arguments = { filter_by: params[:filter], all: params[:all].present? } %>
|
13
13
|
<% facet = facet_class.new(current_page: current_page, source: facet_source, **filter_arguments) %>
|
@@ -27,9 +27,9 @@
|
|
27
27
|
<% list_law = law(list.item_class) %>
|
28
28
|
|
29
29
|
<% if list.parent? %>
|
30
|
-
<% if lookup_context.template_exists?("navigation_tabs",
|
30
|
+
<% if lookup_context.template_exists?("navigation_tabs", controller_path, true) %>
|
31
31
|
<% content_for(:navigation_tabs) { render "navigation_tabs", material: list.parent } %>
|
32
|
-
<% elsif lookup_context.template_exists?("navigation_aside",
|
32
|
+
<% elsif lookup_context.template_exists?("navigation_aside", controller_path, true) %>
|
33
33
|
<% content_for(:navigation_aside) { render "navigation_aside", material: list.parent } %>
|
34
34
|
<% end %>
|
35
35
|
<% end %>
|
@@ -5,11 +5,11 @@
|
|
5
5
|
<h4 class="mb-0"><%= t(".#{actionable_name}.title", title: material.title) %></h4>
|
6
6
|
</div>
|
7
7
|
<div class="card-body">
|
8
|
-
<% if lookup_context.template_exists?("form_fields",
|
8
|
+
<% if lookup_context.template_exists?("form_fields", controller_path, true) %>
|
9
9
|
<%= render "form_fields", form: form %>
|
10
10
|
<% end %>
|
11
11
|
|
12
|
-
<% if lookup_context.template_exists?("#{actionable_name}_form_fields",
|
12
|
+
<% if lookup_context.template_exists?("#{actionable_name}_form_fields", controller_path, true) %>
|
13
13
|
<%= render "#{actionable_name}_form_fields", form: form %>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% if record_from_parent_route.present? && record_from_parent_route.respond_to?(controller_name) %>
|
5
5
|
<% collection = record_from_parent_route.public_send(controller_name) %>
|
6
6
|
<% end %>
|
7
|
-
<% record = collection.try(:build) || "#{
|
7
|
+
<% record = collection.try(:build) || "#{controller_path.singularize.camelize}".constantize.new %>
|
8
8
|
<% end %>
|
9
9
|
<% material = Material::Base.for(record) %>
|
10
10
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%# For the good-spirited and impossibly lazy developer, we attempt to jump-start with no code, assuming conventions. %>
|
2
2
|
<% if local_assigns[:material].nil? %>
|
3
|
-
<% record = "#{
|
3
|
+
<% record = "#{controller_path.singularize.camelize}".constantize.find(params[:id]) if local_assigns[:record].nil? %>
|
4
4
|
<% material = Material::Base.for(record) %>
|
5
5
|
<% end %>
|
6
6
|
|
@@ -8,9 +8,9 @@
|
|
8
8
|
<% content_for(:title) { material.title } %>
|
9
9
|
|
10
10
|
<% cache material do %>
|
11
|
-
<% if lookup_context.template_exists?("navigation_tabs",
|
11
|
+
<% if lookup_context.template_exists?("navigation_tabs", controller_path, true) %>
|
12
12
|
<% content_for(:navigation_tabs) { render "navigation_tabs", material: material } %>
|
13
|
-
<% elsif lookup_context.template_exists?("navigation_aside",
|
13
|
+
<% elsif lookup_context.template_exists?("navigation_aside", controller_path, true) %>
|
14
14
|
<% content_for(:navigation_aside) { render "navigation_aside", material: material } %>
|
15
15
|
<% end %>
|
16
16
|
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<% unless content_for?(:page_content) %>
|
34
34
|
<% content_for(:page_content) do %>
|
35
35
|
<div class="row">
|
36
|
-
<% if lookup_context.template_exists?("content",
|
36
|
+
<% if lookup_context.template_exists?("content", controller_path, true) %>
|
37
37
|
<div class="col-xl-7 mb-3"><%= render "content", material: material %></div>
|
38
38
|
<div class="col-xl-5"><%= render "attributes_card", material: material %></div>
|
39
39
|
<% else %>
|
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.
|
4
|
+
version: 0.1.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Garside
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|