Commit 312c32e

mo khan <mo@mokhan.ca>
2015-03-03 02:50:59
clean up the form on the dashboard.
1 parent 6f97e13
Changed files (2)
app
views
config
locales
app/views/items/index.html.erb
@@ -2,28 +2,18 @@
   <!-- Side Bar -->
   <div class="large-4 small-12 columns">
     <div class="hide-for-small panel">
-      <h3>Header</h3>
-      <h5 class="subheader">Risus ligula, aliquam nec fermentum vitae, sollicitudin eget urna. Donec dignissim nibh fermentum odio ornare sagittis.</h5>
-<%= form_for(@item, url: new_item_path, method: :get) do |f| %>
-  <% if @item.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@item.errors.count, "error") %> prohibited this item from being saved:</h2>
-      <ul>
-      <% @item.errors.full_messages.each do |message| %>
-        <li><%= message %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
-
-  <div class="field">
-    <%= f.label :name %><br>
-    <%= f.text_field :name %>
-  </div>
-  <div class="actions">
-    <%= f.submit class: 'btn' %>
-  </div>
-<% end %>
+      <div class="row">
+        <%= form_for(@item, url: new_item_path, method: :get) do |f| %>
+          <div class="small-12 columns">
+            <label><%= t('.item_name') %>
+              <%= f.text_field :name %>
+            </label>
+          </div> <!-- /.small-12 -->
+          <div class="small-12 columns">
+            <%= f.submit t('.new_item_button'), class: 'button' %>
+          </div> <!-- /.small-12 -->
+        <% end %>
+      </div>
     </div>
 
     <a href="#">
config/locales/en.yml
@@ -20,6 +20,10 @@
 # available at http://guides.rubyonrails.org/i18n.html.
 
 en:
+  items:
+    index:
+      item_name: 'Item name'
+      new_item_button: 'Create item'
   registrations:
     new:
       username: "Username"