Sha256: 1f6ebc5bb46f8f35716fd2f85a9a0fb58984cc2f60775952bde49a341e9fd74e

Contents?: true

Size: 1.49 KB

Versions: 5

Compression:

Stored size: 1.49 KB

Contents

<table id="results">
  <thead>
    <tr class="header">
      <% if @references %>
        <th>Key</th>
        <th>Master translation [<%= I18n.default_locale %>]</th>
      <% else %>
        <th>Key</th>
      <% end %>
      <th>Content [<%= I18n.locale %>]</th>
    </tr>
  </thead>
  <tbody>
    <% unless @references %>
      <% @translations.each do |x| %>
        <tr>
          <td class='key'><%= x.key %></td>
          <td class="content" id="translation_<%= x.id %>">
            <%= best_in_place x, :value,
                :type => :textarea,
                :path => translation_path(x),
                :activator => "#translation_#{x.id}",
                :sanitize => false %>
          </td>
        </tr>
      <% end %>
    <% else %>
      <% @references.each do |x| %>
        <% trans = @translations.detect{|y| y.key == x.key} %>
        <tr<%= " id='translation_#{trans.id}'" if trans %>>
          <td style='width:5%'><%= x.key %></td>
          <td style='width:50%'><%= x.value %></td>
          <td style='width:50%'>
            <% if trans %>
              <%= best_in_place trans, :value,
                  :type => :textarea,
                  :path => translation_path(trans),
                  :activator => "#translation_#{trans.id}",
                  :sanitize => false %>
            <% else %>
              <%= link_to "Create this missing translation", missing_translations_path %>
            <% end %>
          </td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
interpret-1.1.1 app/views/interpret/translations/_listing.html.erb
interpret-1.1.0 app/views/interpret/translations/_listing.html.erb
interpret-1.0.2 app/views/interpret/translations/_listing.html.erb
interpret-1.0.1 app/views/interpret/translations/_listing.html.erb
interpret-1.0.0 app/views/interpret/translations/_listing.html.erb