Sha256: cc36cfcd3990e8e60554637648c1d8127b66e1b6a9d30d995c7f58d33cf472f0

Contents?: true

Size: 1.38 KB

Versions: 11

Compression:

Stored size: 1.38 KB

Contents

<%= form_for content_element, html: ajax_form_hash("#version_content_element_container_#{dom_id(version)}", insert_method: 'append', sub_class: "AddALineForm", container: "#new_version_content_element_#{dom_id(version)}") do |f| %>
  <%= f.collection_select :content_element_type_id, Pulitzer::ContentElementType.all, :id, :name, {},
  { data: { "revealer" => true, "sub-type" => "FormFieldRevealer", "revealer-children-id" => dom_id(version, :revealer) }} %>

  <div data-revealer-target="<%= dom_id(version, :revealer) %>"></div>

  <div data-revealer_id="<%= dom_id(version, :revealer) %>" data-revealer-triggers="['<%= Pulitzer::ContentElementType.find_by(name: 'Image').id %>']">
    <%= f.label :height %>
    <%= f.text_field :height, placeholder: 'Height' %>
    <%= f.label :width %>
    <%= f.text_field :width, placeholder: 'Width' %>
  </div>

  <div data-revealer_id="<%= dom_id(version, :revealer) %>" data-revealer-triggers="['<%= Pulitzer::ContentElementType.find_by(name: 'Text').id %>']">
    <%= f.label :text_editor, "Text editor" %>
    <%= f.select :text_editor, Pulitzer.text_editor_toolbars.map { |t| t[:name] } %>
  </div>

  <%= f.hidden_field :version_id %>
  <%= f.hidden_field :kind, value: :free_form %>

  <%= submit_tag "Create" %>
  <%= link_to('Cancel', '#', :class => 'button',
    data: { emptier: true, target: "#new_version_content_element_#{dom_id(version)}" } ) %>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pulitzer-0.2.2 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.2.1 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.2.0 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.10 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.9 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.8 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.7 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.6 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.5 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.4 app/views/pulitzer/content_elements/_new.html.erb
pulitzer-0.1.3 app/views/pulitzer/content_elements/_new.html.erb