diff --git a/app/helpers/article_helper.rb b/app/helpers/article_helper.rb index d8903ee..d286384 100644 --- a/app/helpers/article_helper.rb +++ b/app/helpers/article_helper.rb @@ -6,11 +6,11 @@ module ArticleHelper content_tag('div', content_tag('div', radio_button(:article, :published, true) + - content_tag('label', _('Public (visible to other people)'), :for => 'article_published') + content_tag('label', _('Public (visible to other people)'), :for => 'article_published_true') ) + content_tag('div', radio_button(:article, :published, false) + - content_tag('label', _('Private')) + content_tag('label', _('Private'), :for => 'article_published_false') ) ) + content_tag('h4', _('Options')) + diff --git a/app/helpers/folder_helper.rb b/app/helpers/folder_helper.rb index d17500a..06c6f2a 100644 --- a/app/helpers/folder_helper.rb +++ b/app/helpers/folder_helper.rb @@ -62,21 +62,14 @@ module FolderHelper content_tag('div', content_tag('div', radio_button(:article, :published, true) + - content_tag('label', _('Public (visible to other people)'), :for => 'article_published') + content_tag('label', _('Public (visible to other people)'), :for => 'article_published_true') ) + content_tag('div', radio_button(:article, :published, false) + - content_tag('label', _('Private')) + content_tag('label', _('Private'), :for => 'article_published_false') ) ) + - content_tag('h4', _('Options')) + content_tag('div', - (article.can_display_hits? ? - content_tag( - 'div', - check_box(:article, :display_hits) + - content_tag('label', _('I want this article to display the number of hits it received'), :for => 'article_display_hits') - ) : '') + hidden_field_tag('article[accept_comments]', 0) ) end diff --git a/app/views/profile_editor/edit.rhtml b/app/views/profile_editor/edit.rhtml index dc5cb6c..74b9de0 100644 --- a/app/views/profile_editor/edit.rhtml +++ b/app/views/profile_editor/edit.rhtml @@ -25,43 +25,18 @@ <% if profile.person? %>
- <%= radio_button 'profile_data', 'public_profile', 'true' %> - <%= content_tag('label', _('Public'), :for => 'profile_data_public_profile_true') %> - — show my contents to all internet users + <%= labelled_radio_button _('Public — show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
- <%= radio_button 'profile_data', 'public_profile', 'false' %> - <%= content_tag('label', _('Private'), :for => 'profile_data_public_profile_false') %> - — show my contents only to friends + <%= labelled_radio_button _('Private — show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
<% else %> - - - - - - - - - - - - - - - - - - -
- <%= _('This profile is:') %> - - <%= radio_button 'profile_data', 'public_profile', 'true' %> - - - <%= radio_button 'profile_data', 'public_profile', 'false' %> - -
<%= _('Activate Intranet access (restricted area only for members)') %> <%= _('Yes') %><%= _('Yes') %>
<%= _('Include this group directory of groups') %> <%= _('Yes') %><%= _('Yes') %>
<%= _('Show content of this group to all internet users') %> <%= _('Yes') %><%= _('No') %>
<%= _('Show content of this group to members') %> <%= _('Yes') %><%= _('Yes') %>
+
+ <%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %> +
+
+ <%= labelled_radio_button _('Private — show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %> +
<% end %>

<%= _('Translations') %>

diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 4bc81fa..5de8814 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -965,7 +965,7 @@ class CmsControllerTest < ActionController::TestCase post :upload_files, :profile => profile.identifier, :parent_id => folder.id, :back_to => @request.referer, :uploaded_files => [fixture_file_upload('files/rails.png', 'image/png')] assert_template nil - assert_redirected_to 'http://colivre.net/testinguser/test-folder' + assert_redirected_to "#{profile.environment.top_url}/testinguser/test-folder" end should 'record when coming from public view on edit files with view true' do -- libgit2 0.21.2