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
27 28 29 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 27 def content_heading_field(**) govuk_text_field(:heading, **) end |
#content_heading_fieldset(legend: { text: t("activerecord.attributes.katalyst/content/item.heading") }) ⇒ Object
20 21 22 23 24 25 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 20 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
31 32 33 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 31 def content_heading_style_field(**) govuk_enum_select(:heading_style, **) end |
#content_http_method_field ⇒ Object
39 40 41 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 39 def content_http_method_field(**) govuk_enum_select(:http_method, **) end |
#content_target_field ⇒ Object
43 44 45 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 43 def content_target_field(**) govuk_enum_select(:target, **) end |
#content_theme_field(options: { include_blank: true }) ⇒ Object
47 48 49 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 47 def content_theme_field(options: { include_blank: true }, **) govuk_enum_select(:theme, options:, **) end |
#content_url_field ⇒ Object
35 36 37 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 35 def content_url_field(**) govuk_text_field(:url, **) end |
#content_visible_field ⇒ Object
51 52 53 |
# File 'app/helpers/katalyst/content/editor_helper.rb', line 51 def content_visible_field(**) govuk_check_box_field(:visible, **) end |