<%= tr8n_with_options_tag(:default_locale => 'en-US', :admin => true) do %> <%= render :partial => "/tr8n/common/header" %> <%= render :partial => "breadcrumb" %>
<%= form_tag({:action => :index}, {:method => :get, :id => "translations_search_form"}) do %> <%=hidden_field_tag(:section_key, @section_key) %>
<%=text_field_tag(:search, params[:search], {:style => "width:90%;font-size:12px;height:20px"})%>
<%=tra("Search phrases", "Phrases search filter header")%> <%=select_tag(:phrase_type, tr8n_options_for_select(Tr8n::TranslationKey.filter_phrase_type_options, params[:phrase_type]), :onChange => "toggleFilterOptions()")%> "> <%=tra("marked as", "Phrases search filter option")%> <%=select_tag(:phrase_status, tr8n_options_for_select(Tr8n::TranslationKey.filter_phrase_status_options, params[:phrase_status]))%> <%=tra("include", "Phrases search filter option")%> <%=select_tag(:phrase_lock, tr8n_options_for_select(Tr8n::TranslationKey.filter_phrase_lock_options, params[:phrase_lock]))%>
<% end %>
<% if @translation_keys.any? %> <%= tr8n_paginator_tag(@translation_keys, 'phrase') %> <% end %> <% @translation_keys.each do |tk| %> <% color = tk.locked? ? "#ECFFEF" : "#FDFDDF" %> <% end %>
<%=tra("Original Phrase")%> <%=tra("Top {language} Translations", nil, :language => tr8n_current_language.native_name) %>
<% if tk.locked? %>
<%=image_tag("tr8n/lock.png", :style=>"width:12px", :title => trla("This phrase is locked"))%>
<% end %> <%=link_to(tk.default_decoration, :action => :view, :translation_key_id => tk.id, :section_key => @section_key)%>
<%=tk.description%>
<% translations = tk.translations_for(tr8n_current_language) %> <% if translations.empty? %> <%= tra("There are no translations for this phrase.") %> <% unless tk.locked? %> <%= tra("Be the first one to [link: translate it].", "", :link => lambda{|str| link_to(str, :controller => "/tr8n/phrases", :action => :view, :translation_key_id => tk.id, :section_key => @section_key)} ) %> <% end %> <% else %> <%= render :partial => "/tr8n/common/translation_votes", :locals => {:translation_key => tk, :translations => translations[0..4], :section_key => @section_key} %> <% end %>
<% if @translation_keys.empty? %>
<%=trla("No phrases found")%>
<% end %> <% if @translation_keys.any? %> <%= render :partial => "/tr8n/common/paginator", :locals => {:objects => @translation_keys, :subject => 'phrase'} %> <% end %>
<%= render :partial => "/tr8n/common/footer" %> <% end %>