nccu-news/app/views/admin/news_admins/_form_dept.html.erb

33 lines
1.2 KiB
Plaintext

<div class="start-line">
<div class="input-prepend input-append">
<span class="add-on icons-pencil" title='<%= t('news.department') %>'></span>
<span class="tab-content">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<span class="tab-pane fade <%= ( i == 0 ) ? "in active" : '' %> <%= locale %>">
<%= f.fields_for :name_translations do |f| %>
<%= f.text_field locale, :class => "input-medium", placeholder: t('news.department'), :value => (form_dept.name_translations[locale] rescue nil) %>
<% end %>
</span>
<% end %>
</span>
<span class="add-on icon-list-ol" title="<%= t(:sort_number) %>"></span>
<span class="tab-content">
<%= f.text_field :sort_number , :class => "input-mini" %>
</span>
<% if form_dept.new_record? %>
<span class="delete_dept add-on btn" title="<%= t(:delete_) %>">
<a class="icon-trash"></a>
</span>
<% else %>
<span class="remove_existing_record add-on btn" title="<%= t(:remove) %>">
<%= f.hidden_field :id %>
<a class="icon-remove"></a>
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
</span>
<% end %>
</div>
</div>