add contact images to aspect index, removed comment background color, add vertical rule to people pages
This commit is contained in:
parent
ca76db4550
commit
238e859dbe
10 changed files with 132 additions and 79 deletions
|
|
@ -18,6 +18,8 @@ class AspectsController < ApplicationController
|
|||
@contacts_sharing_with = current_user.contacts.sharing.includes(:person => :profile)
|
||||
end
|
||||
|
||||
aspect_ids = @aspects.map{|a| a.id}
|
||||
|
||||
#No aspect_listings on infinite scroll
|
||||
@aspects = @aspects.includes(:contacts => {:person => :profile}) unless params[:only_posts]
|
||||
|
||||
|
|
@ -27,7 +29,9 @@ class AspectsController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
@selected_contacts = @aspects.map { |aspect| aspect.contacts }.flatten.uniq unless params[:only_posts]
|
||||
@selected_contacts = Contact.joins(:aspect_memberships).
|
||||
where(:aspect_memberships => {:aspect_id => aspect_ids}).
|
||||
includes(:person => :profile).limit(20) unless params[:only_posts]
|
||||
|
||||
@aspect_ids = @aspects.map { |a| a.id }
|
||||
posts = current_user.visible_posts(:by_members_of => @aspect_ids,
|
||||
|
|
|
|||
|
|
@ -9,20 +9,42 @@
|
|||
.span-5.leftNavBar
|
||||
#home_user_badge
|
||||
= owner_image_link
|
||||
%h4{:style => "position:relative;"}
|
||||
%h3
|
||||
= current_user.first_name
|
||||
|
||||
.section
|
||||
= render 'aspects/aspect_listings'
|
||||
|
||||
.span-13.append-1
|
||||
#aspect_stream_container
|
||||
#aspect_stream_container.stream_container
|
||||
= render 'aspect_stream',
|
||||
:aspect => @aspect,
|
||||
:aspect_ids => @aspect_ids,
|
||||
:posts => @posts
|
||||
|
||||
.span-5.rightBar.last
|
||||
#selected_aspect_contacts.section
|
||||
.title.no_icon
|
||||
%h5
|
||||
= "Contacts (#{@selected_contacts.size})"
|
||||
|
||||
.content
|
||||
- for contact in @selected_contacts
|
||||
= person_image_link contact.person
|
||||
= person_image_link contact.person
|
||||
= person_image_link contact.person
|
||||
= person_image_link current_user.person
|
||||
= person_image_link current_user.person
|
||||
= person_image_link contact.person
|
||||
= person_image_link contact.person
|
||||
= person_image_link current_user.person
|
||||
= person_image_link contact.person
|
||||
= person_image_link contact.person
|
||||
= person_image_link current_user.person
|
||||
= person_image_link contact.person
|
||||
|
||||
#edit_this_aspect
|
||||
= link_to "View all contacts", "#"
|
||||
|
||||
.section
|
||||
.title
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
%br
|
||||
%br
|
||||
-if contact.sharing? || person == current_user.person
|
||||
%hr{:style=>"width:300px;"}
|
||||
%hr
|
||||
%ul#profile_information
|
||||
- unless person.profile.bio.blank?
|
||||
%li
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
%div{ :class => direction_for(person.profile.location) }
|
||||
= markdownify(person.profile.location, :newlines => true)
|
||||
|
||||
%li.span-8.last
|
||||
%li
|
||||
.span-4
|
||||
- unless person.profile.gender.blank?
|
||||
%h4
|
||||
|
|
@ -47,3 +47,5 @@
|
|||
%h4
|
||||
=t('.born')
|
||||
= birthday_format(person.profile.birthday)
|
||||
%br
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@
|
|||
- content_for :page_title do
|
||||
= @person.name
|
||||
|
||||
.span-8.append-1.last
|
||||
.span-8
|
||||
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
|
||||
|
||||
- if user_signed_in? && @contact.persisted? && @contacts_of_contact.count > 0
|
||||
.span-8.last#contacts_of_contact
|
||||
%hr{:style=>"width:300px;"}
|
||||
%hr
|
||||
.section.contact_pictures
|
||||
%h4
|
||||
= t('contacts', :count => @contacts_of_contact_count)
|
||||
|
|
@ -24,12 +24,12 @@
|
|||
%p.see_all= link_to t('.see_all'), person_contacts_path(@person)
|
||||
|
||||
.span-15.last
|
||||
.stream_container
|
||||
#author_info
|
||||
- if user_signed_in? && current_user.person != @person
|
||||
.right
|
||||
= render 'aspect_memberships/aspect_dropdown', :contact => @contact, :person => @person, :hang => 'left'
|
||||
|
||||
%h3
|
||||
%h2
|
||||
= @person.name
|
||||
%span.diaspora_handle
|
||||
= @person.diaspora_handle
|
||||
|
|
|
|||
15
db/seeds.rb
15
db/seeds.rb
|
|
@ -19,9 +19,18 @@ alice = Factory(:user_with_aspect, :username => "alice", :password => 'evankorth
|
|||
bob = Factory(:user_with_aspect, :username => "bob", :password => 'evankorth', :invites => 10)
|
||||
eve = Factory(:user_with_aspect, :username => "eve", :password => 'evankorth', :invites => 10)
|
||||
|
||||
alice.person.profile.update_attributes(:first_name => "Alice", :last_name => "Smith")
|
||||
bob.person.profile.update_attributes(:first_name => "Bob", :last_name => "Grimm")
|
||||
eve.person.profile.update_attributes(:first_name => "Eve", :last_name => "Doe")
|
||||
alice.person.profile.update_attributes(:first_name => "Alice", :last_name => "Smith",
|
||||
:image_url => "/images/user/uma.jpg",
|
||||
:image_url_small => "/images/user/uma.jpg",
|
||||
:image_url_medium => "/images/user/uma.jpg")
|
||||
bob.person.profile.update_attributes(:first_name => "Bob", :last_name => "Grimm",
|
||||
:image_url => "/images/user/wolf.jpg",
|
||||
:image_url_small => "/images/user/wolf.jpg",
|
||||
:image_url_medium => "/images/user/wolf.jpg")
|
||||
eve.person.profile.update_attributes(:first_name => "Eve", :last_name => "Doe",
|
||||
:image_url => "/images/user/angela.jpg",
|
||||
:image_url_small => "/images/user/angela.jpg",
|
||||
:image_url_medium => "/images/user/angela.jpg")
|
||||
|
||||
connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
|
||||
connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
|
||||
|
|
|
|||
BIN
public/images/user/angela.jpg
Normal file
BIN
public/images/user/angela.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
public/images/user/uma.jpg
Normal file
BIN
public/images/user/uma.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
BIN
public/images/user/wolf.jpg
Normal file
BIN
public/images/user/wolf.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
|
|
@ -4,16 +4,6 @@
|
|||
*/
|
||||
var View = {
|
||||
initialize: function() {
|
||||
|
||||
$(window).scroll(function(){
|
||||
var header = $('header');
|
||||
if( $(this).scrollTop() > 30){
|
||||
header.addClass('fixit');
|
||||
} else {
|
||||
header.removeClass('fixit');
|
||||
}
|
||||
});
|
||||
|
||||
/* Buttons */
|
||||
$("input:submit").addClass("button");
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@
|
|||
body
|
||||
:padding 2em
|
||||
:margin 0
|
||||
:top 40px
|
||||
:top 33px
|
||||
:background-color $background
|
||||
a
|
||||
:color #107FC9
|
||||
:color $blue
|
||||
:text
|
||||
:decoration none
|
||||
|
|
@ -28,9 +27,7 @@ h1
|
|||
:font
|
||||
:weight bold
|
||||
|
||||
h1, h2, h3
|
||||
|
||||
h4
|
||||
h1, h2, h3, h4
|
||||
:margin
|
||||
:bottom 5px
|
||||
|
||||
|
|
@ -129,8 +126,8 @@ form
|
|||
:margin 0
|
||||
|
||||
header
|
||||
@include box-shadow(0,1px,3px,#222)
|
||||
@include linear-gradient(rgba(25,20,20,0.95),rgba(25,20,20,1))
|
||||
@include box-shadow(0,0px,2px,#777)
|
||||
@include linear-gradient(rgba(35,30,30,0.95),rgba(35,30,30,1))
|
||||
|
||||
:z-index 50
|
||||
:padding 0
|
||||
|
|
@ -138,7 +135,7 @@ header
|
|||
:color #CCC
|
||||
:height 35px
|
||||
|
||||
:position absolute
|
||||
:position fixed
|
||||
|
||||
:width 100%
|
||||
:top 0
|
||||
|
|
@ -340,6 +337,7 @@ ul.dropdown
|
|||
.from
|
||||
:padding 0
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5
|
||||
|
|
@ -359,6 +357,9 @@ ul.dropdown
|
|||
:margin 0
|
||||
:padding 0
|
||||
|
||||
.right
|
||||
:top 10px
|
||||
|
||||
#conversation_inbox a
|
||||
&:hover
|
||||
:text
|
||||
|
|
@ -389,7 +390,8 @@ ul.dropdown
|
|||
|
||||
p
|
||||
:margin
|
||||
:bottom 0px
|
||||
:top 2px
|
||||
:bottom 10px
|
||||
:font
|
||||
:size 12px
|
||||
:line
|
||||
|
|
@ -630,8 +632,6 @@ ul.show_comments,
|
|||
:margin 0
|
||||
:top 0.5em
|
||||
:padding 0
|
||||
:background
|
||||
:color #F0F4F5
|
||||
|
||||
:font
|
||||
:size 12px
|
||||
|
|
@ -650,9 +650,10 @@ ul.show_comments,
|
|||
li
|
||||
:list
|
||||
:style none
|
||||
:padding 0.4em
|
||||
:padding 8px 5px
|
||||
|
||||
:border
|
||||
:bottom 2px solid $background
|
||||
:bottom 1px dotted #aaa
|
||||
|
||||
.new_comment
|
||||
:min-height 35px
|
||||
|
|
@ -678,7 +679,11 @@ ul.show_comments,
|
|||
:right 10px
|
||||
.from
|
||||
a
|
||||
:color #444
|
||||
:color rgb(85,80,80)
|
||||
p
|
||||
:margin
|
||||
:bottom 0
|
||||
:top 0
|
||||
|
||||
.right
|
||||
:right 4px
|
||||
|
|
@ -735,10 +740,8 @@ ul.show_comments,
|
|||
|
||||
.profile_photo
|
||||
img
|
||||
@include box-shadow(0,2px,2px,#333)
|
||||
|
||||
:height 300px
|
||||
:width 300px
|
||||
:height 200px
|
||||
:width 200px
|
||||
|
||||
#profile
|
||||
h3
|
||||
|
|
@ -2331,14 +2334,14 @@ ul.show_comments,
|
|||
:position absolute
|
||||
:left 0
|
||||
|
||||
h4
|
||||
h3
|
||||
:position relative
|
||||
:top 16px
|
||||
:top 13px
|
||||
:padding
|
||||
:bottom 5px
|
||||
|
||||
:margin
|
||||
:bottom 60px
|
||||
:bottom 54px
|
||||
|
||||
:padding
|
||||
:left 60px
|
||||
|
|
@ -2747,6 +2750,10 @@ h1.tag
|
|||
:padding 2px 0
|
||||
:left 24px
|
||||
|
||||
&.no_icon
|
||||
:padding
|
||||
:left 8px
|
||||
|
||||
.right
|
||||
:right 4px
|
||||
:top 3px
|
||||
|
|
@ -2756,9 +2763,8 @@ h1.tag
|
|||
|
||||
h5
|
||||
:font-size 13px
|
||||
:font-weight 500
|
||||
:margin 0
|
||||
:color #444
|
||||
:color #666
|
||||
|
||||
img
|
||||
:position absolute
|
||||
|
|
@ -2771,7 +2777,7 @@ h1.tag
|
|||
:color #999
|
||||
:font-size 11px
|
||||
:margin
|
||||
:bottom 4px
|
||||
:bottom 10px
|
||||
|
||||
.subtle
|
||||
:color #888
|
||||
|
|
@ -2921,11 +2927,13 @@ ul.left_nav
|
|||
:display none !important
|
||||
|
||||
.left_nav
|
||||
a
|
||||
:width 150px
|
||||
ul.sub_nav
|
||||
a
|
||||
:width 140px
|
||||
|
||||
#aspect_stream_container
|
||||
.stream_container
|
||||
h3
|
||||
:margin
|
||||
:bottom 0
|
||||
|
|
@ -2967,7 +2975,8 @@ ul.left_nav
|
|||
.from
|
||||
:position relative
|
||||
a
|
||||
:color #444
|
||||
:color rgb(85,80,80)
|
||||
|
||||
.content
|
||||
:padding
|
||||
:left 40px
|
||||
|
|
@ -3003,3 +3012,20 @@ ul.left_nav
|
|||
|
||||
.conversation_button
|
||||
:float right
|
||||
|
||||
#selected_aspect_contacts
|
||||
:margin
|
||||
:top 30px
|
||||
|
||||
.avatar
|
||||
:height 26px
|
||||
:width 26px
|
||||
:margin
|
||||
:bottom -2px
|
||||
|
||||
#edit_this_aspect
|
||||
:text-align center
|
||||
:margin
|
||||
:top 5px
|
||||
:padding 3px
|
||||
:border 1px dotted #ccc
|
||||
|
|
|
|||
Loading…
Reference in a new issue