Commit 0965b45f authored by maxwell's avatar maxwell

fixing getting started 2

parent ffedd9fa
......@@ -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
......
......@@ -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
......@@ -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();});
}
});
......
-# 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')
......
......@@ -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."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment