Commit 0cbf5811 authored by Augier's avatar Augier Committed by Jonne Haß

Better settings display

parent 0e30c079
......@@ -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')
......
-# 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
-# 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)
-# 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)
-# 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)
- 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
-# 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'