MS IZ profile page has more useful info, but ultimatly kinda ugly
This commit is contained in:
parent
97daaf81c2
commit
bdca2348a6
10 changed files with 56 additions and 37 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -58,4 +58,8 @@ module ApplicationHelper
|
|||
"new_requests" if request_count > 0
|
||||
end
|
||||
|
||||
def post_yield_tag(post)
|
||||
(':' + post.id.to_s).to_sym
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -13,4 +13,3 @@
|
|||
%li= link_to author.username, author_path(author)
|
||||
|
||||
= link_to "add a new person", requests_path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1,34 @@
|
|||
.span-20.last
|
||||
%h1= "#{@person.real_name}"
|
||||
#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)}"
|
||||
|
||||
%h1
|
||||
#latest_message= "\"#{@latest_status_message.message}\""
|
||||
|
||||
%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
|
||||
%b url:
|
||||
= @person.url
|
||||
|
||||
|
||||
|
||||
|
||||
.span-20
|
||||
- if @person.posts
|
||||
%h3 stream
|
||||
%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!
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#debug_info
|
||||
%h5 DEBUG INFO
|
||||
#debug_more{:visability => "hidden"}
|
||||
#debug_more{ :style => "display:none;" }
|
||||
%ul
|
||||
%li
|
||||
%b params
|
||||
|
|
|
|||
4
app/views/shared/_post_wrapper.haml
Normal file
4
app/views/shared/_post_wrapper.haml
Normal 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
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ ul.comment_set
|
|||
:padding
|
||||
:bottom 8px
|
||||
|
||||
#stream
|
||||
#stream, #profile
|
||||
img.person_picture
|
||||
:border-radius 3px
|
||||
:-webkit-border-radius 3px
|
||||
|
|
@ -255,6 +255,7 @@ ul.comment_set
|
|||
: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
|
||||
|
|
|
|||
Loading…
Reference in a new issue