-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathindex.html.erb
56 lines (54 loc) · 2.4 KB
/
index.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<h1>Incomming localizations</h1>
<input type="hidden" id="source_id" value="<%= @source.id %>">
<div class="container">
<div class="row inline-headers">
<h4 class="<%= source_loading_class(@source) %>">Synchronization in progress, please wait. The page will refresh automatically when done.</h2>
<span class="pull-right">
<%= link_to accept_all_source_incomming_localizations_path(@source), :class=>"btn btn-success btn-sm", :data=>{:confirm=>t('lit.common.you_sure', :default=>"Are you sure?")} do %>
<%= I18n.t('lit.common.accept_all', :default=>"Accept all") %>
<% end %>
<%= link_to reject_all_source_incomming_localizations_path(@source), :class=>"btn btn-danger btn-sm", :method=>:post, :data=>{:confirm=>t('lit.common.you_sure', :default=>"Are you sure?")} do %>
<%= I18n.t('lit.common.reject_all', :default=>"Reject all") %>
<% end %>
</span>
</div>
</div>
<table class="table table-bordered table-striped incomming-localizations-table">
<tr>
<th>Current value</th>
<th>Imported value</th>
<th>Is deleted</th>
<th width="200px"></th>
</tr>
<% @incomming_localizations.each do |il| %>
<tr data-id="<%= il.id %>">
<td colspan="3">
<%= il.locale_str %>
<strong><%= il.full_key %></strong>
</td>
</tr>
<tr data-id="<%= il.id %>">
<td>
<% if il.localization %>
<%= render partial: '/lit/localization_keys/localization_row', locals: {localization: il.localization.translation} %>
<% end %>
</td>
<td>
<%= render partial: '/lit/localization_keys/localization_row', locals: {localization: il.translation} %>
</td>
<td>
<%= il.localization_key_is_deleted %>
</td>
<td>
<%= link_to accept_source_incomming_localization_path(@source, il, format: :js), class: 'btn btn-success btn-sm', remote: true do %>
<%= draw_icon 'check', class: 'icon-white' %>
<%= I18n.t('lit.common.accept', default: 'Accept') %>
<% end %>
<%= link_to source_incomming_localization_path(@source, il, format: :js), class: 'btn btn-danger btn-sm', remote: true, method: :delete, data: {confirm: I18n.t('lit.common.you_sure', default: 'Are you sure?')} do %>
<%= draw_icon 'times', class: "icon-white" %>
<%= I18n.t('lit.common.reject', :default=>"Reject") %>
<% end %>
</td>
</tr>
<% end %>
</table>