diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 4ce488973ad082371589ebc29c6d9f6a56d46519..d093575581b7fef9957d92c0c367eeeae74882df 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -20,8 +20,12 @@ class AspectsController < ApplicationController def create @aspect = current_user.aspects.create(params[:aspect]) if @aspect.valid? - flash[:notice] = I18n.t('aspects.create.success') - respond_with @aspect + flash[:notice] = I18n.t('aspects.create.success', :name => @aspect.name) + if current_user.getting_started + redirect_to :back + else + respond_with @aspect + end else flash[:error] = I18n.t('aspects.create.failure') redirect_to :back diff --git a/app/views/requests/_manage_aspect_contacts.haml b/app/views/requests/_manage_aspect_contacts.haml index 302a9f08d4b32ae32664f9f83e00e2d780cf23b3..cf6270f8c976a62499ddf327aff1afec62a57c7e 100644 --- a/app/views/requests/_manage_aspect_contacts.haml +++ b/app/views/requests/_manage_aspect_contacts.haml @@ -11,32 +11,8 @@ %h3= t('.existing') = render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage) + + + .span-7.last - %h3= t('aspects.manage.add_a_new_contact') - = form_tag(person_by_handle_path, :id => "new_request_to_#{aspect.id}", :class => "webfinger_form", :remote => true) do - =t('.enter_a_diaspora_username') - %br - %i= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle - - %p - = label_tag :diaspora_handle, t('.contact_username'), :for => "request_d_handle_to_#{aspect.id}" - = text_field_tag :diaspora_handle,'', :id => "request_d_handle_to_#{aspect.id}" - = hidden_field_tag :aspect_id, aspect.id - - - if defined?(getting_started) - = hidden_field_tag :getting_started, getting_started - - if defined?(manage) - = hidden_field_tag :manage, true - - = submit_tag t('.create_request') - %br - .spinner.hidden= image_tag 'ajax-loader.gif' - %ul{:class => 'webfinger_result stream', :aspect_id => aspect.id} - %li.error.hidden - .webfinger_error - = link_to t('.know_email'), "#invite_user_pane", :class => "invite_user_button" - %br - .yo{ :style => "display:none;"} - .invite_user_pane - = render "invitations/new" - + = render 'shared/add_contact', :aspect => aspect diff --git a/app/views/users/getting_started.html.haml b/app/views/users/getting_started.html.haml index 8b2a5b617b7fbfae412296b643c197d540c61ca6..503d437bf7d61c34cd6df0ffdcdd86e297cc0f78 100644 --- a/app/views/users/getting_started.html.haml +++ b/app/views/users/getting_started.html.haml @@ -12,7 +12,7 @@ $(".aspects li").find(".delete").live("click", function(){ var aspectElement = $(this).parent("li"); - if (confirm(#{t('are_you_sure')})){ + if (confirm("#{t('are_you_sure')}")){ aspectElement.fadeOut(300, function(){aspectElement.remove();}); } }); diff --git a/app/views/users/getting_started/_step_2.html.haml b/app/views/users/getting_started/_step_2.html.haml index 71a5159a1722fec53489f57a5e668560a6b92049..235280dda8f8bd363408ac88e70e94403039f890 100644 --- a/app/views/users/getting_started/_step_2.html.haml +++ b/app/views/users/getting_started/_step_2.html.haml @@ -1,8 +1,6 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - - %h3 = t('.your_aspects') .description @@ -10,7 +8,7 @@ %h4 = t('.aspect_name') - = form_for Aspect.new, :remote => true, :format => :json do |aspect| + = form_for Aspect.new do |aspect| = aspect.text_field :name, :style => "display:inline;" = aspect.submit t('.add') diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 2f1648c748b4af6ba83a2ec72c14ce53fbb752a8..055a7ee832a6e0ddc56a5805b4ba28675edecb35 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -139,7 +139,7 @@ en: name: "Name" create: "Create" create: - success: "Click on the plus on the left side to tell Diaspora who can see your new aspect." + success: "Your new aspect %{name} was created" failure: "Aspect creation failed." destroy: success: "%{name} was successfully removed."