diff --git a/app/cells/plugins/core/content_item/popup.haml b/app/cells/plugins/core/content_item/popup.haml new file mode 100644 index 0000000..b808b22 --- /dev/null +++ b/app/cells/plugins/core/content_item/popup.haml @@ -0,0 +1,13 @@ += render_label +%br +%button.content_item_button.text-center.popup--open + .button_content + %i{ class: "material-icons icon" } + cloud_upload + %br + %span.content_item_button-text + Click to add a + = field.name + from the media library +%small + Recommended size: 1452px x 530px with a live area of 930px x 530px diff --git a/app/cells/plugins/core/content_item_cell.rb b/app/cells/plugins/core/content_item_cell.rb new file mode 100644 index 0000000..a247ca6 --- /dev/null +++ b/app/cells/plugins/core/content_item_cell.rb @@ -0,0 +1,15 @@ +module Plugins + module Core + class ContentItemCell < Plugins::Core::Cell + def popup + render + end + + private + + def render_label + "Add #{field.name}" + end + end + end +end diff --git a/app/models/content_item_field_type.rb b/app/models/content_item_field_type.rb new file mode 100644 index 0000000..be0bb33 --- /dev/null +++ b/app/models/content_item_field_type.rb @@ -0,0 +1,11 @@ +class ContentItemFieldType < FieldType + def mapping + { name: mapping_field_name, type: :string, analyzer: :snowball } + end + + private + + def mapping_field_name + "#{field_name.parameterize('_')}_content_item" + end +end