-<h1>Listing original_pictures</h1>
+<h1><%= t '.title' -%></h1>
<%= render 'uploader' %>
<table>
<tr>
- <th>picture</th>
- <th>revisions</th>
- <th>filename</th>
- <th>Width</th>
- <th>Height</th>
- <th>filesize</th>
- <th>md5</th>
- <th>history</th>
+ <th><%= t_m 'OriginalPicture' -%></th>
+ <th><%= t 'original_pictures.index.history' -%></th>
+ <th><%= t 'original_pictures.index.status' -%></th>
+ <th><%= t_m 'ResourcePicture' -%></th>
+ <th><%= -%></th>
+ <th><%= -%></th>
</tr>
-<% @original_pictures.each do |original_picture| %>
- <div>
- </div>
- <tr>
- <td>
- <%= link_to tag(:img, original_picture.tmb_opt_img_tag), original_picture %>
- </td>
- <td><%= original_picture.pictures.empty? ? '' : original_picture.history.first.revision %></td>
- <td><%= original_picture.filename %></td>
- <td><%= original_picture.width %></td>
- <td><%= original_picture.height %></td>
- <td><%= original_picture.filesize %></td>
- <td><%= original_picture.md5 %></td>
- <td><%= link_to '...', :controller => 'original_pictures', :action => :history, :id => original_picture.id %></td>
- </tr>
-<% end %>
+ <% @original_pictures.each do |original_picture| %>
+ <tr>
+ <td>
+ <%= link_to tag(:img, original_picture.tmb_opt_img_tag), original_picture %>
+ </td>
+ <td>
+ <% if original_picture.pictures.empty? %>
+ -
+ <% else %>
+ <%= link_to original_picture.history.first.revision, history_original_picture_path(original_picture) %>
+ <% end %>
+ </td>
+ <td>
+ </td>
+ <td>
+ <% if original_picture.resource_picture %>
+ <%= link_to t('original_pictures.index.stop'), original_picture.resource_picture, confirm: 'Are you sure?', method: :delete %>
+ <% else %>
+ <% end %>
+ </td>
+ <td>
+ <%= link_to t('original_pictures.index.destroy'), original_picture, confirm: 'Are you sure?', method: :delete %>
+ </td>
+ </tr>
+ <% end %>
</table>
<%= link_to 'open form', new_original_picture_path, :remote => true %>
<div id="uploader">
- uploader
+ ...
</div>