Sha256: fb3df60999f414cbd29e6db14eb432d6cae5ebc8c83fb35c6d250a01bb89e24e

Contents?: true

Size: 1.6 KB

Versions: 10

Compression:

Stored size: 1.6 KB

Contents

<%= form_with model: table, scope: :item, url: path, data: {
      controller: "content--editor--table",
    } do |form| %>
  <%= render "hidden_fields", form: %>
  <%= render "form_errors", form: %>

  <div class="field">
    <%= form.label :heading %>
    <%= form.text_field :heading %>
  </div>

  <div class="field">
    <%= form.label :heading_style %>
    <%= form.collection_radio_buttons :heading_style, Katalyst::Content.config.heading_styles, :itself, :itself %>
  </div>

  <div class="field">
    <%= form.label :background %>
    <%= form.select :background, Katalyst::Content.config.backgrounds %>
  </div>

  <div class="field">
    <%= form.label :visible %>
    <%= form.check_box :visible %>
  </div>

  <div class="field">
    <%= form.label :content %>
    <% content = sanitize_content_table(normalize_content_table(form.object, heading: false)) %>
    <%= form.hidden_field :content, value: content, data: { content__editor__table_target: "input" } %>
  </div>

  <div class="field">
    <%= form.label :heading_rows %>
    <%= form.text_field :heading_rows, type: :number, data: { action: "input->content--editor--table#update" } %>
  </div>

  <div class="field">
    <%= form.label :heading_columns %>
    <%= form.text_field :heading_columns, type: :number, data: { action: "input->content--editor--table#update" } %>
  </div>

  <%= form.submit "Done" %>
  <%= link_to "Discard", :back %>
  <%= form.button "Update",
                  formaction: table.persisted? ? content_routes.table_path : content_routes.tables_path,
                  data:       { content__editor__table_target: "update" } %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katalyst-content-2.7.0 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.6.2 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.6.1 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.6.0 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.5.1 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.5.0 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.4.2 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.4.1 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.3.2 app/views/katalyst/content/tables/_table.html+form.erb
katalyst-content-2.3.1 app/views/katalyst/content/tables/_table.html+form.erb