MS IZ profile page has more useful info, but ultimatly kinda ugly

This commit is contained in:
maxwell 2010-07-27 14:23:31 -07:00
parent 97daaf81c2
commit bdca2348a6
10 changed files with 56 additions and 37 deletions

View file

@ -4,10 +4,12 @@ class DashboardsController < ApplicationController
def index
@posts = Post.paginate :page => params[:page], :order => 'created_at DESC'
@latest_status_message = StatusMessage.newest(current_user)
end
def ostatus
@posts = OstatusPost.paginate :page => params[:page], :order => 'created_at DESC'
@latest_status_message = StatusMessage.newest(current_user)
render :index
end

View file

@ -8,7 +8,9 @@ class PeopleController < ApplicationController
def show
@person= Person.where(:id => params[:id]).first
@person_profile = @person.profile
@person_posts = Post.where(:person_id => @person.id).sort(:created_at.desc)
@person_posts = Post.where(:person_id => @person.id).paginate :page => params[:page], :order => 'created_at DESC'
@latest_status_message = StatusMessage.newest(@person)
@post_count = @person_posts.count
end
def destroy

View file

@ -57,5 +57,9 @@ module ApplicationHelper
def new_request(request_count)
"new_requests" if request_count > 0
end
def post_yield_tag(post)
(':' + post.id.to_s).to_sym
end
end

View file

@ -1,7 +1,7 @@
module StatusMessagesHelper
def my_latest_message
message = StatusMessage.my_newest
message = @latest_status_message
unless message.nil?
return message.message + " - " + how_long_ago(message)
else

View file

@ -12,5 +12,4 @@
- for author in @subscribed_persons
%li= link_to author.username, author_path(author)
= link_to "add a new person", requests_path
= link_to "add a new person", requests_path

View file

@ -1,29 +1,34 @@
.span-20.last
%h1= "#{@person.real_name}"
= link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete
%p
%b Active?
%p
= @person.active
- if @person_profile
%p
%b First Name
%p
= @person_profile.first_name
%p
%b Last Name
%p
= @person_profile.last_name
%p
%b url
%p
= @person.url
#profile
%h1
= person_image_link(@person)
= "#{@person.real_name}"
.button.right
= link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete
%h4{:style => "font-size:small"}
%ul{:style => "list-style-type: none"}
%li
%i= "last seen: #{how_long_ago(@person_posts.first)}"
%li
%i= "friends since: #{how_long_ago(@person)}"
.span-20
- if @person.posts
%h3 stream
%ul#stream
- for post in @person_posts
= render type_partial(post), :post => post
- else
%h3 no posts to display!
%h1
#latest_message= "\"#{@latest_status_message.message}\""
%p
%b url:
= @person.url
.span-20
- if @person.posts
%h3= "stream - #{@post_count} item(s)"
%ul#stream
- for post in @person_posts
= render type_partial(post), :post => post
= will_paginate @person_posts
- else
%h3 no posts to display!

View file

@ -1,6 +1,6 @@
#debug_info
%h5 DEBUG INFO
#debug_more{:visability => "hidden"}
#debug_more{ :style => "display:none;" }
%ul
%li
%b params

View file

@ -0,0 +1,4 @@
%li.message{:id => post.id, :class => ("mine" if mine?(post))}
= person_image_link(post.person)
= yield post_yield_tag(post)
= = render type_partial(post), :post => post

View file

@ -201,7 +201,7 @@ ul.comment_set {
margin-top: -5px;
padding-bottom: 8px; }
#stream img.person_picture {
#stream img.person_picture, #profile img.person_picture {
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
@ -223,7 +223,8 @@ ul.comment_set {
font-weight: normal; }
.destroy_link {
display: none; }
display: none;
font-size: smaller; }
.request_buttons {
position: absolute;

View file

@ -242,8 +242,8 @@ ul.comment_set
:top -5px
:padding
:bottom 8px
#stream
#stream, #profile
img.person_picture
:border-radius 3px
:-webkit-border-radius 3px
@ -254,7 +254,8 @@ ul.comment_set
:float left
:margin
:right 10px
.pagination
a
:padding 3px
@ -270,6 +271,7 @@ ul.comment_set
.destroy_link
:display none
:font-size smaller
.request_buttons
:position absolute