This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/attributes/_attribute_field.html.erb

45 lines
1.9 KiB
Plaintext

<tr id="<%= "attribute_#{attribute_field.id}" if !attribute_field.new_record? %>" class="list_item">
<td><%= attribute_field.new_record? ? (f.text_field :key) : attribute_field.key %></td>
<td class='select_mulitlingual' style='text-align:center'>
<%= f.check_box :locale %>
</td>
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<td><%= f.text_field locale, :style => "width:130px", :value => (attribute_field.title_translations[locale] rescue nil) %></td>
<% end %>
<% end %>
<td class='select_type'>
<ul>
<li>markup<%= f.select :markup, LIST[:markups].keys, {}, {:style => "width:90px"} %> </li>
<li>markup_value<%= f.text_field :markup_value,:size=>50 %></li>
<li>markup_options<%= f.text_field :markup_options,:size=>50 %></li>
<li>locale<%= f.check_box :locale,{},true,false %></li>
<li>built_in<%= f.check_box :built_in,{},true,false %></li>
<li>disabled<%= f.check_box :disabled,{},true,false %></li>
<li>add_more<%= f.check_box :add_more,{},true,false %></li>
<li>neutral_title<%= f.text_field :neutral_title,:size=>50 %></li>
<!--
<li><%#= attribute_field[:markup].eql?('select') ? nil : "style='display:none'"%> </li>
<li><%#= t('admin.options') %>: <%#= f.text_field :markup_value%></li>
-->
</ul>
</td>
<td class="action">
<% if attribute_field.new_record? %>
<a href="#" class="delete"><%= t(:delete) %></a>
<% else %>
<%= f.hidden_field :id %>
<% if attribute_field.is_built_in? %>
<a href="#" class="switch" id="<%= attribute_field.id %>"></a>
<%= f.hidden_field :disabled, :value => attribute_field.is_disabled? , :class => 'built_in_state' %>
<% else %>
<a href="#" class="remove_existing_record delete"><%= t(:delete) %></a>
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>
<% end %>
</td>
</tr>