Commit 820525f0

mo k <mo@mokhan.ca>
2013-02-09 19:39:43
make the profile image a link that pops up the change avatar dialog.
1 parent e8abe4e
Changed files (3)
app
assets
javascripts
views
creations
registrations
app/assets/javascripts/users_edit.js
@@ -3,7 +3,6 @@ var DeviseUsers = DeviseUsers || {};
 DeviseUsers.Edit = {
   initialize: function($){
     $('#edit_user').validate();
-    $('#change-picture').popover({ });
     $('#user_city').autocomplete({
       source: function(request, response){
         $.ajax({
app/views/creations/index.html.erb
@@ -29,31 +29,25 @@
   </div>
   <div class="row">
     <div class="span12">
-
       <div class="marketing">
         <div class="row">
           <div class="span4">
-            <%#<img class="bs-icon" src="/assets/cupcake_share.png" alt="share your creativity" style="margin-left:auto;margin-right:auto;display:block;" />%>
             <h2 style="text-align:center;font-weight:bold;">Share your creativity</h2>
             <p style="text-align:center;">Show off your originality and find interesting ideas with fellow passionate CakeSide artists.</p>
           </div>
           <div class="span4">
-            <%#<img class="bs-icon" src="/assets/cupcake_promote.png" alt="promote yourself" style="margin-left:auto;margin-right:auto;display:block;" />%>
             <h2 style="text-align:center;font-weight:bold;">Promote yourself</h2>
             <p style="text-align:center;">Get recognized for your work and connect with other artists with unique styles. </p>
           </div>
           <div class="span4">
-            <%#<img class="bs-icon" src="/assets/cupcake_inspire.png" alt="inspire a community" style="margin-left:auto;margin-right:auto;display:block;" />%>
             <h2 style="text-align:center;font-weight:bold;">Inspire a community</h2>
             <p style="text-align:center;">Upload creations, teach with tutorials, and create a vibrant community for everything cake.</p>
           </div>
         </div>
-
       </div>
     </div>
   </div>
 <% end -%>
-
 <div class="row">
   <div class="span12">
     <div id="creations-div" class="row">
app/views/registrations/edit.html.erb
@@ -10,12 +10,10 @@ $(function(){ DeviseUsers.Edit.initialize(jQuery); });
   <div class="row">
     <div class="span3">
       <div class="thumbnail">
-        <%= avatar_for current_user %>
+        <a href="#change-avatar-dialog" data-toggle="modal"><%= avatar_for current_user %></a>
         <div class="caption">
           <h5><%= current_user.name %></h5>
-          <p>member since: <%= current_user.created_at.to_s :foomat %></p>
           <p>last signed in: <%= current_user.last_sign_in_at.to_s :foomat %></p>
-          <%#<p><a id="change-picture" data-content="We use gravatar to display your profile picture. This is a friendly third party service that allows you to manage your profile picture associated with your email address." rel="popover" class="btn btn-primary" href="http://gravatar.com/emails" data-original-title="Gravatar">Change My Picture</a></p>%>
           <p><a id="change-avatar" class="btn btn-primary" data-toggle="modal" href="#change-avatar-dialog">Change My Picture</a></p>
           <p><a id="change-password-button" class="btn btn-primary" data-toggle="modal" href="#change-password-dialog">Change My Password</a></p>
         </div>
@@ -31,7 +29,6 @@ $(function(){ DeviseUsers.Edit.initialize(jQuery); });
       <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete, :class => "btn btn-danger" %></p>
     </div>
     <div class="span9">
-      <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, :class=> "form-horizontal" }) do |f| %>
         <fieldset>
           <legend>Update your settings</legend>
@@ -96,8 +93,8 @@ $(function(){ DeviseUsers.Edit.initialize(jQuery); });
         <% end %>
       </div>
       <div class="modal-footer">
-        <a href="#" class="btn" data-dismiss="modal">Close</a>
         <input type="submit" class="btn btn-primary" value="Save changes" />
+        <a href="#" class="btn" data-dismiss="modal">Close</a>
       </div>
     <% end %>
   </div>
@@ -114,8 +111,8 @@ $(function(){ DeviseUsers.Edit.initialize(jQuery); });
         <%= f.password_field :password_confirmation %>
       </div>
       <div class="modal-footer">
-        <a href="#" class="btn" data-dismiss="modal">Close</a>
         <%= f.submit "Change My Password", :class=>"btn btn-primary" %>
+        <a href="#" class="btn" data-dismiss="modal">Close</a>
       </div>
     <% end %>
   </div>