orbit-personalproject/app/views/panel/personal_project/back_end/project_categorys/_form.html.erb

30 lines
847 B
Plaintext

<% # encoding: utf-8 %>
<%= form_for(@project_category, :remote => true, :url => @url) do |f| %>
<h2><%= (@project_category.new_record? ? 'Add' : 'Edit') %></h2>
<div id="widget-title">
<%= f.label :key %>
<%= f.text_field :key %>
</div>
<div id="widget-title">
<%= f.fields_for :title_translations do |f| %>
<% @site_in_use_locales.each do |locale| %>
<div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@web_link_category.title_translations[locale] rescue nil) %>
</div>
</div>
<% end %>
<% end %>
</div>
<div class="form-actions">
<%= f.submit 'Submit/送出', :class=>'btn btn-primary' %>
</div>
<% end %>