Sha256: 84e586a8d458cc8bb267d5e38896c3d5544aad244a94dcb77749ad3081a5491d

Contents?: true

Size: 819 Bytes

Versions: 5

Compression:

Stored size: 819 Bytes

Contents

<%= semantic_form_for @asset do |f| %>
  <%= f.inputs do %>
    <%= f.input :name, :label => 'Name (Alernative text)' %>
    <%= f.input :file, :as => :file %>
    <%= f.input :retained_file, :as => :hidden %>
    <% if @asset.file %>
    <div>
      <div><%= link_to "Copy URL", image_url(@asset.file.url), class: "btn btn-primary btn-xs copy-to-clipboard", data: { 'clipboard-text' => image_url(@asset.file.url) } %></div>
      <% if @asset.file_type == :image %>
        <img src="<%= @asset.file.thumb("300x300").url %>" alt="">
      <% elsif @asset.file_type == :direct_image %>
        <%= image_tag @asset.file.remote_url, width: 300, alt: '' %>
      <% else %>
        <%= image_tag file_type_icon(@asset), alt: '' %>
      <% end %>
    </div>
    <% end %>
  <% end %>
  <%= f.actions :submit %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
smithycms-0.5.99.3 app/views/smithy/assets/_form.html.erb
smithycms-0.5.99.2 app/views/smithy/assets/_form.html.erb
smithycms-0.5.99.1 app/views/smithy/assets/_form.html.erb
smithycms-0.5.99 app/views/smithy/assets/_form.html.erb
smithycms-0.5.2 app/views/smithy/assets/_form.html.erb