diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 081c4d484..24f8fcc52 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -101,11 +101,16 @@ class AspectsController < ApplicationController def update @aspect = current_user.aspects.where(:id => params[:id]).first - if @aspect.update_attributes( params[:aspect] ) + + if @aspect.update_attributes!( params[:aspect] ) + #hack, we don't know why mass assignment is not working + @aspect.contacts_visible = params[:aspect][:contacts_visible] + @aspect.save flash[:notice] = I18n.t 'aspects.update.success',:name => @aspect.name else flash[:error] = I18n.t 'aspects.update.failure',:name => @aspect.name end + respond_with @aspect end diff --git a/app/views/aspects/edit.html.haml b/app/views/aspects/edit.html.haml index f9769fdeb..be6dbe406 100644 --- a/app/views/aspects/edit.html.haml +++ b/app/views/aspects/edit.html.haml @@ -16,13 +16,15 @@ = render 'shared/contact_list', :aspect => @aspect, :contacts => @contacts #aspect_edit_controls - = link_to t('.rename'), '#' - \/ = link_to t('delete'), @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect') - #rename_aspect = form_for @aspect do |asp| - = asp.text_field :name, :value => @aspect.name - = asp.submit t('.rename_aspect') + = asp.text_field :name + %p.checkbox_select{:style => 'font-size:14px'} + = asp.label :contacts_visible, t('.make_aspect_list_visible') + = asp.check_box :contacts_visible + %br + %div{:style => "text-align:right;"} + = asp.submit t('.save') diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index c7e648089..fa6649996 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -13,6 +13,7 @@ %hr{:style=>"width:300px;"} .section.contact_pictures %h4 + = @contacts_of_contact.length = t('.similar_contacts') - for person in @contacts_of_contact = person_image_link person diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 346a26b26..64a2ea808 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -144,8 +144,9 @@ en: remove_aspect: "Delete this aspect" confirm_remove_aspect: "Are you sure you want to delete this aspect?" add_existing: "Add an existing contact" - rename_aspect: "Rename aspect" + save: "Save" rename: "rename" + make_aspect_list_visible: "make aspect list visible to others in aspect" aspect_contacts: done_editing: "done editing" show: