recourse 4.4.0 → 4.4.2
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 +15 -0
- data/app/views/layouts/recourses.html.erb +5 -3
- data/app/views/recourses/_footer.html.erb +2 -1
- data/config/locales/recourse.en.yml +1 -1
- data/lib/recourse/helpers/searches.rb +12 -1
- 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: 7d570569a36978559c75cf6147d7710059afd75c8ebbf2a965b7203a79c775f0
|
|
4
|
+
data.tar.gz: 16a263584162133ddbeba095692d9458ef3783b9733dbf7185ae34255b7754dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa42372f139c3d9dcd06d0498f46c6f2134463e0b99e34f9167ac6a78a37cae2a1410725d3277498982934ed68fd6aa253a1d1cfefc82327c3ba3432f2793db3
|
|
7
|
+
data.tar.gz: 4569f7a376da167bc00dca4fe6354281c700c3bd71d032c96da6df882a9a9032a1d15ded7f36bc982237d0d6d91b1e7e5c39c3328f9341ad1cf2b426e6416b2d
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
For more information about changelogs, check [Keep a Changelog](http://keepachangelog.com) and
|
|
6
6
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
|
7
7
|
|
|
8
|
+
## 4.4.2 - 2026-09-08
|
|
9
|
+
|
|
10
|
+
* [Fix] `search_highlight` marks the label of a record the search reached through a key
|
|
11
|
+
|
|
12
|
+
A row drawn out of the provider a sector points at marks `provider.name` with
|
|
13
|
+
`search_highlight provider.name, :name`; the helper checked `name` against the
|
|
14
|
+
sector, which has none, and marked nothing.
|
|
15
|
+
|
|
16
|
+
* [Fix] On a phone the pages under a table are centered on their own row
|
|
17
|
+
* [Fix] A filter's menu drops over the sidebar's row of links on a phone, not under it
|
|
18
|
+
|
|
19
|
+
## 4.4.1 - 2026-09-08
|
|
20
|
+
|
|
21
|
+
* [Fix] The footer reads `Displaying items 1-20 of 101`, without `in total`
|
|
22
|
+
|
|
8
23
|
## 4.4.0 - 2026-09-08
|
|
9
24
|
|
|
10
25
|
* [Fix] Tapping the light/dark toggle or the log out on a phone leaves no tint behind
|
|
@@ -118,9 +118,11 @@
|
|
|
118
118
|
.nav-link:hover:not(.active) { background-color: transparent; }
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
/* The navbar
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
/* The navbar stacks over the sidebar, and both over the main column: a menu
|
|
122
|
+
opened from a filter drops over the sidebar's row of links on a phone and over
|
|
123
|
+
the first rows of the table anywhere, rather than under either. */
|
|
124
|
+
.recourse-sidebar { position: relative; z-index: 2; }
|
|
125
|
+
.recourse-shell > nav { position: relative; z-index: 3; }
|
|
124
126
|
|
|
125
127
|
/* An action column is as wide as a row is tall — an icon in a square — and a
|
|
126
128
|
counter column starts at the same square, widening only when a figure like
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<%= t 'recourse.displaying', count: pagy.count %>
|
|
19
19
|
<% end %>
|
|
20
20
|
</div>
|
|
21
|
-
|
|
21
|
+
<%# Centered on the row of their own a phone gives them, and at the end of the shared row from `sm` up. -%>
|
|
22
|
+
<div class='px-2 mt-2 sm:mt-0 d-flex justify-content-center sm:justify-content-end'><%== pagy.series_nav(:bootstrap, classes: 'pagination mb-0') if pagy.last > 1 %></div>
|
|
22
23
|
</div>
|
|
23
24
|
<% end %>
|
|
@@ -28,7 +28,7 @@ en:
|
|
|
28
28
|
displaying:
|
|
29
29
|
one: Displaying 1 item
|
|
30
30
|
other: Displaying %{count} items
|
|
31
|
-
displaying_slice: Displaying items %{from}-%{to} of %{total}
|
|
31
|
+
displaying_slice: Displaying items %{from}-%{to} of %{total}
|
|
32
32
|
edit: Edit
|
|
33
33
|
format: Please match the format %{example}
|
|
34
34
|
from_now: "in %{distance}"
|
|
@@ -41,13 +41,24 @@ module Recourse
|
|
|
41
41
|
|
|
42
42
|
# A foreign key's cell shows a label from the other table, so what decides is
|
|
43
43
|
# whether the search reaches through that association rather than reads a column.
|
|
44
|
+
# And a row drawn out of the record a key points at marks that record's label with
|
|
45
|
+
# the same helper — `name` on a page of sectors is the provider's — so a column this
|
|
46
|
+
# model has none of is looked for among the labels the search reached through.
|
|
44
47
|
def searched_column?(column)
|
|
45
|
-
association = belongs_to_association column.to_s
|
|
48
|
+
association = belongs_to_association(column.to_s) || labelled_association(column.to_s)
|
|
46
49
|
return resource_model.recourse_searchable_associations.include? association if association
|
|
47
50
|
|
|
48
51
|
resource_model.recourse_searchable_columns.include? column.to_s
|
|
49
52
|
end
|
|
50
53
|
|
|
54
|
+
def labelled_association(column)
|
|
55
|
+
return if resource_model.column_names.include? column
|
|
56
|
+
|
|
57
|
+
resource_model.recourse_searchable_associations.find do |one|
|
|
58
|
+
one.klass.recourse_label.to_s == column
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
51
62
|
# The search the action built, under Ransack's own name for one.
|
|
52
63
|
def resource_search
|
|
53
64
|
controller_assign 'q'
|
data/lib/recourse/version.rb
CHANGED