-
Notifications
You must be signed in to change notification settings - Fork 32
/
asset_translations.html.erb
32 lines (27 loc) · 1.19 KB
/
asset_translations.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<% form_tag asset_translations_url do -%>
<%= select_tag :locale_id, options_from_collection_for_select(Locale.all, :code, :name, @locale.code) -%>
<%= select_tag :translation_option, options_from_collection_for_select(TranslationOption.all, :code, :description, @translation_option.code) -%>
<%= submit_tag 'Go' %>
<% end -%>
<script type="text/javascript">
Event.observe(window, 'load', function() {
myJsProgressBarHandler = new JS_BRAMUS.jsProgressBar($('translate_progress'), 0);
}, false);
</script>
<p>
Asset Translation progress: <span class="progressBar" id="translate_progress"><%= @percentage_translated %></span>
</p>
<h2><%= @translation_option.description %>: <%= @locale.name %></h2>
<% if @asset_translations.empty? -%>
<h3>No records for this criteria.</h3>
<% end -%>
<% for asset in @asset_translations %>
<p>
<%= image_tag(asset, :size => "50x50") %>
<%= link_to(asset, image_path(asset)) %>
<% if !@locale.default_locale? && @translation_option == TranslationOption.translated -%>
<%= image_tag(I18n.ta(asset, :locale => @locale.code), :size => "50x50") %>
<%= link_to(asset, image_path(I18n.ta(asset, :locale => @locale.code))) %>
<% end -%>
</p>
<% end %>