Better settings display
This commit is contained in:
parent
0e30c07903
commit
0cbf581176
22 changed files with 258 additions and 496 deletions
|
|
@ -158,11 +158,12 @@ header {
|
|||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* This class is added when the user open the drawer */
|
||||
#app.draw > * {
|
||||
transform: translateX(-80%);
|
||||
transform: translateX(-450px);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -840,17 +840,14 @@ form p.checkbox_select {
|
|||
margin-top: 5px;
|
||||
min-height: 100px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
|
||||
img {
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 1px 2px #666;
|
||||
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: auto;
|
||||
width: auto;
|
||||
|
||||
&.avatar {
|
||||
@include transition(opacity, 0.5s);
|
||||
&.loading {
|
||||
|
|
@ -858,7 +855,16 @@ form p.checkbox_select {
|
|||
}
|
||||
}
|
||||
}
|
||||
padding-left: 120px;
|
||||
}
|
||||
|
||||
#birth-date{
|
||||
text-align: center;
|
||||
select{
|
||||
width: 32%;
|
||||
display: inline;
|
||||
&:first-of-type{ float: left; }
|
||||
&:last-of-type{ float: right; }
|
||||
}
|
||||
}
|
||||
|
||||
#file-upload.button {
|
||||
|
|
@ -896,7 +902,9 @@ form p.checkbox_select {
|
|||
font-size: 1em;
|
||||
|
||||
ul {
|
||||
margin: 0 0 0 15px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
li {
|
||||
|
|
|
|||
|
|
@ -136,3 +136,13 @@
|
|||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#birth-date{
|
||||
text-align: center;
|
||||
select{
|
||||
width: 32%;
|
||||
display: inline;
|
||||
&:first-of-type{ float: left; }
|
||||
&:last-of-type{ float: right; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ module PeopleHelper
|
|||
end
|
||||
|
||||
def person_image_tag(person, size = :thumb_small)
|
||||
image_tag(person.profile.image_url(size), :alt => person.name, :class => 'avatar', :title => person.name, 'data-person_id' => person.id)
|
||||
image_tag(person.profile.image_url(size), alt: person.name, class: "avatar img-responsive center-block",
|
||||
title: person.name, "data-person_id" => person.id)
|
||||
end
|
||||
|
||||
def person_image_link(person, opts={})
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
%div.pull-left
|
||||
- if user.person
|
||||
%span.media-object
|
||||
= person_image_tag(user.person)
|
||||
= person_image_tag(user.person, size: :thumb_small)
|
||||
|
||||
%div.media-body.row
|
||||
%div.pull-right
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
.stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)}
|
||||
.media
|
||||
.img
|
||||
= person_image_tag(conversation.author)
|
||||
= person_image_tag(conversation.author, size: :thumb_small)
|
||||
|
||||
.bg
|
||||
= render(:partial => 'conversation_subject',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
/ For Nokia devices
|
||||
%link{rel: "shortcut icon", href: image_path("apple-touch-icon.png")}
|
||||
/ For desktop
|
||||
%link{rel: 'shortcut icon', href: image_path("favicon.png")} }
|
||||
%link{rel: 'shortcut icon', href: image_path("favicon.png")}
|
||||
|
||||
/ iOS mobile web app indicator
|
||||
/ NOTE(we will enable these once we don't have to rely on back/forward buttons anymore)
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
%li
|
||||
= link_to user_profile_path(current_user.username) do
|
||||
= t('layouts.header.profile')
|
||||
= person_image_tag(current_user)
|
||||
= person_image_tag(current_user, size: :thumb_small)
|
||||
%li
|
||||
= link_to t('_contacts'), contacts_path
|
||||
%li
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
.stream_element{id: person.id}
|
||||
|
||||
.content
|
||||
=person_image_link(person)
|
||||
=person_image_link(person, size: :thumb_small)
|
||||
%span.from
|
||||
=person_link(person, size: :thumb_small)
|
||||
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@
|
|||
#profile_photo_upload
|
||||
= owner_image_tag(:thumb_large)
|
||||
.clearfix
|
||||
|
||||
#file-upload.btn.btn-primary.pull-right
|
||||
=t('.upload')
|
||||
.small-horizontal-spacer
|
||||
#file-upload.btn.btn-primary.pull-right
|
||||
=t('.upload')
|
||||
|
||||
= image_tag('mobile-spinner.gif', :class => 'hidden', :style => "z-index:-1", :id => 'file-upload-spinner')
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :head do
|
||||
:javascript
|
||||
function createUploader(){
|
||||
var uploader = new qq.FileUploaderBasic({
|
||||
element: document.getElementById('file-upload'),
|
||||
params: {'photo' : {'pending' : true, 'aspect_ids' : "all", 'set_profile_photo': true}},
|
||||
allowedExtensions: ['jpg', 'jpeg', 'png'],
|
||||
action: "#{photos_path}",
|
||||
button: document.getElementById('file-upload'),
|
||||
sizeLimit: 4194304,
|
||||
|
||||
onProgress: function(id, fileName, loaded, total){
|
||||
var progress = Math.round(loaded / total * 100 );
|
||||
$('#fileInfo').text(fileName + ' ' + progress + '%');
|
||||
},
|
||||
|
||||
messages: {
|
||||
typeError: "#{t('photos.new_photo.invalid_ext')}",
|
||||
sizeError: "#{t('photos.new_photo.size_error')}",
|
||||
emptyError: "#{t('photos.new_photo.empty')}"
|
||||
},
|
||||
|
||||
onSubmit: function(id, fileName){
|
||||
$('#file-upload').addClass("loading");
|
||||
$("#profile_photo_upload").find(".avatar").addClass('loading');
|
||||
$("#file-upload-spinner").removeClass("hidden");
|
||||
},
|
||||
|
||||
onComplete: function(id, fileName, result){
|
||||
$("#file-upload-spinner").addClass("hidden");
|
||||
$('#fileInfo').text(fileName + ' completed').fadeOut(2000);
|
||||
$('#file-upload').removeClass("loading");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
window.onload = createUploader;
|
||||
|
||||
#profile_photo_upload
|
||||
= owner_image_tag(:thumb_medium)
|
||||
.clearfix
|
||||
|
||||
#file-upload.btn.btn-primary.pull-right
|
||||
=t('.upload')
|
||||
|
||||
= image_tag('mobile-spinner.gif', class: 'hidden', style: "z-index:-1", id: 'file-upload-spinner')
|
||||
|
||||
%p
|
||||
#fileInfo
|
||||
|
||||
#publisher_photo_upload
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= t('.edit_profile')
|
||||
|
||||
= form_tag profile_path, method: :put, multipart: true, id: 'update_profile_form' do
|
||||
= render 'profiles/edit_public', profile: profile, aspect: aspect, person: person
|
||||
|
||||
%hr
|
||||
%h3
|
||||
= t('profiles.edit.your_private_profile')
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_bio')
|
||||
.row
|
||||
.col-md-12
|
||||
= text_area_tag 'profile[bio]', profile.bio, rows: 5, placeholder: t('fill_me_out'), class: 'col-md-12 form-control'
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_location')
|
||||
.row
|
||||
.col-md-12
|
||||
= text_field_tag 'profile[location]', profile.location, placeholder: t('fill_me_out'), class: 'col-md-12 form-control'
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_gender')
|
||||
.row
|
||||
.col-md-12
|
||||
= text_field_tag 'profile[gender]', profile.gender, placeholder: t("fill_me_out"), class: 'col-md-12 form-control'
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_birthday')
|
||||
|
||||
.row
|
||||
.col-md-12.form-inline
|
||||
= select_date profile.birthday, { prompt: true, default: true, order: t('date.order'),
|
||||
:start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, prefix: 'profile[date]' },
|
||||
{ class: 'form-control', style: 'width: 32.7%;'}
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('search')
|
||||
|
||||
.well.checkbox
|
||||
= label_tag 'profile[searchable]', class: "checkbox-inline" do
|
||||
= check_box_tag 'profile[searchable]', true, profile.searchable
|
||||
= t('profiles.edit.allow_search')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('nsfw')
|
||||
%p
|
||||
= t('profiles.edit.nsfw_explanation')
|
||||
.well.checkbox
|
||||
= label_tag 'profile[nsfw]', class: "checkbox-inline" do
|
||||
= check_box_tag 'profile[nsfw]', true, profile.nsfw?
|
||||
= t('profiles.edit.nsfw_check')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
= t('profiles.edit.nsfw_explanation2')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
.submit_block
|
||||
= yield(:submit_block)
|
||||
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= t('.edit_profile')
|
||||
|
||||
= form_tag profile_path, method: :put, multipart: true, id: 'update_profile_form' do
|
||||
= render 'profiles/edit_public', profile: profile, aspect: aspect, person: person
|
||||
|
||||
%hr
|
||||
%h4
|
||||
= t('profiles.edit.your_private_profile')
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_bio')
|
||||
.row
|
||||
.col-md-12
|
||||
= text_area_tag 'profile[bio]', profile.bio, rows: 5, placeholder: t('fill_me_out'), class: 'col-md-12 form-control'
|
||||
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_location')
|
||||
.row
|
||||
.col-md-12
|
||||
= text_field_tag 'profile[location]', profile.location, placeholder: t('fill_me_out'), class: 'col-md-12 form-control'
|
||||
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_gender')
|
||||
.row
|
||||
.col-md-12
|
||||
= text_field_tag 'profile[gender]', profile.gender, placeholder: t("fill_me_out"), class: 'col-md-12 form-control'
|
||||
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_birthday')
|
||||
|
||||
.row
|
||||
.col-md-12.form-inline
|
||||
= select_date profile.birthday, { prompt: true, default: true, order: t('date.order'),
|
||||
:start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, prefix: 'profile[date]' },
|
||||
{ class: 'form-control', style: 'width: 33%;'}
|
||||
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('search')
|
||||
|
||||
.well.checkbox
|
||||
= label_tag 'profile[searchable]', class: "checkbox-inline" do
|
||||
= check_box_tag 'profile[searchable]', true, profile.searchable
|
||||
= t('profiles.edit.allow_search')
|
||||
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('nsfw')
|
||||
%p
|
||||
= t('profiles.edit.nsfw_explanation')
|
||||
.well.checkbox
|
||||
= label_tag 'profile[nsfw]', class: "checkbox-inline" do
|
||||
= check_box_tag 'profile[nsfw]', true, profile.nsfw?
|
||||
= t('profiles.edit.nsfw_check')
|
||||
%p
|
||||
= t('profiles.edit.nsfw_explanation2')
|
||||
|
||||
.submit_block
|
||||
=yield(:submit_block)
|
||||
57
app/views/profiles/_edit_private.haml
Normal file
57
app/views/profiles/_edit_private.haml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
%hr
|
||||
%h3= t('profiles.edit.your_private_profile')
|
||||
|
||||
%h4= t('profiles.edit.your_bio')
|
||||
|
||||
.clearfix
|
||||
= text_area_tag 'profile[bio]', profile.bio, rows: 5, placeholder: t('fill_me_out'), class: 'col-md-12 form-control'
|
||||
|
||||
.small-horizontal-spacer
|
||||
.row
|
||||
.col-md-6
|
||||
%h4= t('profiles.edit.your_location')
|
||||
= text_field_tag 'profile[location]', profile.location, placeholder: t('fill_me_out'), class: 'col-md-12 form-control'
|
||||
.col-md-6
|
||||
%h4= t('profiles.edit.your_gender')
|
||||
= text_field_tag 'profile[gender]', profile.gender, placeholder: t("fill_me_out"), class: 'col-md-12 form-control'
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4= t('profiles.edit.your_birthday')
|
||||
|
||||
#birth-date.form-inline
|
||||
= select_date profile.birthday, { prompt: true, default: true, order: t('date.order'),
|
||||
:start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, prefix: 'profile[date]' },
|
||||
{ class: 'form-control'}
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4= t('search')
|
||||
|
||||
.well.checkbox
|
||||
= label_tag 'profile[searchable]', class: "checkbox-inline" do
|
||||
= check_box_tag 'profile[searchable]', true, profile.searchable
|
||||
= t('profiles.edit.allow_search')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4= t('nsfw')
|
||||
%p
|
||||
= t('profiles.edit.nsfw_explanation')
|
||||
.well.checkbox
|
||||
= label_tag 'profile[nsfw]', class: "checkbox-inline" do
|
||||
= check_box_tag 'profile[nsfw]', true, profile.nsfw?
|
||||
= t('profiles.edit.nsfw_check')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
= t('profiles.edit.nsfw_explanation2')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
.submit_block
|
||||
= yield(:submit_block)
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
- content_for :head do
|
||||
- if mobile
|
||||
= javascript_include_tag :jquery
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
|
||||
|
|
@ -28,34 +30,28 @@
|
|||
});
|
||||
});
|
||||
|
||||
%h3
|
||||
= t('profiles.edit.your_public_profile')
|
||||
%h3= t('profiles.edit.your_public_profile')
|
||||
|
||||
= error_messages_for profile
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_name')
|
||||
%h4= t('profiles.edit.your_name')
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
= label_tag 'profile[first_name]', t('profiles.edit.first_name')
|
||||
= text_field_tag 'profile[first_name]', profile.first_name, class: 'col-md-12 form-control'
|
||||
= text_field_tag 'profile[first_name]', profile.first_name, class: 'form-control'
|
||||
.col-md-6
|
||||
= label_tag 'profile[last_name]', t('profiles.edit.last_name')
|
||||
= text_field_tag 'profile[last_name]', profile.last_name, class: 'col-md-12 form-control'
|
||||
= text_field_tag 'profile[last_name]', profile.last_name, class: 'form-control'
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_tags')
|
||||
%h4= t('profiles.edit.your_tags')
|
||||
|
||||
= text_field_tag 'profile[tag_string]', "", placeholder: t('profiles.edit.your_tags_placeholder'), class: "form-control"
|
||||
= text_field_tag 'profile[tag_string]', "", placeholder: t('profiles.edit.your_tags_placeholder'),class: "form-control"
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_photo')
|
||||
%h4= t('profiles.edit.your_photo')
|
||||
|
||||
= render 'photos/new_profile_photo', aspect: aspect, person: person
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :head do
|
||||
= javascript_include_tag :jquery
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
|
||||
autocompleteInput = $("#profile_tag_string");
|
||||
|
||||
autocompleteInput.autoSuggest("#{tags_path}", {
|
||||
selectedItemProp: "name",
|
||||
selectedValuesProp: "name",
|
||||
searchObjProps: "name",
|
||||
asHtmlID: "tags",
|
||||
neverSubmit: true,
|
||||
retrieveLimit: 10,
|
||||
minChars: 2,
|
||||
keyDelay: 200,
|
||||
startText: "",
|
||||
emptyText: "#{t('no_results')}",
|
||||
preFill: data
|
||||
});
|
||||
|
||||
autocompleteInput.bind('keydown', function(evt){
|
||||
if(evt.keyCode == 13 || evt.keyCode == 9 || evt.keyCode == 32){
|
||||
evt.preventDefault();
|
||||
if( $('li.as-result-item.active').length == 0 ){
|
||||
$('li.as-result-item').first().click();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
.stream
|
||||
- flash.each do |name, msg|
|
||||
%div{id: "flash_#{name}", class: "expose"}
|
||||
.message= msg
|
||||
.stream
|
||||
%p{class: "conversation_#{name}"}= msg
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_public_profile')
|
||||
|
||||
= error_messages_for profile
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_name')
|
||||
.row
|
||||
.col-md-6
|
||||
= label_tag 'profile[first_name]', t('profiles.edit.first_name')
|
||||
= text_field_tag 'profile[first_name]', profile.first_name, class: 'col-md-12 form-control'
|
||||
.col-md-6
|
||||
= label_tag 'profile[last_name]', t('profiles.edit.last_name')
|
||||
= text_field_tag 'profile[last_name]', profile.last_name, class: 'col-md-12 form-control'
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_tags')
|
||||
|
||||
= text_field_tag 'profile[tag_string]', "", placeholder: t('profiles.edit.your_tags_placeholder'), class: "form-control"
|
||||
|
||||
%br
|
||||
|
||||
%h4
|
||||
= t('profiles.edit.your_photo')
|
||||
|
||||
= render 'photos/new_profile_photo', aspect: aspect, person: person
|
||||
|
||||
%br
|
||||
|
|
@ -2,21 +2,15 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
#section_header
|
||||
%h2
|
||||
= t("settings")
|
||||
= render "shared/settings_nav"
|
||||
.container-fluid
|
||||
= render "shared/settings_nav"
|
||||
|
||||
.container
|
||||
.row
|
||||
.col-md-3
|
||||
.col-md-6
|
||||
.container-fluid
|
||||
.col-lg-8.col-lg-offset-2
|
||||
- content_for :submit_block do
|
||||
= link_to t("cancel"), local_or_remote_person_path(current_user.person), class: "btn btn-default"
|
||||
= submit_tag t(".update_profile"), class: "btn btn-primary pull-right", id: "update_profile"
|
||||
= render partial: "edit", locals: {person: @person, profile: @profile, aspect: @aspect, step: @step}
|
||||
.col-md-3
|
||||
|
||||
= form_tag profile_path, method: :put, multipart: true, id: "update_profile_form" do
|
||||
= render "edit_public", profile: @profile, aspect: @aspect, person: @person, mobile: false
|
||||
= render "edit_private", person: @person, profile: @profile, aspect: @aspect, step: @step
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
= render "shared/settings_nav"
|
||||
|
||||
#section_header
|
||||
%h3
|
||||
= t('settings')
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.col-md-12.prepend-5.last
|
||||
.col-lg-8.col-lg-offset-2
|
||||
- content_for :submit_block do
|
||||
= link_to t('cancel'), local_or_remote_person_path(current_user.person), class: "btn btn-default button"
|
||||
= submit_tag t('.update_profile'), class: "btn btn-primary pull-right", id: "update_profile"
|
||||
= render partial: 'edit', locals: {person: @person,
|
||||
profile: @profile, aspect: @aspect, step: @step}
|
||||
= link_to t("cancel"), local_or_remote_person_path(current_user.person), class: "btn btn-default button"
|
||||
= submit_tag t(".update_profile"), class: "btn btn-primary pull-right", id: "update_profile"
|
||||
|
||||
= form_tag profile_path, method: :put, multipart: true, id: "update_profile_form" do
|
||||
= render "edit_public", profile: @profile, aspect: @aspect, person: @person, mobile: true
|
||||
= render "edit_private", person: @person, profile: @profile, aspect: @aspect, step: @step
|
||||
|
|
|
|||
|
|
@ -5,18 +5,15 @@
|
|||
- content_for :page_title do
|
||||
= t('.edit_services')
|
||||
|
||||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
#section_header
|
||||
%h2
|
||||
= t('settings')
|
||||
= render 'shared/settings_nav'
|
||||
.container-fluid
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.row{ :style=>"margin-top: 20px;" }
|
||||
.col-md-7
|
||||
= render 'add_remove_services'
|
||||
.container-fluid
|
||||
.small-horizontal-spacer
|
||||
.col-lg-8.col-lg-offset-2
|
||||
.col-md-7
|
||||
= render 'add_remove_services'
|
||||
|
||||
.col-md-5
|
||||
%p
|
||||
= t('.services_explanation')
|
||||
.col-md-5
|
||||
%p
|
||||
= t('.services_explanation')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
%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
|
||||
.container-fluid
|
||||
.col-lg-10.col-lg-offset-1
|
||||
#section_header
|
||||
%h2
|
||||
= t('settings')
|
||||
%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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
%h2.container-fluid.col-md-offset-2= t('settings')
|
||||
#span-24
|
||||
%h3
|
||||
#settings_nav
|
||||
|
|
|
|||
|
|
@ -5,176 +5,158 @@
|
|||
- content_for :page_title do
|
||||
= t('.edit_account')
|
||||
|
||||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
#section_header
|
||||
%h2
|
||||
= t('settings')
|
||||
= render 'shared/settings_nav'
|
||||
.container-fluid
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.row
|
||||
.col-md-2
|
||||
.col-md-8
|
||||
.container-fluid
|
||||
.col-lg-8.col-lg-offset-2
|
||||
.row
|
||||
.col-md-6
|
||||
%h3
|
||||
= t('.your_handle')
|
||||
%h3= t('.your_handle')
|
||||
|
||||
%p
|
||||
%b= current_user.diaspora_handle
|
||||
.col-md-6
|
||||
%h3
|
||||
= t('.your_email')
|
||||
= form_for 'user', url: user_path, html: { method: :put, class: "form-horizontal" , id: "email-form"} do |f|
|
||||
%h3= t('.your_email')
|
||||
|
||||
= form_for 'user', url: user_path, html: { method: :put, class: "form-horizontal col-md-12" , id: "email-form"} do |f|
|
||||
= f.error_messages
|
||||
.form-group
|
||||
= f.text_field :email, value: @user.unconfirmed_email || @user.email, class: "col-md-7 form-control"
|
||||
.form-group
|
||||
= f.submit t('.change_email'), class: "btn btn-primary pull-right"
|
||||
.clearfix= f.submit t('.change_email'), class: "btn btn-primary pull-right"
|
||||
- if @user.unconfirmed_email.present?
|
||||
%div= t('.email_awaiting_confirmation', email: @user.email, :unconfirmed_email => @user.unconfirmed_email)
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
= t('.change_password')
|
||||
= form_for @user, url: user_path, html: { method: :put, class: "form-horizontal" } do |f|
|
||||
- if (@user.errors.keys & [:password, :password_confirmation, :current_password]).present?
|
||||
= f.error_messages
|
||||
%div.form-group
|
||||
= f.label :current_password, t('.current_password'), class: "col-sm-3 control-label"
|
||||
%div.col-sm-9
|
||||
= f.password_field :current_password, placeholder: t('.current_password_expl'), class: "form-control col-sm-10"
|
||||
%div.form-group
|
||||
= f.label :password, t('.new_password'), class: "col-sm-3 control-label"
|
||||
%div.col-sm-9
|
||||
= f.password_field :password, placeholder: t('.character_minimum_expl'), class: "form-control"
|
||||
%div.form-group
|
||||
= f.label :password_confirmation, t('password_confirmation'), class: "col-sm-3 control-label"
|
||||
%div.col-sm-9
|
||||
= f.password_field :password_confirmation, placeholder: t('.character_minimum_expl'), class: "form-control"
|
||||
%h3= t('.change_password')
|
||||
= form_for @user, url: user_path, html: { method: :put, class: "form-horizontal" } do |f|
|
||||
- if (@user.errors.keys & [:password, :password_confirmation, :current_password]).present?
|
||||
= f.error_messages
|
||||
%div.form-group
|
||||
= f.label :current_password, t('.current_password'), class: "col-sm-6 control-label"
|
||||
%div.col-sm-6
|
||||
= f.password_field :current_password, placeholder: t('.current_password_expl'), class: "form-control"
|
||||
%div.form-group
|
||||
= f.label :password, t('.new_password'), class: "col-sm-6 control-label"
|
||||
%div.col-sm-6
|
||||
= f.password_field :password, placeholder: t('.character_minimum_expl'), class: "form-control"
|
||||
%div.form-group
|
||||
= f.label :password_confirmation, t('password_confirmation'), class: "col-sm-6 control-label"
|
||||
%div.col-sm-6
|
||||
= f.password_field :password_confirmation, placeholder: t('.character_minimum_expl'), class: "form-control"
|
||||
|
||||
.submit_block
|
||||
= link_to t('cancel'), edit_user_path, class: "btn btn-default"
|
||||
= f.submit t('.change_password'), class: "btn btn-primary pull-right", name: 'change_password'
|
||||
.submit_block
|
||||
= link_to t('cancel'), edit_user_path, class: "btn btn-default"
|
||||
= f.submit t('.change_password'), class: "btn btn-primary pull-right", name: 'change_password'
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
= t('.change_language')
|
||||
= form_for 'user', url: user_path, html: { method: :put} do |f|
|
||||
.form-inline
|
||||
= f.select :language, available_language_options, {}, { class: 'form-control' }
|
||||
= f.submit t('.change_language'), class: "btn btn-primary pull-right"
|
||||
%h3= t('.change_language')
|
||||
= form_for 'user', url: user_path, html: { method: :put} do |f|
|
||||
.form-inline.clearfix
|
||||
= f.select :language, available_language_options, {}, { class: 'form-control form-group' }
|
||||
= f.submit t('.change_language'), class: "btn btn-primary pull-right"
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%h3#stream-preferences
|
||||
= t('.stream_preferences')
|
||||
= form_for current_user, url: user_path, html: { method: :put } do |f|
|
||||
%h3#stream-preferences
|
||||
= t('.stream_preferences')
|
||||
= form_for current_user, url: user_path, html: { method: :put } do |f|
|
||||
|
||||
= f.fields_for :stream_preferences do |type|
|
||||
#stream_prefs
|
||||
- if AppConfig.settings.community_spotlight.enable?
|
||||
= f.label :show_community_spotlight_in_stream, class: "checkbox-inline" do
|
||||
= f.check_box :show_community_spotlight_in_stream
|
||||
= t('.show_community_spotlight')
|
||||
= f.fields_for :stream_preferences do |type|
|
||||
#stream_prefs
|
||||
- if AppConfig.settings.community_spotlight.enable?
|
||||
= f.label :show_community_spotlight_in_stream, class: "checkbox-inline" do
|
||||
= f.check_box :show_community_spotlight_in_stream
|
||||
= t('.show_community_spotlight')
|
||||
|
||||
= f.label :getting_started, class: "checkbox-inline" do
|
||||
= f.check_box :getting_started
|
||||
= t('.show_getting_started')
|
||||
= f.label :getting_started, class: "checkbox-inline" do
|
||||
= f.check_box :getting_started
|
||||
= t('.show_getting_started')
|
||||
|
||||
= f.submit t('.change'), class: 'btn btn-primary pull-right'
|
||||
.clearfix= f.submit t('.change'), class: 'btn btn-primary pull-right'
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%h3#auto-follow-back-preferences
|
||||
= t('.following')
|
||||
= form_for current_user, url: user_path, html: { method: :put, class: "form-horizontal"} do |f|
|
||||
= f.label :auto_follow_back, class: "checkbox-inline" do
|
||||
= f.check_box :auto_follow_back
|
||||
= t('.auto_follow_back')
|
||||
.small-horizontal-spacer
|
||||
%div.form-group.row
|
||||
%label.col-sm-5.control-label= t('.auto_follow_aspect')
|
||||
%div.col-sm-7
|
||||
= f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects), {}, { class: 'form-control' }
|
||||
%h3#auto-follow-back-preferences
|
||||
= t('.following')
|
||||
= form_for current_user, url: user_path, html: { method: :put, class: "form-horizontal"} do |f|
|
||||
= f.label :auto_follow_back, class: "checkbox-inline" do
|
||||
= f.check_box :auto_follow_back
|
||||
= t('.auto_follow_back')
|
||||
.small-horizontal-spacer
|
||||
%div.form-group.row
|
||||
%label.col-sm-6.control-label= t('.auto_follow_aspect')
|
||||
%div.col-sm-6
|
||||
= f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects), {}, { class: 'form-control' }
|
||||
|
||||
.small-horizontal-spacer
|
||||
= f.submit t('.change'), class: 'btn btn-primary pull-right'
|
||||
.small-horizontal-spacer
|
||||
.clearfix= f.submit t('.change'), class: 'btn btn-primary pull-right'
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
= t('.receive_email_notifications')
|
||||
= form_for 'user', url: user_path, html: { method: :put } do |f|
|
||||
= f.fields_for :email_preferences do |type|
|
||||
#email_prefs
|
||||
- if current_user.admin?
|
||||
= type.label :someone_reported, class: "checkbox-inline" do
|
||||
= type.check_box :someone_reported, {checked: @email_prefs['someone_reported']}, false, true
|
||||
= t('.someone_reported')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :started_sharing, class: "checkbox-inline" do
|
||||
= type.check_box :started_sharing, {checked: @email_prefs['started_sharing']}, false, true
|
||||
= t('.started_sharing')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :mentioned, class: "checkbox-inline" do
|
||||
= type.check_box :mentioned, {checked: @email_prefs['mentioned']}, false, true
|
||||
= t('.mentioned')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :liked, class: "checkbox-inline" do
|
||||
= type.check_box :liked, {checked: @email_prefs['liked']}, false, true
|
||||
= t('.liked')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :reshared, class: "checkbox-inline" do
|
||||
= type.check_box :reshared, {checked: @email_prefs['reshared']}, false, true
|
||||
= t('.reshared')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :comment_on_post, class: "checkbox-inline" do
|
||||
= type.check_box :comment_on_post, {checked: @email_prefs['comment_on_post']}, false, true
|
||||
= t('.comment_on_post')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :also_commented, class: "checkbox-inline" do
|
||||
= type.check_box :also_commented, {checked: @email_prefs['also_commented']}, false, true
|
||||
= t('.also_commented')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :private_message, class: "checkbox-inline" do
|
||||
= type.check_box :private_message, {checked: @email_prefs['private_message']}, false, true
|
||||
= t('.private_message')
|
||||
%h3
|
||||
= t('.receive_email_notifications')
|
||||
= form_for 'user', url: user_path, html: { method: :put } do |f|
|
||||
= f.fields_for :email_preferences do |type|
|
||||
#email_prefs
|
||||
- if current_user.admin?
|
||||
= type.label :someone_reported, class: "checkbox-inline" do
|
||||
= type.check_box :someone_reported, {checked: @email_prefs['someone_reported']}, false, true
|
||||
= t('.someone_reported')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
= f.submit t('.change'), class: 'btn btn-primary pull-right', id: "change_email_preferences"
|
||||
= type.label :started_sharing, class: "checkbox-inline" do
|
||||
= type.check_box :started_sharing, {checked: @email_prefs['started_sharing']}, false, true
|
||||
= t('.started_sharing')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :mentioned, class: "checkbox-inline" do
|
||||
= type.check_box :mentioned, {checked: @email_prefs['mentioned']}, false, true
|
||||
= t('.mentioned')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :liked, class: "checkbox-inline" do
|
||||
= type.check_box :liked, {checked: @email_prefs['liked']}, false, true
|
||||
= t('.liked')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :reshared, class: "checkbox-inline" do
|
||||
= type.check_box :reshared, {checked: @email_prefs['reshared']}, false, true
|
||||
= t('.reshared')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :comment_on_post, class: "checkbox-inline" do
|
||||
= type.check_box :comment_on_post, {checked: @email_prefs['comment_on_post']}, false, true
|
||||
= t('.comment_on_post')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :also_commented, class: "checkbox-inline" do
|
||||
= type.check_box :also_commented, {checked: @email_prefs['also_commented']}, false, true
|
||||
= t('.also_commented')
|
||||
.small-horizontal-spacer
|
||||
|
||||
= type.label :private_message, class: "checkbox-inline" do
|
||||
= type.check_box :private_message, {checked: @email_prefs['private_message']}, false, true
|
||||
= t('.private_message')
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
.clearfix= f.submit t('.change'), class: 'btn btn-primary pull-right', id: "change_email_preferences"
|
||||
|
||||
%hr
|
||||
.row
|
||||
#account_data.col-md-7
|
||||
#account_data.col-lg-7
|
||||
.row
|
||||
%h3.col-md-12= t('.export_data')
|
||||
.col-md-6
|
||||
.col-md-6.form-group
|
||||
- if current_user.exporting
|
||||
.export-in-progress= t('.export_in_progress')
|
||||
- elsif current_user.export.present?
|
||||
= link_to t('.request_export_update'), export_profile_user_path, class: "btn btn-default btn-block"
|
||||
= link_to t('.request_export_update'), export_profile_user_path, method: :post, class: "btn btn-default btn-block"
|
||||
.small-horizontal-spacer
|
||||
= link_to t('.download_export'), download_profile_user_path, class: "btn btn-success btn-block"
|
||||
.small-horizontal-spacer
|
||||
|
|
@ -183,20 +165,20 @@
|
|||
- else
|
||||
= link_to t('.request_export'), export_profile_user_path, method: :post, class: "btn btn-default btn-block"
|
||||
|
||||
.col-md-6
|
||||
.col-md-6.form-group
|
||||
- if current_user.exporting_photos
|
||||
.export-in-progress= t('.export_photos_in_progress')
|
||||
- elsif current_user.exported_photos_file.present?
|
||||
= link_to t('.request_export_photos_update'), export_photos_user_path, class: "btn btn-default btn-block"
|
||||
.small-horizontal-spacer
|
||||
= link_to t('.download_export_photos'), download_photos_user_path, class: "btn btn-success btn-block"
|
||||
= link_to t('.download_export_photos'), download_photos_user_path, method: :post, class: "btn btn-success btn-block"
|
||||
.small-horizontal-spacer
|
||||
%h6
|
||||
= t('.last_exported_at', timestamp: current_user.exported_photos_at)
|
||||
- else
|
||||
= link_to t('.request_export_photos'), export_photos_user_path, method: :post, class: "btn btn-default btn-block"
|
||||
|
||||
.col-md-5
|
||||
.col-lg-5
|
||||
%h3{ style: "text-align: right;" }
|
||||
= t('.close_account_text')
|
||||
|
||||
|
|
@ -251,6 +233,4 @@
|
|||
.small-horizontal-spacer
|
||||
= f.submit t('.close_account_text'), class: "btn btn-danger", id: "close_account_confirm",
|
||||
data: { confirm: t('are_you_sure_delete_account') }
|
||||
|
||||
.col-md-2
|
||||
.small-horizontal-spacer
|
||||
|
|
|
|||
|
|
@ -5,17 +5,11 @@
|
|||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
#section_header
|
||||
%h2
|
||||
= t('privacy')
|
||||
= render 'shared/settings_nav'
|
||||
.container-fluid
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.row
|
||||
.col-md-3
|
||||
.col-md-5
|
||||
.container-fluid
|
||||
.col-lg-8.col-lg-offset-2
|
||||
%h3
|
||||
= t('.title')
|
||||
|
||||
|
|
@ -33,10 +27,7 @@
|
|||
= f.submit t('users.edit.change'), class: 'btn btn-primary pull-right'
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-3
|
||||
.col-md-5
|
||||
.small-horizontal-spacer
|
||||
%h3
|
||||
= t('.ignored_users')
|
||||
|
||||
|
|
@ -49,4 +40,3 @@
|
|||
= link_to t('.stop_ignoring'), block_path(block),
|
||||
method: :delete
|
||||
%br
|
||||
.col-md-3
|
||||
|
|
|
|||
Loading…
Reference in a new issue