Sha256: 1539078b9fe5b1653d02e369b3950b2ad53a74988029af605645b4bf9701305f

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

<%= f.inputs do %>
  <%= f.input :asset, :collection => Smithy::Asset.order(:name) %>
  <%= f.input :alternate_text %>
<% end %>
<%= f.inputs "Linked Image (optional)" do %>
  <%= f.input :link_url %>
<% end %>
<%= f.inputs "Content (optional)" do %>
  <%= f.input :content, :as => :text, :input_html => { :class => "span12", :id => "image_content-#{f.object.id || 'new'}" }, :hint => "Use markdown syntax for formatting. You can also use HTML directly. <a href=\"#{guide_path('markdown')}\" data-toggle=\"remote-load\" data-target=\"#content-guide\">See our markdown syntax reference</a>".html_safe %>
  <div id="image_content_editor-<%= f.object.id || 'new' %>" class="ace_editor"></div>
  <div id="content-guide"></div>
<% end %>

<% content_for :javascript do %>
  <%= javascript_tag do %>
    var editor = ace_edit('<%= f.object.id || 'new' %>', 'markdown');
    editor.renderer.setShowGutter(false);
  <% end %>
<% end %>

<%= f.inputs "Image Sizing (optional)" do %>
  <%= f.input :width %>
  <%= f.input :height %>
  <%= f.input :image_scaling, :as => :select, :collection => Smithy::Image.image_scaling_options %>
<% end %>
<%= f.inputs "HTML Attributes (optional)" do %>
  <%= f.input :html_attributes %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smithycms-0.5.0 app/views/smithy/images/_form_fields.html.erb
smithycms-0.4.5 app/views/smithy/images/_form_fields.html.erb
smithycms-0.4.4 app/views/smithy/images/_form_fields.html.erb
smithycms-0.4.3 app/views/smithy/images/_form_fields.html.erb