[Git][noosfero/noosfero][master] 2 commits: New topics now accepts reply by default
Rodrigo Souto
gitlab at gitlab.com
Thu Oct 8 10:42:33 BRT 2015
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
66eb5163 by Simiao Carvalho at 2015-10-07T18:29:35Z
New topics now accepts reply by default
Signed-off-by: Brenddon Gontijo <brenddongontijo at msn.com>
Signed-off-by: Eduardo Vital <vitaldu at gmail.com>
Signed-off-by: Jessica Cristina <jessica.cris1127 at gmail.com>
Signed-off-by: Simiao Carvalho <simiaosimis at gmail.com>
Signed-off-by: Tallys Martins <tallysmartins at gmail.com>
- - - - -
5e8e25e9 by Rodrigo Souto at 2015-10-08T13:41:31Z
Merge branch 'new_topic_comments_default_permission' into 'master'
Explicit hidden filed on topic creation(forum)
Users reported the confusing behaviour of "new topic" feature. This MR makes explicit the option that allows users to "leave comments" at the time they create a new topic instead of only the edition.
See [travis-ci](https://travis-ci.org/tallysmartins/noosfero/jobs/84188394) for test status for this branch.
See merge request !699
- - - - -
2 changed files:
- app/helpers/article_helper.rb
- test/functional/cms_controller_test.rb
Changes:
=====================================
app/helpers/article_helper.rb
=====================================
--- a/app/helpers/article_helper.rb
+++ b/app/helpers/article_helper.rb
@@ -23,13 +23,11 @@ module ArticleHelper
) :
'') +
- (article.parent && article.parent.forum? && controller.action_name == 'new' ?
- hidden_field_tag('article[accept_comments]', 1) :
content_tag(
'div',
check_box(:article, :accept_comments) +
content_tag('label', (article.parent && article.parent.forum? ? _('This topic is opened for replies') : _('I want to receive comments about this article')), :for => 'article_accept_comments')
- )) +
+ ) +
content_tag(
'div',
=====================================
test/functional/cms_controller_test.rb
=====================================
--- a/test/functional/cms_controller_test.rb
+++ b/test/functional/cms_controller_test.rb
@@ -1601,11 +1601,11 @@ class CmsControllerTest < ActionController::TestCase
assert_no_tag :tag => 'input', :attributes => { :type => 'checkbox', :name => 'article[display_posts_in_current_language]', :checked => 'checked' }
end
- should 'not display accept comments option when creating forum post' do
+ should 'display accept comments option when creating forum post' do
profile.articles << f = Forum.new(:name => 'Forum for test')
get :new, :profile => profile.identifier, :type => 'TinyMceArticle', :parent_id => f.id
- assert :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'hidden'}
- assert_no_tag :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'checkbox'}
+ assert_no_tag :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'hidden'}
+ assert_tag :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'checkbox'}
end
should 'display accept comments option when creating an article that is not a forum post' do
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/5f1ce128974895608c9ffa55f6d4492932560997...5e8e25e98cf06dc6413596aebb6869559de93b1a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20151008/b50d3abb/attachment-0001.html>
More information about the Noosfero-dev
mailing list