diff --git a/Changelog.md b/Changelog.md index 8cc0b22b2..f11f2832e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 diff --git a/app/assets/stylesheets/mobile.css.scss b/app/assets/stylesheets/mobile.css.scss index 76c3795ba..231cf0031 100644 --- a/app/assets/stylesheets/mobile.css.scss +++ b/app/assets/stylesheets/mobile.css.scss @@ -1279,3 +1279,7 @@ input#q.search { right: 5px; opacity: 0.5; } + +.remove_comment { + opacity: 0.5; +} diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 9f4786cf8..18de5d16a 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -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 diff --git a/app/views/comments/_comment.mobile.haml b/app/views/comments/_comment.mobile.haml index 3a6bdd586..8743e2fbc 100644 --- a/app/views/comments/_comment.mobile.haml +++ b/app/views/comments/_comment.mobile.haml @@ -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) - diff --git a/features/reactions_mobile.feature b/features/reactions_mobile.feature index 315d74876..29c46097b 100644 --- a/features/reactions_mobile.feature +++ b/features/reactions_mobile.feature @@ -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"