recourse 7.5.0 → 7.6.0
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/CHANGELOG.md +11 -0
- data/app/views/layouts/recourses.html.erb +1 -1
- data/app/views/recourses/edit.html.erb +0 -2
- data/app/views/recourses/index.html.erb +0 -2
- data/app/views/recourses/new.html.erb +0 -2
- data/app/views/recourses/show.html.erb +0 -2
- data/lib/recourse/helpers/breadcrumbs.rb +8 -0
- data/lib/recourse/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: a2a20bbc5915a1d57b72fb203edfdd05c1bd5f994c428b0520f2ef9af73ec3f0
|
|
4
|
+
data.tar.gz: a6ba069086c36351dd7072d09a2909f64bd17a84346d8ef31921fd953592a61d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c98284ac83b4a7b5419f747e69028dff262aa5281745c61bc8fbd01d7dd0eeb07dc4706ffbbb531133c8c8bc1b2478e75b55a12484cb39a6ca2b539df2821ea5
|
|
7
|
+
data.tar.gz: cdede705768f5b68438efd3d1e80f1120827614a16d8bf11b9556aad5107184f4691d18e893a3d2ee8e1223a1ceef92f74c9026c60d278c6e3d904aa332edae9
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## 7.6.0 - 2026-09-20
|
|
11
|
+
|
|
12
|
+
* [CHANGE] The layout titles the page, so a host template cannot lose it
|
|
13
|
+
|
|
14
|
+
The four templates each set `content_for :title`, so a host writing one of its own —
|
|
15
|
+
which is the whole point of the gem drawing the rest — left the tab reading `Recourse`.
|
|
16
|
+
The title is chrome like the trail beside it, and the layout works it out from the same
|
|
17
|
+
place: what the trail ends with, the resource it is of where the record names nothing,
|
|
18
|
+
and the app's own name where neither answers. `content_for :title` still wins where a
|
|
19
|
+
host sets one.
|
|
20
|
+
|
|
10
21
|
## 7.5.0 - 2026-09-20
|
|
11
22
|
|
|
12
23
|
* [FEATURE] A model may word its own deletion
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang='en'>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset='utf-8'>
|
|
5
|
-
<title><%= content_for(:title) ||
|
|
5
|
+
<title><%= content_for(:title) || page_title %></title>
|
|
6
6
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
|
7
7
|
<meta name='color-scheme' content='light dark'>
|
|
8
8
|
<%# A refresh Turbo is sent morphs the page in place and keeps the scroll; without these it
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<% content_for :title, resource_record_label %>
|
|
2
|
-
|
|
3
1
|
<%# Nothing to read out where the host found no record: a singular resource is reached
|
|
4
2
|
with no id, so the one it stands for is one it may not have yet, and the page says so
|
|
5
3
|
rather than reading attributes off nothing. -%>
|
|
@@ -46,6 +46,14 @@ module Recourse
|
|
|
46
46
|
safe_join [tag.i(class: "bi bi-#{icon}"), word], ' '
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
# What the tab calls this page: what the trail ends with, the resource it is of
|
|
50
|
+
# where the record names nothing, and the app's own name where neither answers.
|
|
51
|
+
def page_title
|
|
52
|
+
breadcrumb_leaf.presence || breadcrumb_name.presence || app_name
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def app_name = Rails.application.class.module_parent_name
|
|
56
|
+
|
|
49
57
|
# Only a page beneath the index names itself, and names what it is showing.
|
|
50
58
|
def breadcrumb_leaf
|
|
51
59
|
case controller.action_name
|
data/lib/recourse/version.rb
CHANGED