Update categories_order.html.erb

try
This commit is contained in:
chiu 2019-09-18 21:26:08 +08:00
parent 956d51c0e6
commit 0f7d23eb9d
1 changed files with 9 additions and 2 deletions

View File

@ -1,10 +1,17 @@
<% all_locales = I18n.available_locales %> <% all_locales = I18n.available_locales %>
<% count = all_locales.length %> <% count = all_locales.length %>
<table>
<% @cats.each do |cat| %> <% @cats.each do |cat| %>
<tr>
<td>
<% all_locales.each_with_index do |locale,index| %> <% all_locales.each_with_index do |locale,index| %>
<%= "#{cat[0][:title][locale]}" %> <%= "#{cat[0][:title][locale]}" %>
<%= index!=(count-1) ? "/" : ":" %> <%= index!=(count-1) ? "/" : ":" %>
<% end %> <% end %>
</td>
<td>
<input type="number" name="sort_number-<%= cat[0].id %>" value="<%= cat[1].to_s %>"> <input type="number" name="sort_number-<%= cat[0].id %>" value="<%= cat[1].to_s %>">
<br> </td>
<% end %> </tr>
<% end %>
</table>