OSDN Git Service

t#30199:update i18n error caption
[pettanr/pettanr.git] / app / views / comics / _form.html.erb
index c8e1fb6..8f4ca29 100644 (file)
@@ -1,31 +1,17 @@
 <%= form_for(@comic) do |f| %>
-  <% if @comic.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@comic.errors.count, "error") %> prohibited this comic from being saved:</h2>
-
-      <ul>
-      <% @comic.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <%= render 'system/error_explanation', :obj => @comic %>
 
   <div class="field">
-    <%= f.label :title %><br />
-    <%= f.text_field :title %>
+    <%= f.label :author_id %><br />
+    <%= h @author.name %>
   </div>
   <div class="field">
-    <%= f.label :width %><br />
-    <%= f.number_field :width %>
-  </div>
-  <div class="field">
-    <%= f.label :height %><br />
-    <%= f.number_field :height %>
+    <%= f.label :title %><br />
+    <%= f.text_field :title %>
   </div>
   <div class="field">
     <%= f.label :visible %><br />
-    <%= f.collection_select :visible, [['only me', 0], ['everyone', 3]], :last, :first, :html => {:selected => @comic.visible} %>
+    <%= f.collection_select :visible, t_select_items(MagicNumber['comic_visible_items']), :last, :first, :html => {:selected => @comic.visible} %>
   </div>
 
   <div class="actions">