Commit 91aa12b46a305e05e92e1643184d85af69c2ec5e

Authored by Victor Costa
2 parents 8f7a816a d9da79bc

Merge branch 'stable' of gitlab.com:participa/noosfero into stable

app/controllers/my_profile/profile_editor_controller.rb
@@ -21,6 +21,7 @@ class ProfileEditorController < MyProfileController @@ -21,6 +21,7 @@ class ProfileEditorController < MyProfileController
21 Profile.transaction do 21 Profile.transaction do
22 Image.transaction do 22 Image.transaction do
23 begin 23 begin
  24 + params[:profile_data][:visible] = params[:profile_data][:visible] == '0'
24 @plugins.dispatch(:profile_editor_transaction_extras) 25 @plugins.dispatch(:profile_editor_transaction_extras)
25 @profile_data.update_attributes!(params[:profile_data]) 26 @profile_data.update_attributes!(params[:profile_data])
26 redirect_to :action => 'index', :profile => profile.identifier 27 redirect_to :action => 'index', :profile => profile.identifier
app/models/community.rb
1 class Community < Organization 1 class Community < Organization
2 2
3 - attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type, :address_reference, :district, :tag_list, :language 3 + attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type, :address_reference, :district, :tag_list, :language, :visible
4 after_destroy :check_invite_member_for_destroy 4 after_destroy :check_invite_member_for_destroy
5 5
6 def self.type_name 6 def self.type_name
app/views/profile_editor/edit.html.erb
@@ -32,6 +32,9 @@ @@ -32,6 +32,9 @@
32 <%= labelled_radio_button _('Private &mdash; show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %> 32 <%= labelled_radio_button _('Private &mdash; show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
33 </div> 33 </div>
34 <% else %> 34 <% else %>
  35 + <div style="border-bottom: 1px solid #e0e0e0; padding-bottom: 7px; margin-bottom: 7px;">
  36 + <%= labelled_check_box _('Hidden &mdash; this group will be visible only by members'), 'profile_data[visible]', false, !@profile.visible %>
  37 + </div>
35 <div> 38 <div>
36 <%= labelled_radio_button _('Public &mdash; show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %> 39 <%= labelled_radio_button _('Public &mdash; show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
37 </div> 40 </div>
script/updatepo/data/pt.upo
@@ -83,3 +83,4 @@ msgid &quot;Most Recent&quot;# msgstr &quot;Mais Recentes&quot; @@ -83,3 +83,4 @@ msgid &quot;Most Recent&quot;# msgstr &quot;Mais Recentes&quot;
83 msgid "Order"# msgstr "Ordenação" 83 msgid "Order"# msgstr "Ordenação"
84 msgid "For community admins or specific users"# msgstr "Para administradores da comunidade ou usuários específicos" 84 msgid "For community admins or specific users"# msgstr "Para administradores da comunidade ou usuários específicos"
85 msgid "For all community members"# msgstr "Para todos os usuários da comunidade" 85 msgid "For all community members"# msgstr "Para todos os usuários da comunidade"
  86 +msgid "Hidden &mdash; this group will be visible only by members"# msgstr "Oculto &mdash; este grupo será visível apenas por membros"