% if lcase.rules.empty? %>
<% if rule_index == 0 %> <%=image_tag('tr8n/arrow_up_grey.png') %> <% else %> <%=link_to_function(image_tag('tr8n/arrow_up.png'), "moveLanguageCaseRule('#{case_index}', '#{rule_index}', 'up')") %> <% end %> <% if rule_index == lcase.language_case_rules.size - 1 %> <%=image_tag('tr8n/arrow_down_grey.png') %> <% else %> <%=link_to_function(image_tag('tr8n/arrow_down.png'), "moveLanguageCaseRule('#{case_index}', '#{rule_index}', 'down')") %> <% end %> <%=link_to_function(image_tag("tr8n/add.png"), "addLanguageCaseRule('#{case_index}', '#{rule_index+1}')", :id => "language_case_edit_link_#{rule_index}")%> | <%=rule_index+1%>. <%=rule.description %> <% rule_prefix = "cases[#{case_index}][rules][#{rule_index}]" %> <%=hidden_field_tag("#{rule_prefix}[position]", rule_index)%> <%=hidden_field_tag("#{rule_prefix}[definition][gender]", rule.definition[:gender])%> <%=hidden_field_tag("#{rule_prefix}[definition][part1]", rule.definition[:part1])%> <%=hidden_field_tag("#{rule_prefix}[definition][value1]", rule.definition[:value1])%> <%=hidden_field_tag("#{rule_prefix}[definition][multipart]", rule.definition[:multipart].to_s)%> <%=hidden_field_tag("#{rule_prefix}[definition][operator]", rule.definition[:operator])%> <%=hidden_field_tag("#{rule_prefix}[definition][part2]", rule.definition[:part2])%> <%=hidden_field_tag("#{rule_prefix}[definition][value2]", rule.definition[:value2])%> <%=hidden_field_tag("#{rule_prefix}[definition][operation]", rule.definition[:operation])%> <%=hidden_field_tag("#{rule_prefix}[definition][operation_value]", rule.definition[:operation_value])%> | <%=link_to_function(image_tag("tr8n/pencil.png"), "editLanguageCaseRule('#{case_index}', '#{rule_index}')", :id => "language_case_edit_link_#{rule_index}")%> <%=link_to_function(image_tag("tr8n/cross.png"), "deleteLanguageCaseRule('#{case_index}', '#{rule_index}')")%> |