orbit-basic/app/views/admin/attributes/_attribute_field.html.erb

42 lines
2.2 KiB
Plaintext
Raw Normal View History

2011-12-23 10:34:21 +00:00
<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>
2012-07-25 21:58:09 +00:00
<%= f.fields_for :title_translations do |f| %>
<% @site_in_use_locales.each do |locale| %>
2012-07-25 21:58:09 +00:00
<td><%= f.text_field locale, :style => "width:130px", :value => (attribute_field.title_translations[locale] rescue nil) %></td>
2011-12-23 10:34:21 +00:00
<% end %>
<% end %>
<td class='select_type'>
2012-10-08 08:58:33 +00:00
<ul>
2012-11-27 03:15:15 +00:00
<li><%= t(:markup) %> : <%= f.select :markup, LIST[:markups].keys, {}, {:style => "width:90px"} %> </li>
<li><%= t(:markup_value) %> : <%= f.text_field :markup_value,:size=>50 %></li>
<li><%= t(:markup_options) %> : <%= f.text_field :markup_options,:size=>50 %></li>
<li><%= t(:locale) %> : locale<%= f.check_box :locale,{},true,false %></li>
<li><%= t(:built_in) %> : built_in<%= f.check_box :built_in,{},true,false %></li>
<li><%= t(:disabled) %> : disabled<%= f.check_box :disabled,{},true,false %></li>
<li><%= t(:add_more) %> : add_more<%= f.check_box :add_more,{},true,false %></li>
<li><%= t(:neutral_title) %> : neutral_title<%= f.text_field :neutral_title,:size=>50 %></li>
<li><%= t(:neutral_for) %> : neutral_for<%= f.select :neutral_for, VALID_LOCALES, {}, {:style => "width:90px"} %> </li>
<!--
<li><%#= attribute_field[:markup].eql?('select') ? nil : "style='display:none'"%> </li>
Merge branch 'various_bugs' into nccu_master Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
2012-10-29 08:10:07 +00:00
<li><%#= t(:options) %>: <%#= f.text_field :markup_value%></li>
-->
2012-10-08 08:58:33 +00:00
</ul>
2011-12-23 10:34:21 +00:00
</td>
<td class="action">
<% if attribute_field.new_record? %>
2012-11-27 03:15:15 +00:00
<a href="#" class="delete"><%= t(:delete_) %></a>
2011-12-23 10:34:21 +00:00
<% 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 %>
2012-11-27 03:15:15 +00:00
<a href="#" class="remove_existing_record delete"><%= t(:delete_) %></a>
2011-12-23 10:34:21 +00:00
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>
<% end %>
</td>
</tr>