Remove post from the mobile site
This commit is contained in:
parent
795a7a5751
commit
73825ab94a
6 changed files with 48 additions and 2 deletions
|
|
@ -52,6 +52,7 @@
|
|||
* Implement tag search autocomplete in header search box [#4169](https://github.com/diaspora/diaspora/issues/4169)
|
||||
* Uncheck 'make contacts visible to each other' by default when adding new aspect. [#4343](https://github.com/diaspora/diaspora/issues/4343)
|
||||
* Add possibility to ask for Bitcoin donations [#4375](https://github.com/diaspora/diaspora/pull/4375)
|
||||
* Remove posts and private conversations from the mobile site. [#4408](https://github.com/diaspora/diaspora/pull/4408)
|
||||
|
||||
|
||||
# 0.1.1.0
|
||||
|
|
|
|||
|
|
@ -1272,3 +1272,10 @@ input#q.search {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.remove_post {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 5px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
|
|
|||
27
app/views/conversations/_show.mobile.haml
Normal file
27
app/views/conversations/_show.mobile.haml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.conversation_participants
|
||||
.right
|
||||
= link_to(image_tag('deletelabel.png'), conversation_visibility_path(conversation), :method => 'delete', :data => { :confirm => "#{t('.delete')}?" }, :class => "remove")
|
||||
|
||||
%h3{ :class => direction_for(conversation.subject) }
|
||||
= conversation.subject
|
||||
|
||||
- for participant in conversation.participants
|
||||
= person_image_link(participant, :size => :thumb_small)
|
||||
|
||||
.span-15.last
|
||||
.stream
|
||||
= render :partial => 'messages/message', :collection => conversation.messages
|
||||
|
||||
.stream_element.new_message
|
||||
.media
|
||||
.img
|
||||
= owner_image_tag(:thumb_small)
|
||||
|
||||
.bd
|
||||
= form_for [conversation, Message.new] do |message|
|
||||
= message.text_area :text, :rows => 5, :tabindex => 1
|
||||
= message.submit t('.reply').capitalize, 'data-disable-with' => t('.replying'), :class => 'button creation', :tabindex => 2
|
||||
|
|
@ -5,6 +5,11 @@
|
|||
.from
|
||||
= person_image_link(post.author, :size => :thumb_small)
|
||||
= person_link(post.author)
|
||||
|
||||
.remove_post
|
||||
- if post.author == current_user.person
|
||||
= link_to(image_tag('deletelabel.png'), post_path(post), :method => :delete, :data => { :confirm => "#{t('are_you_sure')}" }, :class => "remove")
|
||||
|
||||
.info
|
||||
%span.time{:integer => post.created_at.to_i}
|
||||
= link_to(t('ago', :time => time_ago_in_words(post.created_at)), post_path(post))
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Feature: private messages mobile
|
|||
And a user with username "bob" is connected with "alice_awesome"
|
||||
And I toggle the mobile view
|
||||
|
||||
Scenario: send a mobile message
|
||||
Scenario: send and delete a mobile message
|
||||
Given I send a mobile message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
||||
Then I should see "Greetings" within ".ltr"
|
||||
And I should see "Greetings" within ".ltr"
|
||||
|
|
@ -22,3 +22,6 @@ Feature: private messages mobile
|
|||
And I reply with "hey, how you doing?"
|
||||
And I press the first ".ltr" within ".conversation"
|
||||
Then I should see "hey, how you doing?"
|
||||
When I click on selector "a.remove"
|
||||
And I confirm the alert
|
||||
Then I should not see "hey, how you doing"
|
||||
|
|
|
|||
|
|
@ -18,13 +18,16 @@ Feature: posting from the mobile main page
|
|||
And I have user with username "alice" in an aspect called "PostingTo"
|
||||
And I have user with username "alice" in an aspect called "NotPostingThingsHere"
|
||||
|
||||
Scenario: posting some text
|
||||
Scenario: post and delete some text
|
||||
Given I publisher mobile page
|
||||
And I append "I am eating yogurt" to the publisher mobile
|
||||
And I select "Unicorns" from "aspect_ids_"
|
||||
And I press "Share"
|
||||
When I visit the mobile stream page
|
||||
Then I should see "I am eating yogurt"
|
||||
When I click on selector "a.remove"
|
||||
And I confirm the alert
|
||||
Then I should not see "I am eating yogurt"
|
||||
|
||||
Scenario: post a photo without text
|
||||
Given I publisher mobile page
|
||||
|
|
|
|||
Loading…
Reference in a new issue