inline_forms 8.1.61 → 8.1.64
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 +42 -0
- data/lib/inline_forms/form_elements/pdf_link_helper.rb +1 -1
- data/lib/inline_forms/version.rb +1 -1
- data/lib/locales/inline_forms.en.yml +2 -0
- data/lib/locales/inline_forms.nl.yml +2 -0
- data/test/integration/legacy_elements_test.rb +10 -0
- data/test/integration/locale_test.rb +18 -0
- 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: d65f5d0ad495091211688c0db04b4466e240ea578b1349523e97a1ce66d3cd00
|
|
4
|
+
data.tar.gz: 9aca4b16c7481547715c240283ff8bac4de6d1d19caa57e3bc239aa51ed2899c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05afb1bc303bfdda7506735a166f1f69f0ee5f8a79efa2279a4d928e308c69047037bfd00383a260a3e547f5540bdd7f36d8aff476da0c54c9c7b92df21a39b2
|
|
7
|
+
data.tar.gz: c059604b46b459595cc34fb574704a1e0203aab6eb40083825df0763c0e9ae48489765515529efa30561f0b2bed44ec39944566750b7e6fc14b7da2c4d209033
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,48 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [8.1.64] - 2026-10-31
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **`pdf_link`'s labels are translated.** `inline_forms.files.preview` and `inline_forms.files.download_pdf`, in English ("preview | download pdf") and Dutch ("voorbeeld | pdf downloaden"), with the English texts as defaults for other locales. An app in Dutch now shows the Dutch labels: a test that finds the link by its text needs the new text.
|
|
12
|
+
|
|
13
|
+
### Tests
|
|
14
|
+
|
|
15
|
+
- `locale_test`: `pdf_link` in Dutch.
|
|
16
|
+
|
|
17
|
+
### Lockstep
|
|
18
|
+
|
|
19
|
+
- validation_hints 8.1.64, inline_forms_installer 8.1.64, inline_forms_schema_edit 8.1.64.
|
|
20
|
+
|
|
21
|
+
## [8.1.63] - 2026-10-31
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **`pdf_link` reads "preview | download pdf".** "preview pdf" read as one label. The second link's text is now `download pdf` and a ` | ` separates the links; hrefs, classes, `data-turbo` and `target` are unchanged.
|
|
26
|
+
|
|
27
|
+
### Tests
|
|
28
|
+
|
|
29
|
+
- `legacy_elements_test` and `example_app_showcase_pdf_link_test`: the link texts and the separator.
|
|
30
|
+
|
|
31
|
+
### Lockstep
|
|
32
|
+
|
|
33
|
+
- validation_hints 8.1.63, inline_forms_installer 8.1.63, inline_forms_schema_edit 8.1.63.
|
|
34
|
+
|
|
35
|
+
## [8.1.62] - 2026-10-30
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **The example app has a `pdf_link`.** `FormElementShowcase` gets a `report` row, with `ShowcaseReportsController` behind `/report/:id` (preview) and `/report/:id.pdf` (a sample PDF, as a download).
|
|
40
|
+
|
|
41
|
+
### Tests
|
|
42
|
+
|
|
43
|
+
- `example_app_showcase_pdf_link_test`: the links, the new form, the preview, the download and guests.
|
|
44
|
+
|
|
45
|
+
### Lockstep
|
|
46
|
+
|
|
47
|
+
- validation_hints 8.1.62, inline_forms_installer 8.1.62, inline_forms_schema_edit 8.1.62.
|
|
48
|
+
|
|
7
49
|
## [8.1.61] - 2026-10-30
|
|
8
50
|
|
|
9
51
|
### Fixed
|
|
@@ -8,7 +8,7 @@ module InlineForms
|
|
|
8
8
|
def pdf_link_show(object, attribute)
|
|
9
9
|
# the attribute is the action
|
|
10
10
|
# turbo:false so the links leave the field's turbo-frame: the preview has no matching frame ("Content missing") and the PDF is not HTML; the preview gets its own tab so the record stays open
|
|
11
|
-
"#{link_to
|
|
11
|
+
"#{link_to t("inline_forms.files.preview", :default => "preview"), "/#{attribute}/#{object.id}", :class => "pdf_preview", :target => "_blank", :data => { :turbo => false }} | #{link_to t("inline_forms.files.download_pdf", :default => "download pdf"), "/#{attribute}/#{object.id}.pdf", :class => "pdf_open", :data => { :turbo => false }}".html_safe
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def pdf_link_edit(object, attribute)
|
data/lib/inline_forms/version.rb
CHANGED
|
@@ -52,6 +52,16 @@ class LegacyElementsTest < InlineFormsIntegrationTestCase
|
|
|
52
52
|
assert_includes response.body, %(href="/report/#{@widget.id}.pdf")
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
test "pdf_link reads preview | download pdf" do
|
|
56
|
+
frame = "widget_#{@widget.id}"
|
|
57
|
+
get widget_path(@widget, update: frame), headers: frame_headers(frame)
|
|
58
|
+
|
|
59
|
+
assert_response :success
|
|
60
|
+
assert_select %(a[href="/report/#{@widget.id}"]), text: "preview"
|
|
61
|
+
assert_select %(a[href="/report/#{@widget.id}.pdf"]), text: "download pdf"
|
|
62
|
+
assert_match %r{>preview</a> \| <a[^>]*>download pdf</a>}, response.body
|
|
63
|
+
end
|
|
64
|
+
|
|
55
65
|
test "pdf_link links leave the field's turbo frame" do
|
|
56
66
|
frame = "widget_#{@widget.id}"
|
|
57
67
|
get widget_path(@widget, update: frame), headers: frame_headers(frame)
|
|
@@ -18,6 +18,7 @@ class LocaleTest < InlineFormsIntegrationTestCase
|
|
|
18
18
|
inline_forms.view.versions_rich_text inline_forms.view.version_events.create
|
|
19
19
|
inline_forms.view.version_events.update inline_forms.view.version_events.destroy
|
|
20
20
|
inline_forms.devise.login common.more common.logout inline_forms.view.create_failed
|
|
21
|
+
inline_forms.files.preview inline_forms.files.download_pdf
|
|
21
22
|
].freeze
|
|
22
23
|
|
|
23
24
|
setup do
|
|
@@ -121,6 +122,23 @@ class LocaleTest < InlineFormsIntegrationTestCase
|
|
|
121
122
|
assert_includes response.body, "old value"
|
|
122
123
|
end
|
|
123
124
|
|
|
125
|
+
test "pdf_link reads Dutch" do
|
|
126
|
+
widget = Widget.create!(name: "Rapport")
|
|
127
|
+
frame = "widget_#{widget.id}"
|
|
128
|
+
|
|
129
|
+
# Not strictly: the dummy's dropdown values have no nl texts.
|
|
130
|
+
original_default = I18n.default_locale
|
|
131
|
+
I18n.with_locale(:nl) do
|
|
132
|
+
I18n.default_locale = :nl
|
|
133
|
+
get widget_path(widget, update: frame), headers: frame_headers(frame)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
assert_response :success
|
|
137
|
+
assert_match %r{>voorbeeld</a> \| <a[^>]*>pdf downloaden</a>}, response.body
|
|
138
|
+
ensure
|
|
139
|
+
I18n.default_locale = original_default
|
|
140
|
+
end
|
|
141
|
+
|
|
124
142
|
test "the devise and application layouts declare the page language" do
|
|
125
143
|
get widgets_path
|
|
126
144
|
I18n.with_locale(:nl) do
|