Module: Katalyst::Content::EditorHelper::Builder
- Included in:
- FormBuilder
- Defined in:
- app/helpers/katalyst/content/editor_helper.rb
Instance Method Summary collapse
- #content_heading_field ⇒ Object
- #content_heading_fieldset(legend: { text: t("activerecord.attributes.katalyst/content/item.heading") }) ⇒ Object
- #content_heading_style_field ⇒ Object
- #content_http_method_field ⇒ Object
- #content_target_field ⇒ Object
- #content_theme_field(options: { include_blank: true }) ⇒ Object
- #content_url_field ⇒ Object
- #content_visible_field ⇒ Object
Instance Method Details
#content_heading_field ⇒ Object
28 29 30 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 28 def content_heading_field(**) govuk_text_field(:heading, **) end |
#content_heading_fieldset(legend: { text: t("activerecord.attributes.katalyst/content/item.heading") }) ⇒ Object
21 22 23 24 25 26 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 21 def content_heading_fieldset(legend: { text: t("activerecord.attributes.katalyst/content/item.heading") }) govuk_fieldset(legend:) do concat(content_heading_field(label: { class: "govuk-visually-hidden" })) concat(content_heading_style_field) end end |
#content_heading_style_field ⇒ Object
32 33 34 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 32 def content_heading_style_field(**) govuk_enum_select(:heading_style, **) end |
#content_http_method_field ⇒ Object
40 41 42 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 40 def content_http_method_field(**) govuk_enum_select(:http_method, **) end |
#content_target_field ⇒ Object
44 45 46 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 44 def content_target_field(**) govuk_enum_select(:target, **) end |
#content_theme_field(options: { include_blank: true }) ⇒ Object
48 49 50 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 48 def content_theme_field(options: { include_blank: true }, **) govuk_enum_select(:theme, options:, **) end |
#content_url_field ⇒ Object
36 37 38 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 36 def content_url_field(**) govuk_text_field(:url, **) end |
#content_visible_field ⇒ Object
52 53 54 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 52 def content_visible_field(**) govuk_check_box_field(:visible, **) end |