various bugfixes, added missing translations, made all tests pass (rspec, cucumber, jasmine)
This commit is contained in:
parent
1a2ba034ab
commit
8bf6ad45a5
25 changed files with 119 additions and 56 deletions
|
|
@ -72,7 +72,7 @@ class AspectsController < ApplicationController
|
|||
@contact = current_user.share_with(@person, @aspect)
|
||||
end
|
||||
else
|
||||
respond_with @aspect
|
||||
redirect_to contacts_path(:a_id => @aspect.id)
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
|
|||
|
|
@ -110,4 +110,12 @@ module ApplicationHelper
|
|||
def controller_index_path
|
||||
self.send((request.filtered_parameters["controller"] + "_path").to_sym)
|
||||
end
|
||||
|
||||
def left_nav_root
|
||||
if request.filtered_parameters["controller"] == "contacts"
|
||||
t('contacts.index.my_contacts')
|
||||
else
|
||||
t('aspects.index.your_aspects')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
%ul#aspect_nav.left_nav
|
||||
%li.all_aspects{:class => ("active" if params["set"] != "all" && params["set"] != "only_sharing")}
|
||||
%a.aspect_selector{:href => controller_index_path, :class => ("sub_selected" if params["a_id"])}
|
||||
%a.home_selector{:href => controller_index_path, :class => ("sub_selected" if params["a_id"])}
|
||||
.contact_count
|
||||
= my_contacts_count
|
||||
= t('contacts.index.my_contacts')
|
||||
= left_nav_root
|
||||
|
||||
%ul.sub_nav
|
||||
- for aspect in all_aspects
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
%h3
|
||||
- if @aspect == :all
|
||||
Stream
|
||||
= t('.stream')
|
||||
- else
|
||||
= @aspects.to_sentence
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
|
||||
#no_posts.empty_message{:class => ("hidden" unless post_count == 0)}
|
||||
%h4
|
||||
=t('.start_talking')
|
||||
= t('.start_talking')
|
||||
= link_to t('.try_adding_some_more_contacts'), contacts_path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,23 @@
|
|||
#selected_aspect_contacts.section
|
||||
.title.no_icon
|
||||
%h5
|
||||
= "Contacts (#{count})"
|
||||
- if @aspect == :all || @aspect_ids.size > 1
|
||||
= "#{t('_contacts')}"
|
||||
- else
|
||||
= @aspect.name
|
||||
= "(#{count})"
|
||||
|
||||
.content
|
||||
- for contact in contacts
|
||||
= person_image_link contact.person
|
||||
- if contacts.size > 0
|
||||
- for contact in contacts
|
||||
= person_image_link contact.person
|
||||
|
||||
- if @aspect_ids.size > 1
|
||||
= link_to t('.view_all_contacts'), contacts_path, :id => "view_all_contacts_link"
|
||||
- else
|
||||
= link_to t('.view_all_contacts'), contacts_path(:a_id => @aspect.id), :id => "view_all_contacts_link"
|
||||
|
||||
- else
|
||||
= t('.no_contacts')
|
||||
= link_to t('.manage_your_aspects'), contacts_path
|
||||
|
||||
|
|
|
|||
|
|
@ -66,4 +66,3 @@
|
|||
.content
|
||||
= render "shared/invitations", :invites => @invites
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#people_stream.stream.contacts
|
||||
- if @aspect_
|
||||
#aspect_controls
|
||||
= link_to "Edit #{@aspect_.name}", edit_aspect_path(@aspect_), :rel => "facebox"
|
||||
= link_to "start a conversation", new_conversation_path(:aspect_id => @aspect_.id, :name => @aspect_.name), :class => "button conversation_button", :rel => "facebox"
|
||||
= link_to t('.start_a_conversation'), new_conversation_path(:aspect_id => @aspect_.id, :name => @aspect_.name), :class => "button conversation_button", :rel => "facebox"
|
||||
= link_to t('.edit_aspect', :name => @aspect_.name), edit_aspect_path(@aspect_), :rel => "facebox"
|
||||
|
||||
- if @contacts.size > 0
|
||||
- for contact in @contacts
|
||||
|
|
@ -49,8 +49,8 @@
|
|||
.info
|
||||
= contact.person.diaspora_handle
|
||||
|
||||
= will_paginate @contacts
|
||||
- else
|
||||
%h3.no_contacts
|
||||
= t('.no_contacts')
|
||||
|
||||
= will_paginate @contacts
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
.content
|
||||
= form_for [conversation, Message.new] do |message|
|
||||
= message.text_area :text, :rows => 5
|
||||
= message.text_area :text, :rows => 5, :tabindex => 1
|
||||
.right
|
||||
= message.submit t('.reply').capitalize, :class => 'button'
|
||||
= message.submit t('cancel'), :name => "reset", :id => "reset_button", :type => "reset", :class => "button"
|
||||
= message.submit t('cancel'), :name => "reset", :id => "reset_button", :type => "reset", :class => "button", :tabindex => 3
|
||||
= message.submit t('.reply').capitalize, :class => 'button creation', :tabindex => 2
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
- if likes.size > 0
|
||||
.likes_container
|
||||
.likes
|
||||
= image_tag('icons/heart.png')
|
||||
= image_tag('icons/heart.svg')
|
||||
= link_to t('.people_like_this', :count => likes.length), "#", :class => "expand_likes"
|
||||
%span.hidden.likes_list
|
||||
= notification_people_link(nil, likes.map{|x| x.author})
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@
|
|||
= person_image_link(person, :size => :thumb_large, :to => :photos)
|
||||
|
||||
- if user_signed_in?
|
||||
- if person == current_user.person
|
||||
%p
|
||||
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path
|
||||
|
||||
- else
|
||||
- if person != current_user.person
|
||||
- if @contact && @contact.receiving?
|
||||
%br
|
||||
= link_to t('people.show.mention'), new_status_message_path(:person_id => @person.id), :class => 'button', :rel => 'facebox'
|
||||
|
|
|
|||
|
|
@ -22,12 +22,15 @@
|
|||
- if @contacts_of_contact.count > 8
|
||||
%p.see_all= link_to t('.see_all'), person_contacts_path(@person)
|
||||
|
||||
.span-15.last
|
||||
.span-18.last
|
||||
.stream_container
|
||||
#author_info
|
||||
- if user_signed_in? && current_user.person != @person
|
||||
.right
|
||||
.right
|
||||
- if user_signed_in? && current_user.person != @person
|
||||
= render 'aspect_memberships/aspect_dropdown', :contact => @contact, :person => @person, :hang => 'left'
|
||||
- else
|
||||
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
|
||||
|
||||
%h2
|
||||
= @person.name
|
||||
%span.diaspora_handle
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
- if photos.size > 0
|
||||
.photo_attachments
|
||||
= link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first)
|
||||
= link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first), :class => "big_stream_photo"
|
||||
- if photos.size > 1
|
||||
- if photos.size >= 8
|
||||
- for photo in photos[1..8]
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ en:
|
|||
aspect_contacts:
|
||||
done_editing: "done editing"
|
||||
aspect_stream:
|
||||
stream: "Stream"
|
||||
recently: "recently:"
|
||||
commented_on: "commented on"
|
||||
posted: "posted"
|
||||
|
|
@ -107,6 +108,12 @@ en:
|
|||
edit_aspect: "edit aspect"
|
||||
no_posts_message:
|
||||
start_talking: "Nobody has said anything yet!"
|
||||
try_adding_some_more_contacts: "Try adding some more contacts."
|
||||
|
||||
selected_contacts:
|
||||
view_all_contacts: "View all contacts"
|
||||
no_contacts: "You don't have any contacts here yet."
|
||||
manage_your_aspects: "Manage your aspects."
|
||||
|
||||
new:
|
||||
name: "Name"
|
||||
|
|
@ -135,6 +142,7 @@ en:
|
|||
family: "Family"
|
||||
work: "Work"
|
||||
index:
|
||||
your_aspects: "Your Aspects"
|
||||
handle_explanation: "This is your diaspora id. Like an email address, you can give this to people to reach you."
|
||||
no_contacts: "No contacts"
|
||||
post_a_message: "post a message >>"
|
||||
|
|
@ -186,6 +194,8 @@ en:
|
|||
sharing:
|
||||
people_sharing: "People sharing with you:"
|
||||
index:
|
||||
edit_aspect: "Edit %{name}"
|
||||
start_a_conversation: "Start a conversation"
|
||||
add_a_new_aspect: "Add a new aspect"
|
||||
title: "Contacts"
|
||||
your_contacts: "Your Contacts"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Feature: commenting
|
|||
And I fill in "status_message_fake_text" with "Look at this dog"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "My Contacts"
|
||||
And I follow "Your Aspects"
|
||||
Then I should see "Look at this dog" within ".stream_element"
|
||||
And I should see a "img" within ".stream_element div.photo_attachments"
|
||||
Then I log out
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Feature: sending and receiving requests
|
|||
And I add the person to my 2nd aspect
|
||||
|
||||
When I go to the home page
|
||||
When I follow "My Contacts"
|
||||
When I follow "Your Aspects"
|
||||
|
||||
Then I should have 1 contact in "Unicorns"
|
||||
Then I should have 1 contact in "Besties"
|
||||
|
|
@ -60,7 +60,7 @@ Feature: sending and receiving requests
|
|||
Then I go to the destroy user session page
|
||||
|
||||
When I sign in as "bob@bob.bob"
|
||||
When I follow "My Contacts"
|
||||
When I follow "Your Aspects"
|
||||
Then I should have 1 contacts in "Besties"
|
||||
|
||||
And I am on the home page
|
||||
|
|
@ -79,12 +79,12 @@ Feature: sending and receiving requests
|
|||
And I wait for the ajax to finish
|
||||
|
||||
When I go to the home page
|
||||
When I follow "My Contacts"
|
||||
When I follow "Your Aspects"
|
||||
Then I should have 1 contact in "Super People"
|
||||
Then I go to the destroy user session page
|
||||
|
||||
When I sign in as "bob@bob.bob"
|
||||
When I follow "My Contacts"
|
||||
When I follow "Your Aspects"
|
||||
Then I should have 1 contact in "Besties"
|
||||
|
||||
Scenario: should not see "Add to aspect" and see mention if already a follower
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ Feature: disconnecting users
|
|||
|
||||
Scenario: remove a non-mutual contact from the aspect edit page
|
||||
When I go to the home page
|
||||
And I follow "Contacts"
|
||||
And I follow "Besties"
|
||||
And I follow "Edit Besties"
|
||||
|
||||
And I wait for the ajax to finish
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ Feature: User manages contacts
|
|||
Given I am signed in
|
||||
And I have 2 contacts
|
||||
And I have an aspect called "Cat People"
|
||||
When I follow "My Contacts"
|
||||
When I follow "Contacts"
|
||||
And I follow "Cat People"
|
||||
And I follow "Edit Cat People"
|
||||
And I wait for the ajax to finish
|
||||
And I press the first ".contact_list .button"
|
||||
And I wait for the ajax to finish
|
||||
Then I should have 1 contact in "Cat People"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Feature: posting
|
|||
Given I expand the publisher
|
||||
When I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I follow "My Contacts"
|
||||
And I follow "Your Aspects"
|
||||
Then I should see "I am eating a yogurt" within ".stream_element"
|
||||
|
||||
Scenario: post a photo without text
|
||||
|
|
@ -30,7 +30,7 @@ Feature: posting
|
|||
Then I should see an uploaded image within the photo drop zone
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "My Contacts"
|
||||
And I follow "Your Aspects"
|
||||
Then I should see a "img" within ".stream_element:first div.photo_attachments"
|
||||
Then I log out
|
||||
And I sign in as "alice@alice.alice"
|
||||
|
|
@ -44,7 +44,7 @@ Feature: posting
|
|||
And I fill in "status_message_fake_text" with "Look at this dog"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "My Contacts"
|
||||
And I follow "Your Aspects"
|
||||
Then I should see a "img" within ".stream_element:first div.photo_attachments"
|
||||
And I should see "Look at this dog" within ".stream_element:first"
|
||||
Then I log out
|
||||
|
|
@ -76,12 +76,12 @@ Feature: posting
|
|||
When I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "My Contacts"
|
||||
And I follow "Your Aspects"
|
||||
And I hover over the post
|
||||
And I preemptively confirm the alert
|
||||
And I click to delete the first post
|
||||
And I wait for the ajax to finish
|
||||
And I follow "My Contacts"
|
||||
And I follow "Your Aspects"
|
||||
Then I should not see "I am eating a yogurt"
|
||||
|
||||
Scenario Outline: post to one aspect
|
||||
|
|
|
|||
9
public/images/icons/heart.svg
Executable file
9
public/images/icons/heart.svg
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="93.615px" viewBox="0 0 100 93.615" enable-background="new 0 0 100 93.615" xml:space="preserve">
|
||||
<path d="M99.866,23.353C98.533,10.235,87.456,0,73.988,0C63.193,0,53.938,6.575,50,15.937C46.062,6.575,36.807,0,26.013,0
|
||||
C12.544,0,1.466,10.235,0.134,23.353C0.045,24.227,0,25.115,0,26.013c0,31.606,38.788,46.523,50,67.603h0
|
||||
c11.212-21.079,50-35.996,50-67.603C100,25.115,99.955,24.227,99.866,23.353z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 808 B |
|
|
@ -7,10 +7,12 @@
|
|||
var Publisher = {
|
||||
close: function(){
|
||||
Publisher.form().addClass('closed');
|
||||
Publisher.form().find("#publisher_textarea_wrapper").removeClass('active');
|
||||
Publisher.form().find("textarea.ac_input").css('min-height', '');
|
||||
},
|
||||
open: function(){
|
||||
Publisher.form().removeClass('closed');
|
||||
Publisher.form().find("#publisher_textarea_wrapper").addClass('active');
|
||||
Publisher.form().find("textarea.ac_input").css('min-height', '42px');
|
||||
Publisher.determineSubmitAvailability();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -997,6 +997,7 @@ label
|
|||
@include opacity(0.5)
|
||||
|
||||
#publisher_textarea_wrapper
|
||||
|
||||
#hide_publisher
|
||||
@include opacity(0.3)
|
||||
:padding 3px
|
||||
|
|
@ -1012,6 +1013,9 @@ label
|
|||
:border 1px solid #ccc
|
||||
:background #fff
|
||||
|
||||
&.active
|
||||
:border 1px solid #999
|
||||
|
||||
:position relative
|
||||
:padding
|
||||
:right 10px
|
||||
|
|
@ -1620,6 +1624,7 @@ h3 span.current_gs_step
|
|||
:position relative
|
||||
:display inline-block
|
||||
:top 3px
|
||||
:min-width 170px
|
||||
|
||||
a:hover
|
||||
:text
|
||||
|
|
@ -2729,10 +2734,10 @@ h1.tag
|
|||
.title
|
||||
:position relative
|
||||
:border
|
||||
:bottom 1px solid #888
|
||||
:bottom 1px solid #ddd
|
||||
:padding 2px 0
|
||||
:top 0
|
||||
:left 24px
|
||||
:left 22px
|
||||
|
||||
&.no_icon
|
||||
:padding
|
||||
|
|
@ -2746,7 +2751,7 @@ h1.tag
|
|||
:color #777
|
||||
|
||||
h5
|
||||
:font-size 13px
|
||||
:font-size 12px
|
||||
:margin 0
|
||||
:color #666
|
||||
|
||||
|
|
@ -2761,7 +2766,7 @@ h1.tag
|
|||
:color #999
|
||||
:font-size 11px
|
||||
:margin
|
||||
:bottom 10px
|
||||
:bottom 25px
|
||||
|
||||
.subtle
|
||||
:color #888
|
||||
|
|
@ -2862,7 +2867,8 @@ ul.left_nav
|
|||
:position relative
|
||||
:width 100%
|
||||
|
||||
a.aspect_selector
|
||||
a.aspect_selector,
|
||||
a.home_selector
|
||||
:display block
|
||||
:width 100%
|
||||
:padding 3px 7px
|
||||
|
|
@ -2910,7 +2916,8 @@ ul.left_nav
|
|||
:margin 0
|
||||
li
|
||||
:width 155px
|
||||
a.aspect_selector
|
||||
a.aspect_selector,
|
||||
a.new_aspect
|
||||
:padding
|
||||
:left 15px
|
||||
:width 182px
|
||||
|
|
@ -2923,17 +2930,23 @@ ul.left_nav
|
|||
:display none !important
|
||||
|
||||
.left_nav
|
||||
a.aspect_selector
|
||||
a.aspect_selector,
|
||||
a.home_selector
|
||||
:width 150px
|
||||
ul.sub_nav
|
||||
:width 140px
|
||||
a.aspect_selector
|
||||
|
||||
a.aspect_selector,
|
||||
a.new_aspect
|
||||
:width 140px
|
||||
|
||||
li:hover
|
||||
.edit
|
||||
:display inline-block
|
||||
|
||||
.stream_container
|
||||
:min-height 500px
|
||||
|
||||
h3
|
||||
:margin
|
||||
:bottom 0
|
||||
|
|
@ -2958,6 +2971,7 @@ ul.left_nav
|
|||
:color #777
|
||||
|
||||
.no_contacts
|
||||
:position relative
|
||||
:text-align center
|
||||
:top 50px
|
||||
|
||||
|
|
@ -3022,6 +3036,14 @@ ul.left_nav
|
|||
:margin
|
||||
:bottom -2px
|
||||
|
||||
#view_all_contacts_link
|
||||
@include border-radius(2px)
|
||||
:display block
|
||||
:padding 5px
|
||||
:border 1px dotted #aaa
|
||||
:text-align center
|
||||
:margin 5px 0
|
||||
|
||||
.bottom_submit_section
|
||||
:display block
|
||||
:position relative
|
||||
|
|
@ -3036,3 +3058,6 @@ ul.left_nav
|
|||
.left
|
||||
:position absolute
|
||||
:left 0
|
||||
|
||||
.big_stream_photo
|
||||
:display block
|
||||
|
|
|
|||
|
|
@ -217,9 +217,9 @@ describe AspectsController do
|
|||
post :create, "aspect" => {"name" => "new aspect"}
|
||||
alice.reload.aspects.count.should == 3
|
||||
end
|
||||
it "redirects to the aspect page" do
|
||||
it "redirects to the aspect's contact page" do
|
||||
post :create, "aspect" => {"name" => "new aspect"}
|
||||
response.should redirect_to(aspect_path(Aspect.find_by_name("new aspect")))
|
||||
response.should redirect_to(contacts_path(:a_id => Aspect.find_by_name("new aspect").id))
|
||||
end
|
||||
|
||||
context "with person_id param" do
|
||||
|
|
|
|||
|
|
@ -6,13 +6,6 @@
|
|||
describe("Publisher", function() {
|
||||
|
||||
describe("initialize", function(){
|
||||
it("calls close when it does not have text", function(){
|
||||
spec.loadFixture('aspects_index');
|
||||
spyOn(Publisher, 'close');
|
||||
Publisher.initialize();
|
||||
expect(Publisher.close).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not call close when there is prefilled text", function(){
|
||||
spec.loadFixture('aspects_index_prefill');
|
||||
spyOn(Publisher, 'close');
|
||||
|
|
@ -224,6 +217,7 @@ describe("Publisher", function() {
|
|||
Publisher.initialize();
|
||||
});
|
||||
it("adds the closed class", function() {
|
||||
Publisher.form().removeClass('closed');
|
||||
expect(Publisher.form().hasClass('closed')).toBeFalsy();
|
||||
Publisher.close();
|
||||
expect(Publisher.form().hasClass('closed')).toBeTruthy();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ describe("Stream", function() {
|
|||
{show_more: 'Placeholder'}, 'en');
|
||||
Stream.initialize();
|
||||
stream_element = $('#main_stream .stream_element:first');
|
||||
expect(stream_element.find(".details").css('display')).toEqual('none');
|
||||
expect(stream_element.find("p .details").css('display')).toEqual('none');
|
||||
expect(stream_element.find(".read-more a").css('display')).toEqual('inline');
|
||||
stream_element.find(".read-more a").click();
|
||||
jasmine.Clock.tick(200);
|
||||
|
|
@ -51,7 +51,7 @@ describe("Stream", function() {
|
|||
link = $("a.show_post_comments");
|
||||
Diaspora.widgets.i18n.loadLocale(
|
||||
{'comments' : {'hide': 'comments.hide pl'}}, 'en');
|
||||
expect(link.text()).toEqual("show all comments");
|
||||
expect(link.text()).toEqual("Show 1 more comments");
|
||||
Stream.toggleComments.call(
|
||||
link, {preventDefault: function(){} }
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue