Commit 54074347

mo khan <mo@mokhan.ca>
2013-07-01 20:47:26
redirect people to the settings page after they first register
1 parent 5a312b4
Changed files (6)
app/controllers/registrations_controller.rb
@@ -16,6 +16,6 @@ class RegistrationsController < Devise::RegistrationsController
   end
 
   def after_sign_in_path_for(resource)
-    edit_user_registration_path
+    settings_path
   end
 end
app/views/avatars/edit.html.erb
@@ -3,7 +3,7 @@
 <div class="row">
   <div class="span12">
     <%= avatar_for(current_user) %>
-    <%= form_for(avatar_path(@avatar), :method => :put, :multipart => true) do |f| %>
+    <%= form_for(@avatar, :url =>avatar_path(@avatar), :method => :put, :multipart => true) do |f| %>
       <div class="control-group">
         <div class="controls">
           <%= f.file_field :avatar %>
app/views/creations/mine.html.erb
@@ -1,7 +1,12 @@
 <%= render :partial => "shared/account_nav", :locals => { :selected => :creations } %>
 <div class="row">
   <div class="span12">
-    <h1><%= @user.name %> <small>A member since <%= @user.created_at.to_s :foomat %>, with <%= @user.creations.length %> creations.</small> </h1>
+    <%= link_to "Upload Cake", new_creation_path, :class => "btn pull-right" %>
+    <% unless @creations.any? %>
+      <p>You haven't uploaded any cakes yet. <%= link_to "Get Started", new_creation_path %>.</p>
+    <% end %>
+  </div>
+  <div class="span12">
     <%= render "shared/creation_image_gallery" %>
   </div>
 </div>
app/views/favorites/index.html.erb
@@ -1,10 +1,8 @@
 <% provide(:title, "#{@creation.name} by #{@creation.user.name} - fanclub") -%>
 <div class="row">
-  <div class="span3">
-    <a class="thumbnail" href="<%= url_for creation_path(@creation) %>"><img src="<%= @creation.primary_image.image.thumb.url %>" alt="<%= @creation.name %>" /></a>
-  </div>
-  <div class="span9">
-    <h1> fans of  <%= link_to @creation.name, creation_path(@creation) %> <small> submitted by <%= link_to @creation.user.name, profile_path(@creation.user) %> </small> </h1>
+  <div class="span12">
+    <h1> fans of  <%= link_to @creation.name, creation_path(@creation) %> </h1>
+    <p><%= link_to "Back to creations", mine_creations_path %></p>
     <ul class="thumbnails">
       <% @creation.favorites.each do |favorite| %>
         <li class="span3">
app/views/photos/_form.html.erb
@@ -14,18 +14,12 @@
   });
 </script>
 <% end %>
-<div>
   <%= form_for [@creation, @photo], :html => { :multipart => true, :id => "fileupload"  } do |f| %>
     <div class="row fileupload-buttonbar">
+      <div class="span10">&nbsp;</div>
       <div class="span2">
-        <span class="btn btn-success fileinput-button"><i class="icon-plus icon-white"></i><span> Add image... </span><%= f.file_field :image %></span>
-      </div>
-      <div class="span8">
-            <h5>When images are finished uploading below, click on DONE -&gt;
-            </h5>
-      </div>
-      <div class="span2">
-        <%= link_to "DONE", creation_path(@creation), :class => "btn btn-primary" %>
+        <span class="btn btn-success fileinput-button"><i class="icon-plus icon-white"></i><span> Browse... </span><%= f.file_field :image %></span>
+        <%= link_to "NEXT", creation_path(@creation), :class => "btn btn-primary" %>
       </div>
     </div>
     <div class="fileupload-loading"></div>
app/views/photos/new.html.erb
@@ -1,7 +1,7 @@
 <% provide(:title, "Upload images for this creation") -%>
 <div class="row">
   <div class="span12">
-    <h1><small>Upload images for </small> <%= @creation.name %> <small> (Step 2 of 2)</small></h1>
+    <h1><small>Upload images of </small> <%= @creation.name %> <small> (Step 2 of 2)</small></h1>
     <hr>
     <%= render 'form' %>
   </div>