Browse Source

Added link for users to update email/password

eperez-timeinput
Jason Denney 12 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 c.text = "CHECK OUT" if controller.current_user
end end
action :change_account_info do |c|
c.icon = :user_edit
c.text = "Change Email/Password"
end
def configure(c) def configure(c)
#all users #all users
@ -56,7 +61,7 @@ class AppTabPanel < Netzke::Basepack::TabPanel
end end
end end
c.prevent_header = true 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 c.items = @@app_tab_panel_items
super super
end 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> <h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>

Loading…
Cancel
Save