remove comments from the mobile site. Close #4225
This commit is contained in:
parent
73825ab94a
commit
d1c679cc22
5 changed files with 16 additions and 5 deletions
|
|
@ -52,7 +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)
|
||||
* Remove posts, comments and private conversations from the mobile site. [#4408](https://github.com/diaspora/diaspora/pull/4408) [#4409](https://github.com/diaspora/diaspora/pull/4409)
|
||||
|
||||
|
||||
# 0.1.1.0
|
||||
|
|
|
|||
|
|
@ -1279,3 +1279,7 @@ input#q.search {
|
|||
right: 5px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.remove_comment {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ class CommentsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.js { render :nothing => true, :status => 204 }
|
||||
format.json { render :nothing => true, :status => 204 }
|
||||
format.mobile{ redirect_to @comment.post }
|
||||
format.mobile{ redirect_to :back }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.mobile {redirect_to :back}
|
||||
format.mobile { redirect_to :back }
|
||||
format.any(:js, :json) {render :nothing => true, :status => 403}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
%li.comment{:data=>{:guid=>comment.id}, :class => ("hidden" if(defined? hidden))}
|
||||
.content
|
||||
.remove_comment
|
||||
.right
|
||||
- if comment.author == current_user.person
|
||||
= link_to(image_tag('deletelabel.png'), comment_path(comment), :method => :delete, :data => { :confirm => "#{t('are_you_sure')}" }, :class => "remove")
|
||||
.from
|
||||
= person_image_link(comment.author)
|
||||
= person_link(comment.author)
|
||||
|
|
@ -13,4 +17,3 @@
|
|||
|
||||
%div{:class => direction_for(comment.text)}
|
||||
= markdownify(comment)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Feature: reactions mobile post
|
|||
And I click on selector "a.show_comments"
|
||||
And I should see "1" within ".like_count"
|
||||
|
||||
Scenario: comment a mobile post
|
||||
Scenario: comment and delete a mobile post
|
||||
When I click on selector "a.image_link.comment_action.inactive"
|
||||
And I fill in the following:
|
||||
| text | is that a poodle? |
|
||||
|
|
@ -32,3 +32,7 @@ Feature: reactions mobile post
|
|||
And I should see "1 reaction" within ".show_comments"
|
||||
And I click on selector "a.show_comments"
|
||||
And I should see "1" within ".comment_count"
|
||||
When I click on selector "a.image_link.comment_action.inactive"
|
||||
And I click on selector "a.remove"
|
||||
And I confirm the alert
|
||||
Then I should not see "1 reaction" within ".show_comments"
|
||||
|
|
|
|||
Loading…
Reference in a new issue