Commit b6228634

mo k <m@mokhan.ca>
2011-09-18 04:43:02
tidy up more views.
1 parent ad16255
Changed files (3)
app
app/views/profiles/index.html.erb
@@ -2,28 +2,29 @@
   All <%= @profiles.length %> profiles
 <% end %>
 
-<h1>All <%= @profiles.length %> profiles</h1>
+<div class="grid_9 alpha omega">
+  <h1>All <%= @profiles.length %> profiles</h1>
+  <table class="simple-table">
+    <thead>
+      <tr>
+        <th></th>
+        <th>name</th>
+        <th>creations</th>
+        <th>member since</th>
+      </tr>
+    </thead>
+    <tbody>
+      <% @profiles.each do |profile| %>
+        <tr>
+          <td><a href="<%= url_for profile_path(profile) %>"><%= image_tag avatar_url(profile), :class => "photo", :alt => profile.name %></a></td>
+          <td><%= link_to profile.name, profile_path(profile) %></td>
+          <td><a href="<%= url_for profile_path(profile) %>"><%= profile.creations.length %>creations</a></td>
+          <td><%= profile.created_at %></td>
+        </tr>
+      <% end %>
+    </tbody>
+  </table>
 
-<table class="simple-table">
-  <thead>
-    <tr>
-      <th></th>
-      <th>name</th>
-      <th>creations</th>
-      <th>member since</th>
-    </tr>
-  </thead>
-  <tbody>
-  <% @profiles.each do |profile| %>
-    <tr>
-      <td><a href="<%= url_for profile_path(profile) %>"><%= image_tag avatar_url(profile), :class => "photo" %></a></td>
-      <td><%= link_to profile.name, profile_path(profile) %></td>
-      <td><a href="<%= url_for profile_path(profile) %>"><%= profile.creations.length %> creations</a></td>
-      <td><%= profile.created_at %></td>
-    </tr>
-  <% end %>
-  </tbody>
-</table>
-
-<hr class="clear" />
-<p> <%= paginate @profiles %> </p>
+  <p> <%= paginate @profiles %> </p>
+</div>
+<div class="clear" />
app/views/profiles/show.html.erb
@@ -2,22 +2,21 @@
   <%= @profile.name %>
 <% end %>
 
-<%= image_tag avatar_url(@profile) + '&s=200', :class => ['photo', 'floatLeft'] %> 
-<h1><%= @profile.name %></h1>
-<p><em>A member since <%= @profile.created_at %>, with <%= @profile.creations.length %> creations.</em></p>
-<% if @profile == current_user %>
-  <a href="http://en.gravatar.com/">change your photo</a>
-<% end %>
-
-<hr />
+<div class="grid_9 alpha omega">
+  <div class="grid_5 alpha">
+    <h1><%= @profile.name %></h1>
+    <p><em>A member since <%= @profile.created_at %>, with <%= @profile.creations.length %> creations.</em></p>
+    <% if @profile == current_user %>
+      <a href="http://en.gravatar.com/">change your photo</a>
+    <% end %>
+  </div>
+  <div class="grid_4 omega">
+    <%= image_tag avatar_url(@profile) + '&s=200', :class => ['photo'] %> 
+  </div>
 
-<% @profile.creations.reverse.each_with_index do |creation, index| %>
-  <div class="product_box">
+  <% @profile.creations.reverse.each_with_index do |creation, index| %>
     <h2><%= creation.name %></h2>
-    <a href="<%= url_for creation %>">
-      <%= image_tag creation.image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt => creation.name %>
-    </a>
+    <a href="<%= url_for creation %>"><%= image_tag creation.image_url.to_s, :class => "photo", :alt => creation.name %></a>
     <p><%= creation.short_story %> <%= link_to 'more', creation %></p>
+  <% end %>
 </div>
-<% end %>
-
app/views/registrations/edit.html.erb
@@ -2,36 +2,61 @@
   Update My Account
 <% end %>
 
-<%= link_to "my other authentications", authentications_path, :class => 'floatRight' %>
-<h1>Update My Account</h1>
-<p>
-If you prefer not to change your password, then just leave it blank.
-</p>
-<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
-  <%= devise_error_messages! %>
+<div class="grid_9 alpha omega">
+  <div class="grid_6 alpha">
+
+    <h1>Update My Account</h1>
+    <p>
+    If you prefer not to change your password, then just leave it blank.
+    </p>
+    <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
+      <%= devise_error_messages! %>
+
+      <fieldset>
+        <p>
+        <%= f.label :name, :style => 'display:block;' %>
+        <%= f.text_field :name %>
+        </p>
+
+        <p>
+        <%= f.label :email, :style => 'display:block;' %>
+        <%= f.email_field :email %>
+        </p>
+
+        <p>
+        <%= f.label :password, :style => 'display:block;' %> 
+        <%= f.password_field :password %>
+        </p>
+
+        <p>
+        <%= f.label :password_confirmation, :style => 'display:block;' %>
+        <%= f.password_field :password_confirmation %>
+        </p>
+
+        <p>
+        <%= f.label :current_password, :style => 'display:block;' %>
+        <%= f.password_field :current_password %>
+        </p>
+
+        <input type="submit" value="update" />
+      </fieldset>
+    <% end %>
+  </div>
+
+  <div class="grid_3 omega">
+    <div class="helpbox">
+      <h4>other</h4>
+      <ul>
+        <li><%= link_to "my other authentications", authentications_path %></li>
+        <li><a href="http://en.gravatar.com/">change your photo</a></li>
+      </ul>
+    </div>
+    <div class="helpbox">
+      <h4>Cancel My Account</h4>
+      <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %></p>
+    </div>
+  </div>
+</div>
+<div class="clear" />
 
-  <fieldset class="cute_form">
-  <%= f.label :name %>
-  <%= f.text_field :name, :class => "forms" %>
 
-  <%= f.label :email %>
-  <%= f.email_field :email, :class => "forms"  %>
-
-  <%= f.label :password %> 
-  <%= f.password_field :password, :class => "forms"  %>
-
-  <%= f.label :password_confirmation %>
-  <%= f.password_field :password_confirmation, :class => "forms"  %>
-
-  <%= f.label :current_password %>
-  <%= f.password_field :current_password, :class => "forms"  %>
-
-  <input type="image" src="/images/template/button_submit.gif" class="submit_button" />
-  </fieldset>
-<% end %>
-
-<h2>Cancel My Account</h2>
-
-<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %></p>
-
-<%= link_to "Back", :back %>