MS DG request bar fix, and some other small tweaks
This commit is contained in:
parent
3cee09407c
commit
21bd875a3f
8 changed files with 21 additions and 13 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ module RequestsHelper
|
|||
|
||||
def relationship_flow(identifier)
|
||||
unless identifier.include?( '@')
|
||||
return identifier
|
||||
return {:friend => identifier}
|
||||
end
|
||||
|
||||
f = Redfinger.finger(identifier)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
= form_for @request do |f|
|
||||
= f.error_messages
|
||||
|
||||
%p
|
||||
= f.label :destination_url
|
||||
.field_with_submit
|
||||
= f.text_field :destination_url
|
||||
|
||||
%p
|
||||
= f.submit
|
||||
|
|
|
|||
|
|
@ -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
|
||||
.field_with_submit
|
||||
= f.text_field :destination_url
|
||||
%p
|
||||
= f.submit
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue