user account edit page fully ported to bootstrap
This commit is contained in:
parent
0bc83b93e5
commit
855597541a
6 changed files with 235 additions and 213 deletions
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
@import 'new_styles/forms';
|
||||
|
||||
/* profile and settings pages */
|
||||
@import 'new_styles/settings';
|
||||
|
||||
/* new SPV */
|
||||
@import 'header';
|
||||
@import 'footer';
|
||||
|
|
|
|||
|
|
@ -164,6 +164,16 @@ $bring-dark-accent-forward-color: #DDD;
|
|||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* general purpose classes */
|
||||
|
||||
.small-horizontal-spacer {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.big-horizontal-spacer {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
/* responsive */
|
||||
@media (max-width: 767px) {
|
||||
body {
|
||||
|
|
|
|||
4
app/assets/stylesheets/new_styles/_settings.scss
Normal file
4
app/assets/stylesheets/new_styles/_settings.scss
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/* Specific styles for the settings pages (profile, user account, privacy, services) */
|
||||
#inner_account_delete {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
class UsersController < ApplicationController
|
||||
before_filter :authenticate_user!, :except => [:new, :create, :public, :user_photo]
|
||||
before_filter -> { @css_framework = :bootstrap }, only: [:privacy_settings, :edit]
|
||||
|
||||
layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||
|
||||
use_bootstrap_for :getting_started
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
%ul#settings_nav
|
||||
%li= link_to_unless_current t('profile'), edit_profile_path
|
||||
%li= link_to_unless_current t('account'), edit_user_path
|
||||
%li= link_to_unless_current t('privacy'), privacy_settings_path
|
||||
%li= link_to_unless_current t('_services'), services_path
|
||||
%ul.nav.nav-tabs#settings_nav
|
||||
%li{class: current_page?(edit_profile_path) && 'active'}= link_to t('profile'), edit_profile_path
|
||||
%li{class: current_page?(edit_user_path) && 'active'}= link_to t('account'), edit_user_path
|
||||
%li{class: current_page?(privacy_settings_path) && 'active'}= link_to t('privacy'), privacy_settings_path
|
||||
%li{class: current_page?(services_path) && 'active'}= link_to t('_services'), services_path
|
||||
|
|
|
|||
|
|
@ -5,35 +5,41 @@
|
|||
- content_for :page_title do
|
||||
= t('.edit_account')
|
||||
|
||||
.bootstrap_header_padding
|
||||
|
||||
.container
|
||||
.row-fluid
|
||||
.span12
|
||||
#section_header
|
||||
%h2
|
||||
= t('settings')
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.span-12.prepend-5.last
|
||||
.span-5.append-1
|
||||
.row-fluid
|
||||
.span-12
|
||||
.row-fluid
|
||||
.span6
|
||||
%h3
|
||||
= t('.your_handle')
|
||||
%p
|
||||
%b= current_user.diaspora_handle
|
||||
.span-5.last
|
||||
.span6
|
||||
%h3
|
||||
= t('.your_email')
|
||||
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
|
||||
= f.error_messages
|
||||
%p
|
||||
.form-inline
|
||||
= f.text_field :email, :value => @user.unconfirmed_email || @user.email
|
||||
= f.submit t('.change_email'), :class => "button"
|
||||
%br
|
||||
= f.submit t('.change_email'), :class => "btn"
|
||||
.small-horizontal-spacer
|
||||
- if @user.unconfirmed_email.present?
|
||||
%p= t('.email_awaiting_confirmation', :email => @user.email, :unconfirmed_email => @user.unconfirmed_email)
|
||||
%br
|
||||
.small-horizontal-spacer
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%h3
|
||||
= t('.change_password')
|
||||
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
|
||||
|
|
@ -51,26 +57,25 @@
|
|||
.submit_block
|
||||
= link_to t('cancel'), edit_user_path
|
||||
= t('or')
|
||||
= f.submit t('.change_password'), :class => "button"
|
||||
= f.submit t('.change_password'), :class => "btn"
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
.row-fluid
|
||||
.span-12
|
||||
%h3
|
||||
= t('.change_language')
|
||||
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
|
||||
= f.error_messages
|
||||
|
||||
%p
|
||||
.form-inline
|
||||
= f.select :language, available_language_options
|
||||
= f.submit t('.change_language'), :class => "button"
|
||||
= f.submit t('.change_language'), :class => "btn"
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
.row-fluid
|
||||
.span-12
|
||||
|
||||
%h3#stream-preferences
|
||||
= t('.stream_preferences')
|
||||
|
|
@ -79,45 +84,43 @@
|
|||
|
||||
= f.fields_for :stream_preferences do |type|
|
||||
#stream_prefs
|
||||
%p.checkbox_select
|
||||
= f.label :show_community_spotlight_in_stream, t('.show_community_spotlight')
|
||||
= f.label :show_community_spotlight_in_stream, :class => "checkbox" do
|
||||
= f.check_box :show_community_spotlight_in_stream
|
||||
= t('.show_community_spotlight')
|
||||
|
||||
%br
|
||||
%p.checkbox_select
|
||||
= f.label :getting_started, t('.show_getting_started')
|
||||
.small-horizontal-spacer
|
||||
= f.label :getting_started, :class => "checkbox" do
|
||||
= f.check_box :getting_started
|
||||
= t('.show_getting_started')
|
||||
|
||||
%br
|
||||
= f.submit t('.change'), :class => 'button'
|
||||
.small-horizontal-spacer
|
||||
= f.submit t('.change'), :class => 'btn'
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
.row-fluid
|
||||
.span-12
|
||||
|
||||
%h3#auto-follow-back-preferences
|
||||
= t('.following')
|
||||
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
|
||||
= f.error_messages
|
||||
|
||||
%p.checkbox_select
|
||||
= f.label :auto_follow_back, t('.auto_follow_back')
|
||||
= f.label :auto_follow_back, :class => "checkbox" do
|
||||
= f.check_box :auto_follow_back
|
||||
%br
|
||||
%p.checkbox_select
|
||||
%span{:style => "color: #999"}
|
||||
= t('.auto_follow_back')
|
||||
.small-horizontal-spacer
|
||||
%div{:class => "muted"}
|
||||
= t('.auto_follow_aspect')
|
||||
= f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects)
|
||||
|
||||
%br
|
||||
= f.submit t('.change'), :class => 'button'
|
||||
.small-horizontal-spacer
|
||||
= f.submit t('.change'), :class => 'btn'
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
.row-fluid
|
||||
.span-12
|
||||
%h3
|
||||
= t('.receive_email_notifications')
|
||||
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
|
||||
|
|
@ -126,62 +129,61 @@
|
|||
= f.fields_for :email_preferences do |type|
|
||||
#email_prefs
|
||||
- if current_user.admin?
|
||||
%p.checkbox_select
|
||||
= type.label :someone_reported, t('.someone_reported')
|
||||
= type.label :someone_reported, :class => "checkbox" do
|
||||
= type.check_box :someone_reported, {:checked => @email_prefs['someone_reported']}, false, true
|
||||
= t('.someone_reported')
|
||||
|
||||
%br
|
||||
%p.checkbox_select
|
||||
= type.label :started_sharing, t('.started_sharing')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :started_sharing, :class => "checkbox" do
|
||||
= type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true
|
||||
%br
|
||||
= t('.started_sharing')
|
||||
.small-horizontal-spacer
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :mentioned, t('.mentioned')
|
||||
= type.label :mentioned, :class => "checkbox" do
|
||||
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
|
||||
%br
|
||||
= t('.mentioned')
|
||||
.small-horizontal-spacer
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :liked, t('.liked')
|
||||
= type.label :liked, :class => "checkbox" do
|
||||
= type.check_box :liked, {:checked => @email_prefs['liked']}, false, true
|
||||
%br
|
||||
= t('.liked')
|
||||
.small-horizontal-spacer
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :reshared, t('.reshared')
|
||||
= type.label :reshared, :class => "checkbox" do
|
||||
= type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true
|
||||
%br
|
||||
= t('.reshared')
|
||||
.small-horizontal-spacer
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :comment_on_post, t('.comment_on_post')
|
||||
= type.label :comment_on_post, :class => "checkbox" do
|
||||
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
|
||||
%br
|
||||
= t('.comment_on_post')
|
||||
.small-horizontal-spacer
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :also_commented, t('.also_commented')
|
||||
= type.label :also_commented, :class => "checkbox" do
|
||||
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
|
||||
%br
|
||||
= t('.also_commented')
|
||||
.small-horizontal-spacer
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :private_message, t('.private_message')
|
||||
= type.label :private_message, :class => "checkbox" do
|
||||
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
|
||||
= t('.private_message')
|
||||
|
||||
%br
|
||||
= f.submit t('.change'), :class => "button"
|
||||
.small-horizontal-spacer
|
||||
|
||||
= f.submit t('.change'), :class => "btn"
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
|
||||
#account_data.span-5.append-2
|
||||
.row-fluid
|
||||
#account_data.span6
|
||||
%h3
|
||||
= t('.export_data')
|
||||
= link_to t('.download_xml'), export_user_path, :class => "button"
|
||||
%br
|
||||
.small-horizontal-spacer
|
||||
= link_to t('.download_photos'), "#", :class => "button", :id => "photo-export-button", :title => t('.photo_export_unavailable')
|
||||
|
||||
.span-5.last
|
||||
.span6
|
||||
%h3
|
||||
= t('.close_account_text')
|
||||
=link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "button", :id => "close_account"
|
||||
|
|
@ -192,13 +194,14 @@
|
|||
= t('.close_account.dont_go')
|
||||
%p
|
||||
= t('.close_account.make_diaspora_better')
|
||||
.span-10
|
||||
.row-fluid
|
||||
.span6
|
||||
= image_tag 'sadcat.jpg'
|
||||
%br
|
||||
.small-horizontal-spacer
|
||||
%small
|
||||
%b
|
||||
= t('.close_account.mr_wiggles')
|
||||
.span-10.last
|
||||
.span6
|
||||
%ul
|
||||
%li
|
||||
= t('.close_account.what_we_delete')
|
||||
|
|
@ -210,7 +213,6 @@
|
|||
%b
|
||||
= t('.close_account.no_turning_back')
|
||||
|
||||
|
||||
= form_for 'user', :url => user_path, :html => { :method => :delete } do |f|
|
||||
= f.error_messages
|
||||
|
||||
|
|
@ -218,4 +220,4 @@
|
|||
= f.label :close_account_password, t('.current_password'), :for => :close_account_password
|
||||
= f.password_field :current_password, :id => :close_account_password
|
||||
%p
|
||||
= f.submit t('.close_account_text'), :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') }
|
||||
= f.submit t('.close_account_text'), :class => "btn btn-danger", :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') }
|
||||
|
|
|
|||
Loading…
Reference in a new issue