Browse Source

Added link for users to update email/password

eperez-timeinput
Jason Denney 11 years ago
parent
commit
d5662284ab
  1. 7
      app/components/app_tab_panel.rb
  2. 3
      app/components/app_tab_panel/javascripts/sign_out.js
  3. 2
      app/views/devise/registrations/edit.html.erb

7
app/components/app_tab_panel.rb

@ -11,6 +11,11 @@ class AppTabPanel < Netzke::Basepack::TabPanel
c.text = "CHECK OUT" if controller.current_user
end
action :change_account_info do |c|
c.icon = :user_edit
c.text = "Change Email/Password"
end
def configure(c)
#all users
@ -56,7 +61,7 @@ class AppTabPanel < Netzke::Basepack::TabPanel
end
end
c.prevent_header = true
c.tbar = [:sign_out, :check_out]
c.tbar = [:sign_out, :check_out, :change_account_info]
c.items = @@app_tab_panel_items
super
end

3
app/components/app_tab_panel/javascripts/sign_out.js

@ -17,5 +17,8 @@
});
}
});
},
onChangeAccountInfo: function(){
window.location.href="users/edit";
}
}

2
app/views/devise/registrations/edit.html.erb

@ -1,3 +1,5 @@
<%= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" %>
<h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>

Loading…
Cancel
Save