katalyst-content 2.8.1 → 3.0.0.alpha.1
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 +11 -2
- data/app/assets/builds/katalyst/content.esm.js +61 -3
- data/app/assets/builds/katalyst/content.js +61 -3
- data/app/assets/builds/katalyst/content.min.js +1 -1
- data/app/assets/builds/katalyst/content.min.js.map +1 -1
- data/app/assets/images/katalyst/content/icons/aside.svg +1 -0
- data/app/assets/images/katalyst/content/icons/collapse.svg +3 -0
- data/app/assets/images/katalyst/content/icons/column.svg +1 -0
- data/app/assets/images/katalyst/content/icons/content.svg +1 -0
- data/app/assets/images/katalyst/content/icons/edit.svg +1 -0
- data/app/assets/images/katalyst/content/icons/expand.svg +3 -0
- data/app/assets/images/katalyst/content/icons/figure.svg +1 -0
- data/app/assets/images/katalyst/content/icons/group.svg +1 -0
- data/app/assets/images/katalyst/content/icons/hidden.svg +1 -0
- data/app/assets/images/katalyst/content/icons/indent.svg +3 -0
- data/app/assets/images/katalyst/content/icons/outdent.svg +4 -0
- data/app/assets/images/katalyst/content/icons/remove.svg +1 -0
- data/app/assets/images/katalyst/content/icons/section.svg +1 -0
- data/app/assets/images/katalyst/content/icons/table.svg +1 -0
- data/app/assets/images/katalyst/content/icons/theme.svg +1 -0
- data/app/assets/stylesheets/katalyst/_content.scss +4 -0
- data/app/assets/stylesheets/katalyst/content/editor.css +196 -0
- data/app/assets/stylesheets/katalyst/content/icons.css +79 -0
- data/app/assets/stylesheets/katalyst/content/{editor/_status-bar.scss → status-bar.css} +31 -37
- data/app/assets/stylesheets/katalyst/content/{editor/_table.scss → table.css} +3 -5
- data/app/assets/stylesheets/katalyst/content.css +4 -0
- data/app/components/katalyst/content/editor/base_component.rb +0 -6
- data/app/components/katalyst/content/editor/item_component.html.erb +31 -15
- data/app/components/katalyst/content/editor/item_component.rb +1 -3
- data/app/components/katalyst/content/editor/item_editor_component.rb +8 -22
- data/app/components/katalyst/content/editor/new_item_component.html.erb +13 -10
- data/app/components/katalyst/content/editor/new_item_component.rb +7 -8
- data/app/components/katalyst/content/editor/new_items_component.html.erb +40 -18
- data/app/components/katalyst/content/editor/new_items_component.rb +0 -2
- data/app/components/katalyst/content/editor/row_component.html.erb +2 -1
- data/app/components/katalyst/content/editor/status_bar_component.rb +9 -11
- data/app/components/katalyst/content/editor/table_component.html.erb +0 -6
- data/app/components/katalyst/content/editor/table_component.rb +12 -12
- data/app/components/katalyst/content/editor_component.html.erb +5 -0
- data/app/components/katalyst/content/editor_component.rb +12 -11
- data/app/controllers/katalyst/content/items_controller.rb +0 -1
- data/app/javascript/content/application.js +5 -0
- data/app/javascript/content/editor/item.js +1 -1
- data/app/javascript/content/editor/item_editor_controller.js +57 -0
- data/app/javascript/content/editor/new_items_controller.js +1 -4
- data/app/views/katalyst/content/asides/_aside.html+form.erb +22 -26
- data/app/views/katalyst/content/columns/_column.html+form.erb +18 -22
- data/app/views/katalyst/content/contents/_content.html+form.erb +22 -26
- data/app/views/katalyst/content/figures/_figure.html+form.erb +27 -31
- data/app/views/katalyst/content/groups/_group.html+form.erb +18 -22
- data/app/views/katalyst/content/items/_form.html.erb +6 -0
- data/app/views/katalyst/content/items/_item.html+form.erb +18 -22
- data/app/views/katalyst/content/items/edit.html.erb +40 -2
- data/app/views/katalyst/content/items/edit.turbo_stream.erb +2 -0
- data/app/views/katalyst/content/items/update.turbo_stream.erb +0 -1
- data/app/views/katalyst/content/sections/_section.html+form.erb +18 -22
- data/app/views/katalyst/content/tables/_table.html+form.erb +7 -9
- data/lib/katalyst/content/engine.rb +0 -1
- metadata +25 -27
- data/app/assets/stylesheets/katalyst/content/_index.scss +0 -1
- data/app/assets/stylesheets/katalyst/content/editor/_figure.scss +0 -12
- data/app/assets/stylesheets/katalyst/content/editor/_icon.scss +0 -17
- data/app/assets/stylesheets/katalyst/content/editor/_index.scss +0 -157
- data/app/assets/stylesheets/katalyst/content/editor/_item-actions.scss +0 -110
- data/app/assets/stylesheets/katalyst/content/editor/_item-rules.scss +0 -19
- data/app/assets/stylesheets/katalyst/content/editor/_new-items.scss +0 -160
- data/app/assets/stylesheets/katalyst/content/editor/_trix-rails.scss +0 -30
- data/app/assets/stylesheets/katalyst/content/editor/_variables.scss +0 -26
@@ -1,20 +1,42 @@
|
|
1
1
|
<div class="content--editor--new-items"
|
2
|
-
data-controller="
|
3
|
-
data-action="turbo:before-morph-element
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
data-controller="content--editor--new-items"
|
3
|
+
data-action="turbo:before-morph-element->content--editor--new-items#morph">
|
4
|
+
<button aria-controls="content--editor--new-items-dialog"
|
5
|
+
class="button"
|
6
|
+
data-action="click->content--editor--new-items#open"
|
7
|
+
data-button-padding="tight"
|
8
|
+
data-text-button>
|
9
|
+
<icon aria-hidden="true" class="icon" data-icon="add"> </icon>
|
10
|
+
Add item
|
11
|
+
</button>
|
12
|
+
<div class="content--editor--inline-add" data-content--editor--new-items-target="inline" hidden>
|
13
|
+
<button aria-controls="content--editor--new-items-dialog"
|
14
|
+
class="button"
|
15
|
+
data-action="content--editor--new-items#open"
|
16
|
+
data-button-padding="tight">
|
17
|
+
<icon aria-hidden="true" class="icon" data-icon="add"> </icon>
|
18
|
+
<span class="visually-hidden">Add item here</span>
|
19
|
+
</button>
|
20
|
+
</div>
|
21
|
+
<dialog id="content--editor--new-items-dialog" class="modal" data-action="click->content--editor--new-items#close">
|
22
|
+
<article class="flow" data-action="click->content--editor--new-items#noop:stop">
|
23
|
+
<header class="repel" data-nowrap>
|
24
|
+
<h2>Add item</h2>
|
25
|
+
<button class="button"
|
26
|
+
data-action="click->content--editor--new-items#close"
|
27
|
+
data-button-padding="tight"
|
28
|
+
data-text-button>
|
29
|
+
<icon aria-hidden="true" class="icon" data-icon="close"> </icon>
|
30
|
+
<span class="visually-hidden">Close</span>
|
31
|
+
</button>
|
32
|
+
</header>
|
33
|
+
<main>
|
34
|
+
<%= tag.div(role: "list", data: { action: "click->content--editor--new-items#noop:stop" }) do %>
|
35
|
+
<ul role="list" class="items-list">
|
36
|
+
<%= render Katalyst::Content::Editor::NewItemComponent.with_collection(items) %>
|
37
|
+
</ul>
|
38
|
+
<% end %>
|
39
|
+
</main>
|
40
|
+
</article>
|
41
|
+
</dialog>
|
20
42
|
</div>
|
@@ -4,11 +4,6 @@ module Katalyst
|
|
4
4
|
module Content
|
5
5
|
module Editor
|
6
6
|
class StatusBarComponent < BaseComponent
|
7
|
-
ACTIONS = <<~ACTIONS.gsub(/\s+/, " ").freeze
|
8
|
-
content:change@document->#{STATUS_BAR_CONTROLLER}#change
|
9
|
-
turbo:morph-element->#{STATUS_BAR_CONTROLLER}#morph
|
10
|
-
ACTIONS
|
11
|
-
|
12
7
|
attr_reader :container
|
13
8
|
|
14
9
|
def call
|
@@ -37,10 +32,10 @@ module Katalyst
|
|
37
32
|
|
38
33
|
def actions
|
39
34
|
tag.menu do
|
40
|
-
concat action(:discard, class: "button
|
41
|
-
concat action(:revert, class: "button
|
42
|
-
concat action(:save, class: "button
|
43
|
-
concat action(:publish, class: "button
|
35
|
+
concat action(:discard, class: "button", data: { text_button: "" })
|
36
|
+
concat action(:revert, class: "button", data: { text_button: "" })
|
37
|
+
concat action(:save, class: "button", data: { ghost_button: "" })
|
38
|
+
concat action(:publish, class: "button")
|
44
39
|
end
|
45
40
|
end
|
46
41
|
|
@@ -59,8 +54,11 @@ module Katalyst
|
|
59
54
|
def default_html_attributes
|
60
55
|
{
|
61
56
|
data: {
|
62
|
-
controller:
|
63
|
-
action:
|
57
|
+
controller: "content--editor--status-bar",
|
58
|
+
action: %w[
|
59
|
+
content:change@document->content--editor--status-bar#change
|
60
|
+
turbo:morph-element->content--editor--status-bar#morph
|
61
|
+
],
|
64
62
|
state: container.state,
|
65
63
|
},
|
66
64
|
}
|
@@ -4,14 +4,6 @@ module Katalyst
|
|
4
4
|
module Content
|
5
5
|
module Editor
|
6
6
|
class TableComponent < BaseComponent
|
7
|
-
ACTIONS = <<~ACTIONS.gsub(/\s+/, " ").freeze
|
8
|
-
dragstart->#{LIST_CONTROLLER}#dragstart
|
9
|
-
dragover->#{LIST_CONTROLLER}#dragover
|
10
|
-
drop->#{LIST_CONTROLLER}#drop
|
11
|
-
dragend->#{LIST_CONTROLLER}#dragend
|
12
|
-
keyup.esc@document->#{LIST_CONTROLLER}#dragend
|
13
|
-
ACTIONS
|
14
|
-
|
15
7
|
renders_many :items, ->(item) do
|
16
8
|
row = RowComponent.new(item:, container:)
|
17
9
|
row.with_content(render(ItemComponent.new(item:, container:)))
|
@@ -22,11 +14,19 @@ module Katalyst
|
|
22
14
|
|
23
15
|
def default_html_attributes
|
24
16
|
{
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
17
|
+
class: "katalyst--content--editor",
|
18
|
+
data: {
|
19
|
+
controller: "content--editor--list",
|
20
|
+
action: %w[
|
21
|
+
dragstart->content--editor--list#dragstart
|
22
|
+
dragover->content--editor--list#dragover
|
23
|
+
drop->content--editor--list#drop
|
24
|
+
dragend->content--editor--list#dragend
|
25
|
+
keyup.esc@document->content--editor--list#dragend
|
26
|
+
],
|
27
|
+
content__editor__container_target: "container",
|
29
28
|
},
|
29
|
+
role: "list",
|
30
30
|
}
|
31
31
|
end
|
32
32
|
end
|
@@ -3,13 +3,7 @@
|
|
3
3
|
module Katalyst
|
4
4
|
module Content
|
5
5
|
class EditorComponent < Editor::BaseComponent
|
6
|
-
|
7
|
-
submit->#{CONTAINER_CONTROLLER}#reindex
|
8
|
-
content:drop->#{CONTAINER_CONTROLLER}#drop
|
9
|
-
content:reindex->#{CONTAINER_CONTROLLER}#reindex
|
10
|
-
turbo:render@document->#{CONTAINER_CONTROLLER}#connect
|
11
|
-
content:reset->#{CONTAINER_CONTROLLER}#reset
|
12
|
-
ACTIONS
|
6
|
+
include ::Turbo::FramesHelper
|
13
7
|
|
14
8
|
attr_reader :url, :scope
|
15
9
|
|
@@ -44,10 +38,17 @@ module Katalyst
|
|
44
38
|
|
45
39
|
def default_html_attributes
|
46
40
|
{
|
47
|
-
id:
|
48
|
-
|
49
|
-
|
50
|
-
|
41
|
+
id: container_form_id,
|
42
|
+
class: "content--editor",
|
43
|
+
data: {
|
44
|
+
controller: "content--editor--container",
|
45
|
+
action: %w[
|
46
|
+
submit->content--editor--container#reindex
|
47
|
+
content:drop->content--editor--container#drop
|
48
|
+
content:reindex->content--editor--container#reindex
|
49
|
+
turbo:render@document->content--editor--container#connect
|
50
|
+
content:reset->content--editor--container#reset
|
51
|
+
],
|
51
52
|
},
|
52
53
|
}
|
53
54
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import ContainerController from "./editor/container_controller";
|
2
2
|
import ItemController from "./editor/item_controller";
|
3
|
+
import ItemEditorController from "./editor/item_editor_controller";
|
3
4
|
import ListController from "./editor/list_controller";
|
4
5
|
import NewItemsController from "./editor/new_items_controller";
|
5
6
|
import StatusBarController from "./editor/status_bar_controller";
|
@@ -15,6 +16,10 @@ const Definitions = [
|
|
15
16
|
identifier: "content--editor--item",
|
16
17
|
controllerConstructor: ItemController,
|
17
18
|
},
|
19
|
+
{
|
20
|
+
identifier: "content--editor--item-editor",
|
21
|
+
controllerConstructor: ItemEditorController,
|
22
|
+
},
|
18
23
|
{
|
19
24
|
identifier: "content--editor--list",
|
20
25
|
controllerConstructor: ListController,
|
@@ -272,7 +272,7 @@ export default class Item {
|
|
272
272
|
*/
|
273
273
|
function createChildrenList(node) {
|
274
274
|
const childrenList = document.createElement("ol");
|
275
|
-
childrenList.
|
275
|
+
childrenList.toggleAttribute("hidden", true);
|
276
276
|
|
277
277
|
// if objectType is "rich-content" set richContentChildren as a data attribute
|
278
278
|
childrenList.dataset[`contentChildren`] = "";
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus";
|
2
|
+
import Item from "./item";
|
3
|
+
|
4
|
+
export default class ItemEditorController extends Controller {
|
5
|
+
static targets = ["dialog"];
|
6
|
+
|
7
|
+
connect() {
|
8
|
+
this.element.addEventListener("turbo:submit-end", this.onSubmit);
|
9
|
+
}
|
10
|
+
|
11
|
+
disconnect() {
|
12
|
+
this.element.removeEventListener("turbo:submit-end", this.onSubmit);
|
13
|
+
}
|
14
|
+
|
15
|
+
dismiss() {
|
16
|
+
if (!this.dialogTarget) return;
|
17
|
+
if (!this.dialogTarget.open) this.dialogTarget.close();
|
18
|
+
|
19
|
+
if (!("itemPersisted" in this.dialogTarget.dataset)) {
|
20
|
+
this.#removeTargetItem();
|
21
|
+
}
|
22
|
+
|
23
|
+
this.element.removeAttribute("src");
|
24
|
+
this.dialogTarget.remove();
|
25
|
+
}
|
26
|
+
|
27
|
+
dialogTargetConnected(dialog) {
|
28
|
+
dialog.showModal();
|
29
|
+
}
|
30
|
+
|
31
|
+
onSubmit = (event) => {
|
32
|
+
if (
|
33
|
+
event.detail.success &&
|
34
|
+
"closeDialog" in event.detail.formSubmission?.submitter?.dataset
|
35
|
+
) {
|
36
|
+
this.dialogTarget.close();
|
37
|
+
this.element.removeAttribute("src");
|
38
|
+
this.dialogTarget.remove();
|
39
|
+
}
|
40
|
+
};
|
41
|
+
|
42
|
+
noop() {}
|
43
|
+
|
44
|
+
#removeTargetItem() {
|
45
|
+
const el = document.getElementById(this.dialogTarget.dataset.itemId);
|
46
|
+
const item = new Item(el.closest("[data-content-item]"));
|
47
|
+
const list = item.node.parentElement;
|
48
|
+
|
49
|
+
item.node.remove();
|
50
|
+
|
51
|
+
this.dispatch("reindex", {
|
52
|
+
target: list,
|
53
|
+
bubbles: true,
|
54
|
+
prefix: "content",
|
55
|
+
});
|
56
|
+
}
|
57
|
+
}
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus";
|
2
2
|
|
3
|
-
import Item from "./item";
|
4
|
-
|
5
3
|
const EDGE_AREA = 24;
|
6
4
|
|
7
5
|
export default class NewItemsController extends Controller {
|
@@ -34,13 +32,12 @@ export default class NewItemsController extends Controller {
|
|
34
32
|
add(e) {
|
35
33
|
e.preventDefault();
|
36
34
|
|
37
|
-
const template = e.target.querySelector("template");
|
35
|
+
const template = e.target.closest("li").querySelector("template");
|
38
36
|
const item = template.content.querySelector("li").cloneNode(true);
|
39
37
|
const target = this.currentItem;
|
40
38
|
|
41
39
|
if (target) {
|
42
40
|
target.insertAdjacentElement("beforebegin", item);
|
43
|
-
new Item(item).depth = new Item(target).depth;
|
44
41
|
} else {
|
45
42
|
this.list.insertAdjacentElement("beforeend", item);
|
46
43
|
}
|
@@ -1,32 +1,28 @@
|
|
1
|
-
|
2
|
-
<%= render "hidden_fields", form: %>
|
3
|
-
<%= render "form_errors", form: %>
|
1
|
+
<%# locals: (form:, aside:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%= form.label :heading %>
|
7
|
-
<%= form.text_field :heading %>
|
8
|
-
</div>
|
3
|
+
<%= render "form_errors", form: %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<div class="field">
|
6
|
+
<%= form.label :heading %>
|
7
|
+
<%= form.text_field :heading %>
|
8
|
+
</div>
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
<div class="field">
|
11
|
+
<%= form.label :heading_style %>
|
12
|
+
<%= form.collection_radio_buttons :heading_style, Katalyst::Content.config.heading_styles, :itself, :itself %>
|
13
|
+
</div>
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
<div class="field">
|
16
|
+
<%= form.label :background %>
|
17
|
+
<%= form.select :background, Katalyst::Content.config.backgrounds %>
|
18
|
+
</div>
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
<div class="field">
|
21
|
+
<%= form.label :visible %>
|
22
|
+
<%= form.check_box :visible %>
|
23
|
+
</div>
|
29
24
|
|
30
|
-
|
31
|
-
<%=
|
32
|
-
|
25
|
+
<div class="field">
|
26
|
+
<%= form.label :reverse %>
|
27
|
+
<%= form.check_box :reverse %>
|
28
|
+
</div>
|
@@ -1,27 +1,23 @@
|
|
1
|
-
|
2
|
-
<%= render "hidden_fields", form: %>
|
3
|
-
<%= render "form_errors", form: %>
|
1
|
+
<%# locals: (form:, column:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%= form.label :heading %>
|
7
|
-
<%= form.text_field :heading %>
|
8
|
-
</div>
|
3
|
+
<%= render "form_errors", form: %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<div class="field">
|
6
|
+
<%= form.label :heading %>
|
7
|
+
<%= form.text_field :heading %>
|
8
|
+
</div>
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
<div class="field">
|
11
|
+
<%= form.label :heading_style %>
|
12
|
+
<%= form.collection_radio_buttons :heading_style, Katalyst::Content.config.heading_styles, :itself, :itself %>
|
13
|
+
</div>
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
<div class="field">
|
16
|
+
<%= form.label :background %>
|
17
|
+
<%= form.select :background, Katalyst::Content.config.backgrounds %>
|
18
|
+
</div>
|
24
19
|
|
25
|
-
|
26
|
-
<%=
|
27
|
-
|
20
|
+
<div class="field">
|
21
|
+
<%= form.label :visible %>
|
22
|
+
<%= form.check_box :visible %>
|
23
|
+
</div>
|
@@ -1,32 +1,28 @@
|
|
1
|
-
|
2
|
-
<%= render "hidden_fields", form: %>
|
3
|
-
<%= render "form_errors", form: %>
|
1
|
+
<%# locals: (form:, content:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%= form.label :heading %>
|
7
|
-
<%= form.text_field :heading %>
|
8
|
-
</div>
|
3
|
+
<%= render "form_errors", form: %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<div class="field">
|
6
|
+
<%= form.label :heading %>
|
7
|
+
<%= form.text_field :heading %>
|
8
|
+
</div>
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
<div class="field">
|
11
|
+
<%= form.label :heading_style %>
|
12
|
+
<%= form.collection_radio_buttons :heading_style, Katalyst::Content.config.heading_styles, :itself, :itself %>
|
13
|
+
</div>
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
<div class="field">
|
16
|
+
<%= form.label :background %>
|
17
|
+
<%= form.select :background, Katalyst::Content.config.backgrounds %>
|
18
|
+
</div>
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
<div class="field">
|
21
|
+
<%= form.label :visible %>
|
22
|
+
<%= form.check_box :visible %>
|
23
|
+
</div>
|
29
24
|
|
30
|
-
|
31
|
-
<%=
|
32
|
-
|
25
|
+
<div class="field">
|
26
|
+
<%= form.label :content %>
|
27
|
+
<%= form.rich_text_area :content, content_editor_rich_text_attributes %>
|
28
|
+
</div>
|
@@ -1,37 +1,33 @@
|
|
1
|
-
|
2
|
-
<%= render "hidden_fields", form: %>
|
3
|
-
<%= render "form_errors", form: %>
|
1
|
+
<%# locals: (form:, figure:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%= form.label :image %>
|
7
|
-
<% if (image = form.object.image).attached? %>
|
8
|
-
<%= image.filename %>
|
9
|
-
<br>
|
10
|
-
<%= form.hidden_field :image, value: form.object.image.signed_id %>
|
11
|
-
<% end %>
|
12
|
-
<%= form.file_field :image %>
|
13
|
-
</div>
|
3
|
+
<%= render "form_errors", form: %>
|
14
4
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
5
|
+
<div class="field">
|
6
|
+
<%= form.label :image %>
|
7
|
+
<% if (image = form.object.image).attached? %>
|
8
|
+
<%= image.filename %>
|
9
|
+
<br>
|
10
|
+
<%= form.hidden_field :image, value: form.object.image.signed_id %>
|
11
|
+
<% end %>
|
12
|
+
<%= form.file_field :image %>
|
13
|
+
</div>
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
<div class="field">
|
16
|
+
<%= form.label :heading %>
|
17
|
+
<%= form.text_field :heading %>
|
18
|
+
</div>
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
<div class="field">
|
21
|
+
<%= form.label :background %>
|
22
|
+
<%= form.select :background, Katalyst::Content.config.backgrounds %>
|
23
|
+
</div>
|
29
24
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
<div class="field">
|
26
|
+
<%= form.label :visible %>
|
27
|
+
<%= form.check_box :visible %>
|
28
|
+
</div>
|
34
29
|
|
35
|
-
|
36
|
-
<%=
|
37
|
-
|
30
|
+
<div class="field">
|
31
|
+
<%= form.label :caption %>
|
32
|
+
<%= form.text_field :caption %>
|
33
|
+
</div>
|
@@ -1,27 +1,23 @@
|
|
1
|
-
|
2
|
-
<%= render "hidden_fields", form: %>
|
3
|
-
<%= render "form_errors", form: %>
|
1
|
+
<%# locals: (form:, group:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%= form.label :heading %>
|
7
|
-
<%= form.text_field :heading %>
|
8
|
-
</div>
|
3
|
+
<%= render "form_errors", form: %>
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<div class="field">
|
6
|
+
<%= form.label :heading %>
|
7
|
+
<%= form.text_field :heading %>
|
8
|
+
</div>
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
<div class="field">
|
11
|
+
<%= form.label :heading_style %>
|
12
|
+
<%= form.collection_radio_buttons :heading_style, Katalyst::Content.config.heading_styles, :itself, :itself %>
|
13
|
+
</div>
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
<div class="field">
|
16
|
+
<%= form.label :background %>
|
17
|
+
<%= form.select :background, Katalyst::Content.config.backgrounds %>
|
18
|
+
</div>
|
24
19
|
|
25
|
-
|
26
|
-
<%=
|
27
|
-
|
20
|
+
<div class="field">
|
21
|
+
<%= form.label :visible %>
|
22
|
+
<%= form.check_box :visible %>
|
23
|
+
</div>
|