Merge branch 'master' of github.com:diaspora/diaspora

This commit is contained in:
ilya 2010-08-19 14:13:27 -07:00
commit 501d62f215
5 changed files with 30 additions and 13 deletions

View file

@ -1,7 +1,7 @@
class UsersController < ApplicationController
before_filter :authenticate_user!, :except => [:new, :create]
def index
@groups_array = current_user.groups.collect{|x| [x.to_s, x.id]}
unless params[:q]

View file

@ -2,10 +2,10 @@ module PeopleHelper
def search_or_index
if params[:q]
" results for #{q}"
" results for #{params[:q]}"
else
" people on this pod"
end
end
end
end

View file

@ -38,6 +38,7 @@
%li.name= link_to current_user.real_name, current_user.person
%li= link_to "requests (#{@request_count})", requests_path, :class => new_request(@request_count)
%li= link_to "settings", edit_user_path(current_user)
%li= link_to "search", users_path
%li= link_to "logout", destroy_user_session_path
- else
= link_to "login", new_user_session_path

View file

@ -1,11 +1,11 @@
%h1.big_text
.back
= link_to "⇧ home", root_path
Editing your profile
= form_for @user do |f|
%h1.big_text
.back
= link_to "⇧ home", root_path
Editing your profile
= f.error_messages

View file

@ -1,17 +1,32 @@
= (@people.count-1).to_s + search_or_index
%h1.big_text
.back
= link_to "⇧ home", root_path
Search
%p
=form_tag '/users', :method => "get" do
= text_field_tag :q
= submit_tag "search"
= link_to "reset", users_path
= (@people.count).to_s + search_or_index
%table
%tr
%th real name
%th email
%th url
- for person in @people
- unless person.id == current_user.person.id
- for person in @people
%tr
%td= person.real_name
%td= person.email
%td= person.url
-if current_user.friends.include? person
- elsif person.id == current_user.person.id
%td
%td thats you!
-elsif current_user.pending_requests.find_by_person_id(person.id)
%td
%td ^-you have a friend request from this person
@ -19,8 +34,9 @@
%td
%td friend request pending
-else
%td
%td
= form_for Request.new do |f|
= f.select(:group_id, @groups_array)
= f.hidden_field :destination_url, :value => person.email
= f.submit
= f.submit "add friend"