app/views/lolita/i18n/index.html.haml in lolita-i18n-0.5.2 vs app/views/lolita/i18n/index.html.haml in lolita-i18n-0.5.3
- old
+ new
@@ -9,32 +9,34 @@
.list
%div.actions
.filters
= check_box_tag "show_untranslated", nil, params[:show_untranslated]
= label_tag "show_untranslated", ::I18n.t('lolita-i18n.show-untranslated', :default => ::I18n.t('lolita-i18n.show-untranslated'))
+ = check_box_tag "show_with_url", nil, params[:show_with_url]
+ = label_tag "show_with_url", ::I18n.t('lolita-i18n.show-with-url', :default => ::I18n.t('lolita-i18n.show-with-url'))
%table
%thead
%tr
%th{:style => "width:450px"}
- if locale_options.size > 1
= select_tag :active_locale, options_for_select(locale_options,@active_locale.to_sym), :id => "active_locale"
%th{:style => "width:90%"}= raw(sort_link)
%tbody
- active_locale = @active_locale
- @translations.each do |key,value|
- - if @active_locale && any_translation_visible?(value[:translation])
+ - if @active_locale && any_translation_visible?(value[:translation], value[:url])
%tr
- if value[:original_translation].is_a?(Hash) || value[:original_translation].is_a?(Array)
%td.grouped{:colspan => "2"}
%table
- if value[:original_translation].is_a?(Hash)
- value[:original_translation].each do |c_key,c_value|
- - if translation_visible?(value[:translation][c_key])
+ - if translation_visible?(value[:translation][c_key], value[:url])
%tr
- = raw(translation(@active_locale,"#{key}.#{c_key}",key,value[:translation][c_key],c_value))
+ = raw(translation(@active_locale,"#{key}.#{c_key}",key,value[:translation][c_key],c_value,value[:url]))
- else
- value[:original_translation].each_with_index do |c_value,index|
- - if translation_visible?(value[:translation][index])
+ - if translation_visible?(value[:translation][index], value[:url])
%tr
- = raw(translation(@active_locale, "#{key}[#{index}]", key, value[:translation][index], c_value))
+ = raw(translation(@active_locale, "#{key}[#{index}]", key, value[:translation][index], c_value,value[:url]))
- else
- = raw(translation(@active_locale, key, key, value[:translation], value[:original_translation]))
\ No newline at end of file
+ = raw(translation(@active_locale, key, key, value[:translation], value[:original_translation],value[:url]))