orbit-4-2/app/views/admin/designs/_images.html.erb

41 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

<table id='image_list' class="table table-striped">
<thead>
<tr>
<th class="span1"><%= t(:name) %></th>
<th class="span1"><%= t(:image) %></th>
<th class="span1"><%= t(:size) %></th>
<th class="span4"><%= t(:url) %></th>
</tr>
</thead>
<tbody id="tbody_assets" class="sort-holder">
<%= render :partial => 'image', :collection => @design.images %>
</tbody>
</table>
<div class="modal hide fade" id="imageModal" tabindex="-1" role="dialog" aria-labelledby="imageModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="imageModalLabel"><%= t(:add_image) %></h3>
</div>
<%= form_for :image, :url => upload_image_admin_design_path, :html => {:id => 'ajaxForm', :class => 'form-horizontal'}, :method => :post do |f| %>
<div class="modal-body">
<div class="control-group">
<%= f.label :image, t(:image), :class => "control-label" %>
<div class="controls">
<%= f.file_field :file %>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= t(:close) %></button>
<%= f.submit t(:add), :class => "btn btn-primary" %>
</div>
<% end %>
</div>
<div class="form-actions form-fixed pagination-right">
<button class="btn btn-primary" href="#imageModal" data-toggle="modal"><%= t(:add) %></button>
</div>