MS DG request bar fix, and some other small tweaks

This commit is contained in:
maxwell 2010-07-21 16:38:33 -07:00
parent 3cee09407c
commit 21bd875a3f
8 changed files with 21 additions and 13 deletions

View file

@ -25,7 +25,8 @@ class RequestsController < ApplicationController
end
def create
url = relationship_flow(params[:request][:destination_url]).values.first
url = relationship_flow(params[:request][:destination_url])[:friend]
@request = current_user.send_friend_request_to(url) unless url.include?('@')|| url == ''
if @request
flash[:notice] = "a friend request was sent to #{@request.destination_url}"

View file

@ -36,7 +36,7 @@ module RequestsHelper
def relationship_flow(identifier)
unless identifier.include?( '@')
return identifier
return {:friend => identifier}
end
f = Redfinger.finger(identifier)

View file

@ -32,7 +32,7 @@
#session_action
- if user_signed_in?
= current_user.real_name
= link_to_person current_user
|
= link_to "requests (#{@request_count})", requests_path, :class => new_request(@request_count)
|

View file

@ -3,7 +3,10 @@
%span.from
= link_to_person post.person
%b posted a new photo
%b
posted a new photo to
= link_to post.album.name, object_path(post.album)
%br
= link_to (image_tag post.image.url(:thumb_medium)), object_path(post)

View file

@ -1,9 +1,6 @@
= form_for @request do |f|
= form_for @request do |f|
= f.error_messages
%p
= f.label :destination_url
.field_with_submit
= f.text_field :destination_url
%p
= f.submit

View file

@ -1,9 +1,7 @@
= form_for @request do |f|
= f.error_messages
%p
enter a diaspora url, diaspora username, or random email address:
= f.label :destination_url
enter a diaspora url, diaspora username, or random email address:
.field_with_submit
= f.text_field :destination_url
%p
= f.submit

View file

@ -344,3 +344,7 @@ ul#publisher_content_pickers li {
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px; }
.field_with_submit input[type='text'] {
width: 85%;
display: inline; }

View file

@ -416,3 +416,8 @@ ul#publisher_content_pickers li
:-webkit-border-radius 3px
:-moz-border-radius 3px
.field_with_submit
input[type='text']
:width 85%
:display inline