From dc827d0a80360aa245d4d724dc42bc47571faea6 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 18 Dec 2012 17:01:34 +0100 Subject: refactor: using tab partials for user editing --- users/app/views/users/edit.html.haml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'users/app/views') diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml index 8fc2cab..820b80e 100644 --- a/users/app/views/users/edit.html.haml +++ b/users/app/views/users/edit.html.haml @@ -1,17 +1,11 @@ .span8.offset2 %h2=t :settings - %ul.nav.nav-tabs - %li{:class => email_settings? ? :inactive : :active} - %a{:href => '#account', 'data-toggle' => 'tab'}Account - %li{:class => email_settings? ? :active : :inactive} - %a{:href => '#email', 'data-toggle' => 'tab'}Email - - .tab-content - .tab-pane#account{:class => email_settings? ? :inactive : :active} - = user_form_with 'login_field', :legend => :change_login - = user_form_with 'password_fields', :legend => :change_password - = render 'cancel_account' if @user == current_user - .tab-pane#email{:class => email_settings? ? :active : :inactive} - = user_form_with 'email_field', :legend => :set_email_address - = user_form_with 'email_forward_field', :legend => :forward_email - = user_form_with 'email_aliases', :legend => :add_email_alias + - content_for :account do + = user_form_with 'login_field', :legend => :change_login + = user_form_with 'password_fields', :legend => :change_password + = render 'cancel_account' if @user == current_user + - content_for :email do + = user_form_with 'email_field', :legend => :set_email_address + = user_form_with 'email_forward_field', :legend => :forward_email + = user_form_with 'email_aliases', :legend => :add_email_alias + = render 'tabs/tabs', :tabs => [:account, :email] -- cgit v1.2.3