Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
4ff67b0200
10 changed files with 38 additions and 12 deletions
|
|
@ -104,7 +104,7 @@ class AspectsController < ApplicationController
|
|||
|
||||
def edit
|
||||
@aspect = current_user.aspects.where(:id => params[:id]).includes(:contacts => {:person => :profile}).first
|
||||
@contacts = current_user.contacts.includes(:person => :profile)
|
||||
@contacts = current_user.contacts.includes(:person => :profile).all.sort!{|x, y| x.person.profile.first_name <=> y.person.profile.first_name }.reverse!
|
||||
unless @aspect
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
||||
else
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
= t('.to')
|
||||
.span-10.last
|
||||
= text_field_tag "contact_autocomplete"
|
||||
.clearfix
|
||||
|
||||
.span-2
|
||||
%h4
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
= person_image_tag(person)
|
||||
= link_to "#{person.name.titleize}", person_path(person.id)
|
||||
= object_link(note)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
:javascript
|
||||
$(document).ready( function(){
|
||||
$("#user_username").focus();
|
||||
$("form").submit(function(){
|
||||
$(this).fadeOut(200, function(){
|
||||
$('#logo').animate({
|
||||
|
|
|
|||
|
|
@ -28,31 +28,29 @@
|
|||
%params
|
||||
#publisher_textarea_wrapper
|
||||
%ul#photodropzone
|
||||
= status.text_area :fake_text, :rows => 2, :value => h(params[:prefill])
|
||||
= status.text_area :fake_text, :rows => 2, :value => h(params[:prefill]), :tabindex => 1
|
||||
= status.hidden_field :text, :value => '', :class => 'clear_on_submit'
|
||||
|
||||
- for aspect_id in aspect_ids
|
||||
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
|
||||
|
||||
.options_and_submit
|
||||
.mention_helper
|
||||
- if aspect != :profile
|
||||
%i= t('.mention_helper_text')
|
||||
- else
|
||||
- if aspect == :profile
|
||||
.mention_helper
|
||||
.badges
|
||||
%i= t('.publishing_to')
|
||||
= aspect_badges(aspects_with_person, :link => false)
|
||||
|
||||
.public_toggle
|
||||
%span#publisher_service_icons
|
||||
= link_to (image_tag "icons/monotone_wrench_settings.png"), "#question_mark_pane", :class => 'question_mark', :rel => 'facebox', :title => t('shared.public_explain.manage')#, :style=>"display:none;"
|
||||
= link_to (image_tag "icons/monotone_wrench_settings.png"), "#question_mark_pane", :class => 'question_mark', :rel => 'facebox', :title => t('shared.public_explain.manage')
|
||||
- if aspect == :all || :profile
|
||||
= status.hidden_field( :public)
|
||||
= image_tag "icons/globe.png", :title => t('.public'), :class => 'public_icon dim', :width => 16, :height => 16
|
||||
- if current_user.services
|
||||
- for service in current_user.services
|
||||
= image_tag "social_media_logos/#{service.provider}-16x16.png", :title => service.provider, :class => "service_icon dim", :id =>"#{service.provider}"
|
||||
= status.submit t('.share'), :disable_with => t('.posting'), :class => 'button'
|
||||
= status.submit t('.share'), :disable_with => t('.posting'), :class => 'button', :tabindex => 2
|
||||
|
||||
.facebox_content
|
||||
#question_mark_pane
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ en:
|
|||
notifications:
|
||||
request_accepted: "accepted your share request."
|
||||
new_request: "offered to share with you."
|
||||
private_message: "sent you a message."
|
||||
comment_on_post: "commented on your"
|
||||
also_commented: "also commented on %{post_author}'s"
|
||||
mentioned: "has mentioned you in their"
|
||||
|
|
@ -513,7 +514,6 @@ en:
|
|||
|
||||
shared:
|
||||
publisher:
|
||||
mention_helper_text: "to mention someone, press '@' and start typing their name"
|
||||
posting: "Posting..."
|
||||
share: "Share"
|
||||
post_a_message_to: "Post a message to %{aspect}"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ eve.person.profile.update_attributes(:first_name => "Eve", :last_name => "Doe")
|
|||
connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
|
||||
connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
|
||||
|
||||
alice.services << Services::Facebook.create(:user_id => alice.id, :uid => 'a1')
|
||||
bob.services << Services::Facebook.create(:user_id => bob.id, :uid => 'b2')
|
||||
eve.services << Services::Facebook.create(:user_id => eve.id, :uid => 'e3')
|
||||
alice.services << Services::Facebook.create(:user_id => alice.id, :uid => 'a1', :access_token => "secret 1")
|
||||
bob.services << Services::Facebook.create(:user_id => bob.id, :uid => 'b2', :access_token => "secret 2")
|
||||
eve.services << Services::Facebook.create(:user_id => eve.id, :uid => 'e3', :access_token => "secret 3")
|
||||
|
|
|
|||
|
|
@ -1615,6 +1615,18 @@ h3 span.current_gs_step
|
|||
:padding 12px
|
||||
:color #fff
|
||||
|
||||
:vertical
|
||||
:align middle
|
||||
|
||||
.avatar
|
||||
:display inline-block
|
||||
:height 20px
|
||||
:width 20px
|
||||
:margin
|
||||
:right 5px
|
||||
:vertical
|
||||
:align middle
|
||||
|
||||
.bottom_notification
|
||||
:position fixed
|
||||
:bottom 0
|
||||
|
|
|
|||
2
public/stylesheets/vendor/autoSuggest.css
vendored
2
public/stylesheets/vendor/autoSuggest.css
vendored
|
|
@ -32,6 +32,8 @@ ul.as-selections li.as-selection-item {
|
|||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ddeefe), to(#bfe0f1));
|
||||
border: 1px solid #acc3ec;
|
||||
padding: 0;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 6px;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
|
|
|
|||
|
|
@ -284,10 +284,21 @@ describe AspectsController do
|
|||
end
|
||||
|
||||
describe '#edit' do
|
||||
before do
|
||||
@bob = bob
|
||||
@eve = eve
|
||||
end
|
||||
it 'renders' do
|
||||
get :edit, :id => @alices_aspect_1.id
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
it 'assigns the contacts in alphabetical order' do
|
||||
connect_users(@alice, @alices_aspect_1, @eve, @eve.aspects.first)
|
||||
|
||||
get :edit, :id => @alices_aspect_1.id
|
||||
assigns[:contacts].should == [@alice.contact_for(@bob.person), @alice.contact_for(@eve.person)]
|
||||
end
|
||||
end
|
||||
|
||||
describe "#toggle_contact_visibility" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue