Skip to content
Permalink
Browse files

Changing translatable_attributes call to be object specific, rather t…

…han class (doesn't include dynamic translatable_attributes) from the beginning of template. The border divides all fields now.
  • Loading branch information...
Walter McGinnis
Walter McGinnis committed Dec 14, 2010
1 parent 9b182a5 commit 47c70e215c1ed32bacb903e9e0e652cdb1c4fbf4
Showing with 4 additions and 3 deletions.
  1. +4 −3 app/views/translations/_form.html.erb
@@ -1,4 +1,6 @@
<% translatable = @translatable.present? ? @translatable : @translated %>
<% translatable = @translatable.present? ? @translatable : @translated
translatable_attributes = translatable.translatable_attributes -%>

<h2 style="margin:0 0 10px 0;">
<%= I18n.t('translations.form.translate_from_and_to',
:from => TranslationsHelper::available_locales[translatable.original_locale],
@@ -15,13 +17,12 @@
<th colspan="2" style="width: 48%;">
<h3 style="margin:0 0 10px 0;"><%= TranslationsHelper::available_locales[translatable.original_locale] %></h3>
</th>
<th rowspan="<%= @translatable_class.translatable_attributes.size + 1 %>" style="width:1px; border-left: 1px solid #000; padding: 0; margin: 0"></th>
<th rowspan="<%= translatable_attributes.size + 1 %>" style="width:1px; border-left: 1px solid #000; padding: 0; margin: 0"></th>
<th colspan="3" style="width: 48%;">
<h3 style="margin:0 0 10px 0;"><%= TranslationsHelper::available_locales[@translation.locale] %></h3>
</th>
</tr>

<% translatable_attributes = @translatable.present? ? @translatable.translatable_attributes : @translated.translatable_attributes %>
<% translatable_attributes.each do |attribute_key| %>
<tr>
<% untranslated_value = untranslated_values_with_localized_labels.find { |l| l[:attribute_key] == attribute_key }

0 comments on commit 47c70e2

Please sign in to comment.
You can’t perform that action at this time.