iron-cms 0.4.4 → 0.4.5
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/README.md +21 -0
- data/app/helpers/iron/form_builder.rb +4 -4
- data/app/views/iron/shared/_select.html.erb +9 -1
- data/lib/iron/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: b0cc569e38bcf2fb02b83c0a9eeb8736c763079dd5b7d1a79643e20134819adc
|
|
4
|
+
data.tar.gz: cda82125c9654678d33c3c61669245b443c5a573e4b9a964e2e867bba0716a5e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5bd5cb6d56f369b14f67a9326c0d1e47580f87922dbfba4e5698440fe72de94a5c03102fb25d4740c83799ee030da04701fc22ce954cab1659ce1b850a3eb619
|
|
7
|
+
data.tar.gz: 32db23fdff955627f1495d8554f0da51765ad6175555c44b31fb5b02465a5281fe5d8189bcfd098c3b1851e361cb7e1cdb950257905d175a4d8536ffd28215db
|
data/README.md
CHANGED
|
@@ -128,6 +128,27 @@ end
|
|
|
128
128
|
|
|
129
129
|
The fixtures are loaded once at the start of your test suite. Rails' transactional tests provide test isolation by rolling back changes after each test.
|
|
130
130
|
|
|
131
|
+
## System Requirements
|
|
132
|
+
|
|
133
|
+
Iron requires `libvips` to be installed on your system for image processing and responsive image generation.
|
|
134
|
+
|
|
135
|
+
**macOS:**
|
|
136
|
+
```bash
|
|
137
|
+
brew install vips
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Ubuntu/Debian:**
|
|
141
|
+
```bash
|
|
142
|
+
sudo apt-get install libvips
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Arch Linux:**
|
|
146
|
+
```bash
|
|
147
|
+
sudo pacman -S libvips
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Note:** Rails-generated production Dockerfiles typically include libvips by default, so no additional Docker configuration is needed.
|
|
151
|
+
|
|
131
152
|
## Installation
|
|
132
153
|
|
|
133
154
|
Add this line to your application's Gemfile:
|
|
@@ -44,14 +44,14 @@ module Iron
|
|
|
44
44
|
selected_value = object.send(method) rescue nil
|
|
45
45
|
|
|
46
46
|
@template.render partial: "iron/shared/select", locals: {
|
|
47
|
-
field_name: field_name(method),
|
|
47
|
+
field_name: html_options[:name] || field_name(method),
|
|
48
48
|
select_id: html_options[:id] || field_id(method),
|
|
49
49
|
selected_value: selected_value,
|
|
50
50
|
collection: collection,
|
|
51
51
|
value_method: value_method,
|
|
52
52
|
text_method: text_method,
|
|
53
53
|
options: options,
|
|
54
|
-
html_options: html_options
|
|
54
|
+
html_options: html_options.except(:name)
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -75,14 +75,14 @@ module Iron
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
@template.render partial: "iron/shared/select", locals: {
|
|
78
|
-
field_name: field_name(method),
|
|
78
|
+
field_name: html_options[:name] || field_name(method),
|
|
79
79
|
select_id: html_options[:id] || field_id(method),
|
|
80
80
|
selected_value: selected_value,
|
|
81
81
|
collection: collection,
|
|
82
82
|
value_method: :value,
|
|
83
83
|
text_method: :text,
|
|
84
84
|
options: options,
|
|
85
|
-
html_options: html_options
|
|
85
|
+
html_options: html_options.except(:name)
|
|
86
86
|
}
|
|
87
87
|
end
|
|
88
88
|
end
|
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
</button>
|
|
9
9
|
|
|
10
10
|
<el-options anchor="bottom start" popover class="max-h-60 w-(--button-width) overflow-auto rounded-md bg-white py-1 text-base shadow-lg outline-1 outline-black/5 [--anchor-gap:--spacing(1)] data-leave:transition data-leave:transition-discrete data-leave:duration-100 data-leave:ease-in data-closed:data-leave:opacity-0 sm:text-sm dark:bg-stone-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10">
|
|
11
|
-
<% if options[:
|
|
11
|
+
<% if options[:prompt] && selected_value.blank? %>
|
|
12
|
+
<% prompt_text = options[:prompt].is_a?(String) ? options[:prompt] : "Please select" %>
|
|
13
|
+
<el-option value="" class="group/option relative block cursor-default py-2 pr-9 pl-3 text-stone-900 select-none focus:bg-sky-600 focus:text-white focus:outline-hidden dark:text-white dark:focus:bg-sky-500">
|
|
14
|
+
<span class="block truncate font-normal group-aria-selected/option:font-semibold"><%= prompt_text %></span>
|
|
15
|
+
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-sky-600 group-not-aria-selected/option:hidden group-focus/option:text-white in-[el-selectedcontent]:hidden dark:text-sky-400">
|
|
16
|
+
<%= icon "check", class: "size-5" %>
|
|
17
|
+
</span>
|
|
18
|
+
</el-option>
|
|
19
|
+
<% elsif options[:include_blank] %>
|
|
12
20
|
<% blank_text = options[:include_blank].is_a?(String) ? options[:include_blank] : "" %>
|
|
13
21
|
<el-option value="" class="group/option relative block cursor-default py-2 pr-9 pl-3 text-stone-900 select-none focus:bg-sky-600 focus:text-white focus:outline-hidden dark:text-white dark:focus:bg-sky-500">
|
|
14
22
|
<span class="block truncate font-normal group-aria-selected/option:font-semibold"><%= blank_text %></span>
|
data/lib/iron/version.rb
CHANGED