2014-06-12 10:27:26 +00:00
|
|
|
|
<% # encoding: utf-8 %>
|
|
|
|
|
<%= form_for(@set_level_type, remote: true, url: @level_type_url) do |f| %>
|
|
|
|
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
<h3 id="myModalLabel"><%= (@set_level_type.new_record? ? 'Add 等級' : 'Edit 等級') %></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<label for="http" class="control-label">Key</label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<%= f.text_field :key %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<%= f.fields_for :title_translations do |f| %>
|
|
|
|
|
<% @site_in_use_locales.each do |locale| %>
|
|
|
|
|
|
|
|
|
|
<div class="control-group">
|
2014-06-18 07:52:17 +00:00
|
|
|
|
<%= label_tag "link-#{locale}", "Name-#{t(locale).to_s}", :class => 'control-label' %>
|
2014-06-12 10:27:26 +00:00
|
|
|
|
<div class="controls">
|
|
|
|
|
<%= f.text_field locale, :class => 'control-label', :value => (@set_level_type.title_translations[locale] rescue nil) %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<%= hidden_field_tag 'journal_paper[journal_level]', @set_level_type.id %>
|
|
|
|
|
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
|
|
|
|
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|