iron-cms 0.11.0 → 0.12.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/README.md +2 -2
- data/app/controllers/concerns/iron/admin_locale.rb +16 -1
- data/app/controllers/iron/users_controller.rb +1 -1
- data/app/mailers/iron/application_mailer.rb +0 -1
- data/app/views/iron/block_definitions/_empty_state.html.erb +3 -3
- data/app/views/iron/block_definitions/edit.html.erb +5 -5
- data/app/views/iron/block_definitions/index.html.erb +4 -4
- data/app/views/iron/block_definitions/new.html.erb +3 -3
- data/app/views/iron/block_definitions/show.html.erb +8 -8
- data/app/views/iron/entries/fields/_block.html.erb +3 -3
- data/app/views/iron/entries/fields/_file.html.erb +3 -3
- data/app/views/iron/field_definitions/block/_form.html.erb +2 -2
- data/app/views/iron/field_definitions/block_list/_form.html.erb +1 -1
- data/app/views/iron/field_definitions/edit.html.erb +3 -3
- data/app/views/iron/field_definitions/file/_form.html.erb +4 -4
- data/app/views/iron/field_definitions/layouts/_form.html.erb +1 -1
- data/app/views/iron/field_definitions/new.html.erb +3 -3
- data/app/views/iron/field_definitions/reference/_form.html.erb +1 -1
- data/app/views/iron/field_definitions/reference_list/_form.html.erb +1 -1
- data/app/views/iron/field_definitions/text_field/_form.html.erb +3 -3
- data/app/views/iron/first_runs/show.html.erb +4 -4
- data/app/views/iron/locales/_form.html.erb +1 -1
- data/app/views/iron/published_pages/show.html.erb +2 -2
- data/config/locales/en.yml +97 -0
- data/config/locales/it.yml +97 -0
- data/lib/iron/version.rb +1 -1
- data/lib/iron.rb +0 -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: d060f858dd0cc96cf89c5c0195a6073813325c20f324d80d164ee11f4d299b15
|
|
4
|
+
data.tar.gz: 6856bd27d67600a115fa00926e4be52bc94357fd61eef6cda694b0074f545c68
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3aa25a33717ca01a28a7f286beefc4fd2dc2486621533922afe660ccb2dd141dfe2dd2316735747896c3f5ae2bb322a3e91f82b06cae01e1da7b9e0e7e8930ad
|
|
7
|
+
data.tar.gz: 4d33417da4ec5a717ad5c1e3430662117e42408917a7d0587861db28e6a7d15f0618ac3fb321442de942b92bff5532bf6ae4dfb9d60ba9edd7806213cfaf038a
|
data/README.md
CHANGED
|
@@ -178,8 +178,8 @@ bin/rails iron:install:migrations
|
|
|
178
178
|
Configure the mailer sender address used for system emails (e.g. password resets):
|
|
179
179
|
|
|
180
180
|
```ruby
|
|
181
|
-
# config/
|
|
182
|
-
|
|
181
|
+
# config/environments/production.rb
|
|
182
|
+
config.action_mailer.default_options = { from: "hello@mysite.com" }
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
## Architecture
|
|
@@ -8,7 +8,22 @@ module Iron
|
|
|
8
8
|
|
|
9
9
|
private
|
|
10
10
|
def set_admin_locale(&action)
|
|
11
|
-
I18n.with_locale(
|
|
11
|
+
I18n.with_locale(preferred_admin_language, &action)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def preferred_admin_language
|
|
15
|
+
Current.user&.language || browser_admin_language || "en"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def browser_admin_language
|
|
19
|
+
browser_language_tags.find { |tag| User::ADMIN_LANGUAGES.include?(tag) }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def browser_language_tags
|
|
23
|
+
request.accept_language.to_s.split(",").flat_map { |entry|
|
|
24
|
+
tag = entry.split(";").first.strip.downcase
|
|
25
|
+
[ tag, tag.split("-").first ]
|
|
26
|
+
}.reject(&:blank?).uniq
|
|
12
27
|
end
|
|
13
28
|
end
|
|
14
29
|
end
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<h3 class="text-lg font-semibold text-stone-900 dark:text-white mb-2">
|
|
7
|
-
|
|
7
|
+
<%= t(".title") %>
|
|
8
8
|
</h3>
|
|
9
9
|
|
|
10
10
|
<p class="text-sm text-stone-500 dark:text-stone-400 max-w-sm mb-6">
|
|
11
|
-
|
|
11
|
+
<%= t(".description") %>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<%= link_to new_block_definition_path, class: "button-primary" do %>
|
|
15
15
|
<%= icon "plus", class: "size-4" %>
|
|
16
|
-
|
|
16
|
+
<%= t(".new_block_definition") %>
|
|
17
17
|
<% end %>
|
|
18
18
|
</div>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<% content_for :title, "
|
|
1
|
+
<% content_for :title, t(".title", name: @block_definition.name) %>
|
|
2
2
|
|
|
3
3
|
<div class="page-content space-y-8">
|
|
4
4
|
<header class="relative pb-8">
|
|
5
5
|
<div class="flex items-center justify-between mb-6">
|
|
6
|
-
<%= link_to "
|
|
6
|
+
<%= link_to t(".breadcrumb"), block_definitions_path, class: "breadcrumb" %>
|
|
7
7
|
|
|
8
8
|
<el-dropdown class="inline-block">
|
|
9
9
|
<button type="button" class="button-ghost button-sm p-2">
|
|
10
10
|
<%= icon "ellipsis", class: "size-5" %>
|
|
11
|
-
<span class="sr-only"
|
|
11
|
+
<span class="sr-only"><%= t(".more_actions") %></span>
|
|
12
12
|
</button>
|
|
13
13
|
|
|
14
14
|
<el-menu anchor="bottom end" popover class="w-48 origin-top-right rounded-md bg-white shadow-lg outline-1 outline-black/5 transition transition-discrete [--anchor-gap:--spacing(2)] data-closed:scale-95 data-closed:transform data-closed:opacity-0 data-enter:duration-100 data-enter:ease-out data-leave:duration-75 data-leave:ease-in dark:bg-stone-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10">
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
<%= button_to block_definition_path(@block_definition),
|
|
17
17
|
method: :delete,
|
|
18
18
|
class: "w-full flex items-center gap-2 px-4 py-2 text-sm text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-500/10",
|
|
19
|
-
data: { turbo_confirm: "
|
|
19
|
+
data: { turbo_confirm: t(".delete_confirm") } do %>
|
|
20
20
|
<%= icon "trash", class: "size-4" %>
|
|
21
|
-
|
|
21
|
+
<%= t(".delete_action") %>
|
|
22
22
|
<% end %>
|
|
23
23
|
</div>
|
|
24
24
|
</el-menu>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<% content_for :title, "
|
|
1
|
+
<% content_for :title, t(".title") %>
|
|
2
2
|
|
|
3
3
|
<div class="page-content space-y-8">
|
|
4
4
|
<header class="relative pb-8">
|
|
5
5
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between mb-6">
|
|
6
6
|
<div>
|
|
7
|
-
<h1 class="page-title-lg"
|
|
7
|
+
<h1 class="page-title-lg"><%= t(".heading") %></h1>
|
|
8
8
|
<p class="mt-1 text-sm text-stone-500 dark:text-stone-400">
|
|
9
|
-
<%=
|
|
9
|
+
<%= t(".count", count: @block_definitions.count) %>
|
|
10
10
|
</p>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
<%= link_to new_block_definition_path, class: "button-primary self-start" do %>
|
|
14
14
|
<%= icon "plus", class: "size-4" %>
|
|
15
|
-
|
|
15
|
+
<%= t(".new_block_definition") %>
|
|
16
16
|
<% end %>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<% content_for :title, "
|
|
1
|
+
<% content_for :title, t(".title") %>
|
|
2
2
|
|
|
3
3
|
<div class="page-content space-y-8">
|
|
4
4
|
<header class="relative pb-8">
|
|
5
|
-
<%= link_to "
|
|
5
|
+
<%= link_to t(".breadcrumb"), block_definitions_path, class: "breadcrumb mb-6 block" %>
|
|
6
6
|
|
|
7
|
-
<h1 class="page-title-lg"
|
|
7
|
+
<h1 class="page-title-lg"><%= t(".heading") %></h1>
|
|
8
8
|
|
|
9
9
|
<div class="absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-stone-200 to-transparent dark:via-stone-700"></div>
|
|
10
10
|
</header>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
<% content_for :title, "
|
|
1
|
+
<% content_for :title, t(".title", name: @block_definition.name) %>
|
|
2
2
|
|
|
3
3
|
<div id="<%= dom_id @block_definition %>" class="page-content space-y-8">
|
|
4
4
|
<header class="relative pb-8">
|
|
5
5
|
<div class="flex items-center justify-between mb-6">
|
|
6
|
-
<%= link_to "
|
|
6
|
+
<%= link_to t(".breadcrumb"), block_definitions_path, class: "breadcrumb" %>
|
|
7
7
|
|
|
8
8
|
<%= link_to edit_block_definition_path(@block_definition), class: "button-secondary" do %>
|
|
9
9
|
<%= icon "pencil", class: "size-4" %>
|
|
10
|
-
|
|
10
|
+
<%= t("iron.actions.edit") %>
|
|
11
11
|
<% end %>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<h1 class="page-title-lg"><%= @block_definition.name %></h1>
|
|
15
15
|
<p class="mt-1 text-sm text-stone-500 dark:text-stone-400">
|
|
16
|
-
<%= @block_definition.description.presence || "
|
|
16
|
+
<%= @block_definition.description.presence || t(".no_description") %>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<div class="absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-stone-200 to-transparent dark:via-stone-700"></div>
|
|
20
20
|
</header>
|
|
21
21
|
|
|
22
22
|
<section>
|
|
23
|
-
<h2 class="text-sm font-medium text-stone-500 dark:text-stone-400 mb-3"
|
|
23
|
+
<h2 class="text-sm font-medium text-stone-500 dark:text-stone-400 mb-3"><%= t(".fields") %></h2>
|
|
24
24
|
|
|
25
25
|
<% if @block_definition.field_definitions.any? %>
|
|
26
26
|
<ul id="fields" class="card card-list" data-controller="sortable-list">
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
<div class="flex items-center justify-center size-12 rounded-xl bg-stone-100 dark:bg-stone-800 mb-4">
|
|
35
35
|
<%= icon "layers", class: "size-6 text-stone-400 dark:text-stone-500" %>
|
|
36
36
|
</div>
|
|
37
|
-
<h3 class="text-sm font-medium text-stone-900 dark:text-white mb-1"
|
|
38
|
-
<p class="text-sm text-stone-500 dark:text-stone-400 mb-4"
|
|
37
|
+
<h3 class="text-sm font-medium text-stone-900 dark:text-white mb-1"><%= t(".empty_fields_title") %></h3>
|
|
38
|
+
<p class="text-sm text-stone-500 dark:text-stone-400 mb-4"><%= t(".empty_fields_description") %></p>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
41
|
<% end %>
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
class: "button-primary",
|
|
46
46
|
data: { turbo_frame: :drawer } do %>
|
|
47
47
|
<%= icon "plus", class: "size-4" %>
|
|
48
|
-
|
|
48
|
+
<%= t(".add_field") %>
|
|
49
49
|
<% end %>
|
|
50
50
|
</div>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<% end %>
|
|
34
34
|
|
|
35
35
|
<span class="block-title">
|
|
36
|
-
<%= block.title.presence || "
|
|
36
|
+
<%= block.title.presence || t("iron.entries.fields.block.untitled") %>
|
|
37
37
|
</span>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
</div>
|
|
95
95
|
<% else %>
|
|
96
96
|
<div class="flex gap-3 items-center">
|
|
97
|
-
<p class="text-red-400"
|
|
98
|
-
<%= link_to "
|
|
97
|
+
<p class="text-red-400"><%= t("iron.entries.fields.block.missing_definition") %></p>
|
|
98
|
+
<%= link_to t("iron.entries.fields.block.edit_field_definition"),
|
|
99
99
|
edit_field_definition_path(block.definition),
|
|
100
100
|
class: "button-primary" %>
|
|
101
101
|
</div>
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
<%= builder.label :file, class: "absolute inset-0 flex items-center justify-center bg-stone-900/60 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer" do %>
|
|
26
26
|
<span class="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-white text-sm font-medium text-stone-900">
|
|
27
27
|
<%= icon "upload", class: "size-4" %>
|
|
28
|
-
|
|
28
|
+
<%= t("iron.actions.change") %>
|
|
29
29
|
</span>
|
|
30
30
|
<% end %>
|
|
31
31
|
</div>
|
|
32
32
|
<% else %>
|
|
33
33
|
<%= builder.label :file, class: "flex flex-col items-center justify-center w-full max-w-lg aspect-video rounded-xl border-2 border-dashed border-stone-300 dark:border-stone-600 bg-stone-50 dark:bg-stone-800/50 hover:border-sky-400 dark:hover:border-sky-500 hover:bg-sky-50 dark:hover:bg-sky-500/5 cursor-pointer transition-colors", data: { file_upload_target: "placeholder" } do %>
|
|
34
34
|
<%= icon "photo", class: "size-10 text-stone-400 dark:text-stone-500" %>
|
|
35
|
-
<p class="mt-2 text-sm text-stone-600 dark:text-stone-400"
|
|
36
|
-
<p class="mt-1 text-xs text-stone-500 dark:text-stone-500"
|
|
35
|
+
<p class="mt-2 text-sm text-stone-600 dark:text-stone-400"><%= t("iron.entries.fields.file.upload_prompt") %></p>
|
|
36
|
+
<p class="mt-1 text-xs text-stone-500 dark:text-stone-500"><%= t("iron.entries.fields.file.upload_hint") %></p>
|
|
37
37
|
<% end %>
|
|
38
38
|
<img
|
|
39
39
|
aria-hidden="true"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<%= render layout: "iron/field_definitions/layouts/form", locals: { field_definition: field_definition } do |form| %>
|
|
2
2
|
<div class="field">
|
|
3
|
-
<%= form.label "supported_block_definition_id", "
|
|
3
|
+
<%= form.label "supported_block_definition_id", t("iron.field_definitions.block.block_definition") %>
|
|
4
4
|
<div class="max-w-2xs">
|
|
5
5
|
<%= form.collection_select :supported_block_definition_id,
|
|
6
6
|
Iron::BlockDefinition.all,
|
|
7
7
|
:id, :name,
|
|
8
|
-
{ prompt: "
|
|
8
|
+
{ prompt: t("iron.field_definitions.block.select_block_definition") },
|
|
9
9
|
{ name: "field_definition[supported_block_definition_ids][]" } %>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%= render layout: "iron/field_definitions/layouts/form", locals: { field_definition: field_definition } do |form| %>
|
|
2
2
|
<div class="field">
|
|
3
|
-
<%= form.label :supported_block_definition_ids, "
|
|
3
|
+
<%= form.label :supported_block_definition_ids, t("iron.field_definitions.block_list.supported_block_definitions") %>
|
|
4
4
|
<div class="selection-list">
|
|
5
5
|
<%= form.collection_check_boxes :supported_block_definition_ids, Iron::BlockDefinition.all, :id, :name do |b| %>
|
|
6
6
|
<label class="selection-list-item" data-selection-color="violet">
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div class="drawer-footer flex items-center gap-3">
|
|
22
|
-
<input type="submit" value="
|
|
23
|
-
<%= button_to "
|
|
22
|
+
<input type="submit" value="<%= t(".submit") %>" form="field-definition-form" class="button-primary flex-1">
|
|
23
|
+
<%= button_to t(".delete_action"), field_definition_path(@field_definition),
|
|
24
24
|
method: :delete,
|
|
25
25
|
class: "button-secondary justify-center w-full",
|
|
26
26
|
form_class: "flex-1",
|
|
27
|
-
data: { turbo_confirm: "
|
|
27
|
+
data: { turbo_confirm: t(".delete_confirm") } %>
|
|
28
28
|
</div>
|
|
29
29
|
<% end %>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<%= render layout: "iron/field_definitions/layouts/form", locals: { field_definition: field_definition } do |form| %>
|
|
2
2
|
<fieldset class="field">
|
|
3
3
|
<legend class="text-sm/6 font-medium text-stone-950 dark:text-white">
|
|
4
|
-
|
|
4
|
+
<%= t("iron.field_definitions.file.accepted_file_types") %>
|
|
5
5
|
</legend>
|
|
6
6
|
<div class="file-scope-picker mt-3">
|
|
7
7
|
<div class="file-scope-option">
|
|
8
8
|
<label class="file-scope-label peer/specific">
|
|
9
9
|
<%= form.radio_button :file_scope, "specific", class: "accent-sky-600" %>
|
|
10
|
-
<span
|
|
10
|
+
<span><%= t("iron.field_definitions.file.specific_file_types") %></span>
|
|
11
11
|
</label>
|
|
12
12
|
|
|
13
13
|
<div class="hidden peer-has-[:checked]/specific:block pb-3 px-3">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<%= icon preset_icons[preset_key], class: "size-4" %>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="flex-1 min-w-0">
|
|
28
|
-
<span class="selection-list-name"><%= preset_key.capitalize %></span>
|
|
28
|
+
<span class="selection-list-name"><%= t("iron.field_definitions.file.preset_labels.#{preset_key}", default: preset_key.capitalize) %></span>
|
|
29
29
|
<span class="block text-xs text-stone-400 dark:text-stone-500 mt-0.5">
|
|
30
30
|
<%= preset_config[:extensions].map { |e| ".#{e}" }.join(", ") %>
|
|
31
31
|
</span>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<div class="file-scope-option">
|
|
41
41
|
<label class="file-scope-label">
|
|
42
42
|
<%= form.radio_button :file_scope, "all", class: "accent-sky-600" %>
|
|
43
|
-
<span
|
|
43
|
+
<span><%= t("iron.field_definitions.file.all_file_types") %></span>
|
|
44
44
|
</label>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
handle_target: "destination",
|
|
33
33
|
action: "handle#edit",
|
|
34
34
|
} %>
|
|
35
|
-
<p class="text-xs text-stone-500 mt-1"
|
|
35
|
+
<p class="text-xs text-stone-500 mt-1"><%= t("iron.field_definitions.form.handle_help") %></p>
|
|
36
36
|
<%= form.error_for :handle %>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%= turbo_frame_tag :drawer do %>
|
|
2
2
|
<div class="drawer-header">
|
|
3
|
-
<h2 class="drawer-title"
|
|
3
|
+
<h2 class="drawer-title"><%= t(".title") %></h2>
|
|
4
4
|
<button type="button" data-action="drawer#close" class="button-ghost p-1.5 -mr-1.5">
|
|
5
5
|
<%= icon "x", class: "size-5" %>
|
|
6
6
|
</button>
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
<%= render "type_picker", schemable: @field_definition.schemable, selected_type: @field_definition.type_handle %>
|
|
11
11
|
|
|
12
12
|
<section>
|
|
13
|
-
<h3 class="text-sm font-semibold text-stone-500 dark:text-stone-400 uppercase tracking-wider mb-3"
|
|
13
|
+
<h3 class="text-sm font-semibold text-stone-500 dark:text-stone-400 uppercase tracking-wider mb-3"><%= t(".settings_title") %></h3>
|
|
14
14
|
<%= render "iron/field_definitions/#{@field_definition.type_handle}/form", field_definition: @field_definition %>
|
|
15
15
|
</section>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
<div class="drawer-footer">
|
|
19
|
-
<input type="submit" value="
|
|
19
|
+
<input type="submit" value="<%= t(".submit") %>" form="field-definition-form" class="button-primary w-full">
|
|
20
20
|
</div>
|
|
21
21
|
<% end %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%= render layout: "iron/field_definitions/layouts/form", locals: { field_definition: field_definition } do |form| %>
|
|
2
2
|
<div class="field">
|
|
3
|
-
<%= form.label :supported_content_type_ids, "
|
|
3
|
+
<%= form.label :supported_content_type_ids, t("iron.field_definitions.reference.supported_content_types") %>
|
|
4
4
|
<div class="selection-list">
|
|
5
5
|
<%= form.collection_check_boxes :supported_content_type_ids, Iron::ContentType.all, :id, :name do |b| %>
|
|
6
6
|
<label class="selection-list-item" data-selection-color="cyan">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%= render layout: "iron/field_definitions/layouts/form", locals: { field_definition: field_definition } do |form| %>
|
|
2
2
|
<div class="field">
|
|
3
|
-
<%= form.label :supported_content_type_ids, "
|
|
3
|
+
<%= form.label :supported_content_type_ids, t("iron.field_definitions.reference.supported_content_types") %>
|
|
4
4
|
<div class="selection-list">
|
|
5
5
|
<%= form.collection_check_boxes :supported_content_type_ids, Iron::ContentType.all, :id, :name do |b| %>
|
|
6
6
|
<label class="selection-list-item" data-selection-color="cyan">
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<%= render layout: "iron/field_definitions/layouts/form", locals: { field_definition: field_definition } do |form| %>
|
|
2
2
|
<div class="field flex items-center justify-between">
|
|
3
|
-
<%= form.label :required, "
|
|
3
|
+
<%= form.label :required, t("iron.field_definitions.text_field.required") %>
|
|
4
4
|
<%= form.toggle :required %>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<div class="field">
|
|
8
|
-
<%= form.label :allowed_values_text, "
|
|
8
|
+
<%= form.label :allowed_values_text, t("iron.field_definitions.text_field.allowed_values") %>
|
|
9
9
|
<div>
|
|
10
10
|
<%= form.text_area :allowed_values_text,
|
|
11
11
|
value: field_definition.allowed_values_text,
|
|
12
12
|
rows: 3,
|
|
13
13
|
class: "input" %>
|
|
14
|
-
<p class="text-xs text-stone-500"
|
|
14
|
+
<p class="text-xs text-stone-500"><%= t("iron.field_definitions.text_field.allowed_values_help") %></p>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div>
|
|
2
2
|
<div class="mb-8 text-center">
|
|
3
|
-
<h1 class="text-2xl font-semibold tracking-tight"
|
|
4
|
-
<p class="mt-2 text-sm text-stone-600 dark:text-stone-400"
|
|
3
|
+
<h1 class="text-2xl font-semibold tracking-tight"><%= t(".heading") %></h1>
|
|
4
|
+
<p class="mt-2 text-sm text-stone-600 dark:text-stone-400"><%= t(".description") %></p>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<%= form_with(model: @user, url: first_run_path, class: "space-y-6") do |form| %>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div class="flex">
|
|
11
11
|
<div class="ml-3">
|
|
12
12
|
<h3 class="text-sm font-medium text-red-800 dark:text-red-200">
|
|
13
|
-
<%=
|
|
13
|
+
<%= t(".errors_title", count: @user.errors.count) %>
|
|
14
14
|
</h3>
|
|
15
15
|
<div class="mt-2 text-sm text-red-700 dark:text-red-200">
|
|
16
16
|
<ul class="list-disc space-y-1 pl-5">
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
<%= form.password_field :password_confirmation, required: true, autocomplete: "new-password" %>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
|
-
<%= form.submit "
|
|
42
|
+
<%= form.submit t(".submit"), class: "button-primary" %>
|
|
43
43
|
<% end %>
|
|
44
44
|
</div>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
<div class="mt-8 p-4 bg-gray-100 rounded">
|
|
5
5
|
<p class="text-sm text-gray-600">
|
|
6
|
-
|
|
6
|
+
<%= t(".default_view") %>
|
|
7
7
|
</p>
|
|
8
8
|
<pre class="mt-2 p-2 bg-white rounded text-sm"><code>bin/rails g iron:resources <%= @content_type.handle %></code></pre>
|
|
9
9
|
</div>
|
|
10
|
-
</div>
|
|
10
|
+
</div>
|
data/config/locales/en.yml
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
en:
|
|
2
2
|
activerecord:
|
|
3
|
+
attributes:
|
|
4
|
+
iron/account:
|
|
5
|
+
name: "Name"
|
|
6
|
+
iron/block_definition:
|
|
7
|
+
description: "Description"
|
|
8
|
+
handle: "Handle"
|
|
9
|
+
name: "Name"
|
|
10
|
+
iron/content_type:
|
|
11
|
+
description: "Description"
|
|
12
|
+
handle: "Handle"
|
|
13
|
+
name: "Name"
|
|
14
|
+
iron/field_definition:
|
|
15
|
+
handle: "Handle"
|
|
16
|
+
name: "Name"
|
|
17
|
+
iron/locale:
|
|
18
|
+
code: "Code"
|
|
19
|
+
name: "Name"
|
|
3
20
|
errors:
|
|
4
21
|
models:
|
|
5
22
|
iron/entry:
|
|
@@ -29,6 +46,36 @@ en:
|
|
|
29
46
|
share: "Share"
|
|
30
47
|
application:
|
|
31
48
|
title: "Iron CMS"
|
|
49
|
+
block_definitions:
|
|
50
|
+
edit:
|
|
51
|
+
breadcrumb: "Block Definitions"
|
|
52
|
+
delete_action: "Delete block definition"
|
|
53
|
+
delete_confirm: "Delete this block definition? This will also delete all its field definitions. This can't be undone."
|
|
54
|
+
more_actions: "More actions"
|
|
55
|
+
title: "Edit %{name}"
|
|
56
|
+
empty_state:
|
|
57
|
+
description: "Block definitions let you create reusable content blocks for rich text fields."
|
|
58
|
+
new_block_definition: "New Block Definition"
|
|
59
|
+
title: "No block definitions yet"
|
|
60
|
+
index:
|
|
61
|
+
count:
|
|
62
|
+
one: "1 block definition"
|
|
63
|
+
other: "%{count} block definitions"
|
|
64
|
+
heading: "Block Definitions"
|
|
65
|
+
new_block_definition: "New Block Definition"
|
|
66
|
+
title: "Block definitions"
|
|
67
|
+
new:
|
|
68
|
+
breadcrumb: "Block Definitions"
|
|
69
|
+
heading: "New Block Definition"
|
|
70
|
+
title: "New block definition"
|
|
71
|
+
show:
|
|
72
|
+
add_field: "Add field"
|
|
73
|
+
breadcrumb: "Block Definitions"
|
|
74
|
+
empty_fields_description: "Add fields to define the structure of this block."
|
|
75
|
+
empty_fields_title: "No fields yet"
|
|
76
|
+
fields: "Fields"
|
|
77
|
+
no_description: "No description"
|
|
78
|
+
title: "%{name} block definition"
|
|
32
79
|
content_types:
|
|
33
80
|
content_type:
|
|
34
81
|
entries_count:
|
|
@@ -100,6 +147,14 @@ en:
|
|
|
100
147
|
description: "Get started by creating your first entry."
|
|
101
148
|
new_entry: "New entry"
|
|
102
149
|
title: "No entries yet"
|
|
150
|
+
fields:
|
|
151
|
+
block:
|
|
152
|
+
edit_field_definition: "Edit field definition"
|
|
153
|
+
missing_definition: "Missing block definition!"
|
|
154
|
+
untitled: "Untitled"
|
|
155
|
+
file:
|
|
156
|
+
upload_hint: "PNG, JPG, GIF up to 10MB"
|
|
157
|
+
upload_prompt: "Upload a file or drag and drop"
|
|
103
158
|
index:
|
|
104
159
|
count:
|
|
105
160
|
one: "1 entry"
|
|
@@ -125,6 +180,45 @@ en:
|
|
|
125
180
|
route_title: "Only lowercase letters, numbers, hyphens and slashes allowed"
|
|
126
181
|
title: "Web page settings"
|
|
127
182
|
use_as_index: "Use as index page"
|
|
183
|
+
field_definitions:
|
|
184
|
+
edit:
|
|
185
|
+
delete_action: "Delete"
|
|
186
|
+
delete_confirm: "Delete this field? This will also delete all field data for this field. This can't be undone."
|
|
187
|
+
submit: "Update field"
|
|
188
|
+
block:
|
|
189
|
+
block_definition: "Block definition"
|
|
190
|
+
select_block_definition: "Select a block definition"
|
|
191
|
+
block_list:
|
|
192
|
+
supported_block_definitions: "Supported block definitions"
|
|
193
|
+
file:
|
|
194
|
+
accepted_file_types: "Accepted file types"
|
|
195
|
+
all_file_types: "All file types"
|
|
196
|
+
preset_labels:
|
|
197
|
+
audio: "Audio"
|
|
198
|
+
documents: "Documents"
|
|
199
|
+
images: "Images"
|
|
200
|
+
videos: "Videos"
|
|
201
|
+
specific_file_types: "Specific file types"
|
|
202
|
+
form:
|
|
203
|
+
handle_help: "The API identifier for this field"
|
|
204
|
+
new:
|
|
205
|
+
settings_title: "Field Settings"
|
|
206
|
+
submit: "Create field"
|
|
207
|
+
title: "New Field"
|
|
208
|
+
reference:
|
|
209
|
+
supported_content_types: "Supported content types"
|
|
210
|
+
text_field:
|
|
211
|
+
allowed_values: "Allowed values"
|
|
212
|
+
allowed_values_help: "One value per line, leave blank to allow any value"
|
|
213
|
+
required: "Required"
|
|
214
|
+
first_runs:
|
|
215
|
+
show:
|
|
216
|
+
description: "Start managing your content with Iron CMS"
|
|
217
|
+
errors_title:
|
|
218
|
+
one: "1 error prohibited this user from being saved:"
|
|
219
|
+
other: "%{count} errors prohibited this user from being saved:"
|
|
220
|
+
heading: "Create your account"
|
|
221
|
+
submit: "Create account"
|
|
128
222
|
forms:
|
|
129
223
|
unsaved_changes_confirmation: "You have unsaved changes. Are you sure you want to leave?"
|
|
130
224
|
home:
|
|
@@ -418,6 +512,9 @@ en:
|
|
|
418
512
|
share_title: "Your sign-in link"
|
|
419
513
|
user:
|
|
420
514
|
you: "You"
|
|
515
|
+
published_pages:
|
|
516
|
+
show:
|
|
517
|
+
default_view: "This is the default Iron CMS view. To create a custom view for this content type, run:"
|
|
421
518
|
layouts:
|
|
422
519
|
iron:
|
|
423
520
|
mobile_header:
|
data/config/locales/it.yml
CHANGED
|
@@ -39,6 +39,23 @@ it:
|
|
|
39
39
|
one: "%{count} anno"
|
|
40
40
|
other: "%{count} anni"
|
|
41
41
|
activerecord:
|
|
42
|
+
attributes:
|
|
43
|
+
iron/account:
|
|
44
|
+
name: "Nome"
|
|
45
|
+
iron/block_definition:
|
|
46
|
+
description: "Descrizione"
|
|
47
|
+
handle: "Handle"
|
|
48
|
+
name: "Nome"
|
|
49
|
+
iron/content_type:
|
|
50
|
+
description: "Descrizione"
|
|
51
|
+
handle: "Handle"
|
|
52
|
+
name: "Nome"
|
|
53
|
+
iron/field_definition:
|
|
54
|
+
handle: "Handle"
|
|
55
|
+
name: "Nome"
|
|
56
|
+
iron/locale:
|
|
57
|
+
code: "Codice"
|
|
58
|
+
name: "Nome"
|
|
42
59
|
errors:
|
|
43
60
|
models:
|
|
44
61
|
iron/entry:
|
|
@@ -68,6 +85,36 @@ it:
|
|
|
68
85
|
share: "Condividi"
|
|
69
86
|
application:
|
|
70
87
|
title: "Iron CMS"
|
|
88
|
+
block_definitions:
|
|
89
|
+
edit:
|
|
90
|
+
breadcrumb: "Blocchi"
|
|
91
|
+
delete_action: "Elimina blocco"
|
|
92
|
+
delete_confirm: "Eliminare questo blocco? Verranno eliminate anche tutte le definizioni dei campi. Questa operazione non può essere annullata."
|
|
93
|
+
more_actions: "Altre azioni"
|
|
94
|
+
title: "Modifica %{name}"
|
|
95
|
+
empty_state:
|
|
96
|
+
description: "I blocchi ti permettono di creare blocchi di contenuto riutilizzabili per i campi di testo ricco."
|
|
97
|
+
new_block_definition: "Nuovo blocco"
|
|
98
|
+
title: "Nessun blocco ancora"
|
|
99
|
+
index:
|
|
100
|
+
count:
|
|
101
|
+
one: "1 blocco"
|
|
102
|
+
other: "%{count} blocchi"
|
|
103
|
+
heading: "Blocchi"
|
|
104
|
+
new_block_definition: "Nuovo blocco"
|
|
105
|
+
title: "Blocchi"
|
|
106
|
+
new:
|
|
107
|
+
breadcrumb: "Blocchi"
|
|
108
|
+
heading: "Nuovo blocco"
|
|
109
|
+
title: "Nuovo blocco"
|
|
110
|
+
show:
|
|
111
|
+
add_field: "Aggiungi campo"
|
|
112
|
+
breadcrumb: "Blocchi"
|
|
113
|
+
empty_fields_description: "Aggiungi campi per definire la struttura di questo blocco."
|
|
114
|
+
empty_fields_title: "Nessun campo ancora"
|
|
115
|
+
fields: "Campi"
|
|
116
|
+
no_description: "Nessuna descrizione"
|
|
117
|
+
title: "Blocco %{name}"
|
|
71
118
|
content_types:
|
|
72
119
|
content_type:
|
|
73
120
|
entries_count:
|
|
@@ -139,6 +186,14 @@ it:
|
|
|
139
186
|
description: "Inizia creando la tua prima voce."
|
|
140
187
|
new_entry: "Nuova voce"
|
|
141
188
|
title: "Nessuna voce ancora"
|
|
189
|
+
fields:
|
|
190
|
+
block:
|
|
191
|
+
edit_field_definition: "Modifica definizione campo"
|
|
192
|
+
missing_definition: "Definizione blocco mancante!"
|
|
193
|
+
untitled: "Senza titolo"
|
|
194
|
+
file:
|
|
195
|
+
upload_hint: "PNG, JPG, GIF fino a 10MB"
|
|
196
|
+
upload_prompt: "Carica un file o trascina qui"
|
|
142
197
|
index:
|
|
143
198
|
count:
|
|
144
199
|
one: "1 voce"
|
|
@@ -164,6 +219,45 @@ it:
|
|
|
164
219
|
route_title: "Sono consentite solo lettere minuscole, numeri, trattini e barre"
|
|
165
220
|
title: "Impostazioni pagina web"
|
|
166
221
|
use_as_index: "Usa come pagina indice"
|
|
222
|
+
field_definitions:
|
|
223
|
+
edit:
|
|
224
|
+
delete_action: "Elimina"
|
|
225
|
+
delete_confirm: "Eliminare questo campo? Verranno eliminati anche tutti i dati di questo campo. Questa operazione non può essere annullata."
|
|
226
|
+
submit: "Aggiorna campo"
|
|
227
|
+
block:
|
|
228
|
+
block_definition: "Definizione blocco"
|
|
229
|
+
select_block_definition: "Seleziona una definizione blocco"
|
|
230
|
+
block_list:
|
|
231
|
+
supported_block_definitions: "Definizioni blocco supportate"
|
|
232
|
+
file:
|
|
233
|
+
accepted_file_types: "Tipi di file accettati"
|
|
234
|
+
all_file_types: "Tutti i tipi di file"
|
|
235
|
+
preset_labels:
|
|
236
|
+
audio: "Audio"
|
|
237
|
+
documents: "Documenti"
|
|
238
|
+
images: "Immagini"
|
|
239
|
+
videos: "Video"
|
|
240
|
+
specific_file_types: "Tipi di file specifici"
|
|
241
|
+
form:
|
|
242
|
+
handle_help: "L'identificativo API per questo campo"
|
|
243
|
+
new:
|
|
244
|
+
settings_title: "Impostazioni campo"
|
|
245
|
+
submit: "Crea campo"
|
|
246
|
+
title: "Nuovo campo"
|
|
247
|
+
reference:
|
|
248
|
+
supported_content_types: "Tipi di contenuto supportati"
|
|
249
|
+
text_field:
|
|
250
|
+
allowed_values: "Valori consentiti"
|
|
251
|
+
allowed_values_help: "Un valore per riga, lascia vuoto per consentire qualsiasi valore"
|
|
252
|
+
required: "Obbligatorio"
|
|
253
|
+
first_runs:
|
|
254
|
+
show:
|
|
255
|
+
description: "Inizia a gestire i tuoi contenuti con Iron CMS"
|
|
256
|
+
errors_title:
|
|
257
|
+
one: "1 errore impedisce il salvataggio dell'utente:"
|
|
258
|
+
other: "%{count} errori impediscono il salvataggio dell'utente:"
|
|
259
|
+
heading: "Crea il tuo account"
|
|
260
|
+
submit: "Crea account"
|
|
167
261
|
forms:
|
|
168
262
|
unsaved_changes_confirmation: "Hai modifiche non salvate. Sei sicuro di voler uscire?"
|
|
169
263
|
home:
|
|
@@ -457,6 +551,9 @@ it:
|
|
|
457
551
|
share_title: "Il tuo link di accesso"
|
|
458
552
|
user:
|
|
459
553
|
you: "Tu"
|
|
554
|
+
published_pages:
|
|
555
|
+
show:
|
|
556
|
+
default_view: "Questa è la vista predefinita di Iron CMS. Per creare una vista personalizzata per questo tipo di contenuto, esegui:"
|
|
460
557
|
layouts:
|
|
461
558
|
iron:
|
|
462
559
|
mobile_header:
|
data/lib/iron/version.rb
CHANGED
data/lib/iron.rb
CHANGED