Skip to content
Extraits de code Groupes Projets
Valider 0965b45f rédigé par maxwell's avatar maxwell
Parcourir les fichiers

fixing getting started 2

parent ffedd9fa
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -20,8 +20,12 @@ class AspectsController < ApplicationController ...@@ -20,8 +20,12 @@ class AspectsController < ApplicationController
def create def create
@aspect = current_user.aspects.create(params[:aspect]) @aspect = current_user.aspects.create(params[:aspect])
if @aspect.valid? if @aspect.valid?
flash[:notice] = I18n.t('aspects.create.success') flash[:notice] = I18n.t('aspects.create.success', :name => @aspect.name)
respond_with @aspect if current_user.getting_started
redirect_to :back
else
respond_with @aspect
end
else else
flash[:error] = I18n.t('aspects.create.failure') flash[:error] = I18n.t('aspects.create.failure')
redirect_to :back redirect_to :back
......
...@@ -11,32 +11,8 @@ ...@@ -11,32 +11,8 @@
%h3= t('.existing') %h3= t('.existing')
= render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage) = render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage)
.span-7.last .span-7.last
%h3= t('aspects.manage.add_a_new_contact') = render 'shared/add_contact', :aspect => aspect
= 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"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
$(".aspects li").find(".delete").live("click", function(){ $(".aspects li").find(".delete").live("click", function(){
var aspectElement = $(this).parent("li"); var aspectElement = $(this).parent("li");
if (confirm(#{t('are_you_sure')})){ if (confirm("#{t('are_you_sure')}")){
aspectElement.fadeOut(300, function(){aspectElement.remove();}); aspectElement.fadeOut(300, function(){aspectElement.remove();});
} }
}); });
......
-# Copyright (c) 2010, Diaspora Inc. This file is -# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
%h3 %h3
= t('.your_aspects') = t('.your_aspects')
.description .description
...@@ -10,7 +8,7 @@ ...@@ -10,7 +8,7 @@
%h4 %h4
= t('.aspect_name') = 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.text_field :name, :style => "display:inline;"
= aspect.submit t('.add') = aspect.submit t('.add')
......
...@@ -139,7 +139,7 @@ en: ...@@ -139,7 +139,7 @@ en:
name: "Name" name: "Name"
create: "Create" create: "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." failure: "Aspect creation failed."
destroy: destroy:
success: "%{name} was successfully removed." success: "%{name} was successfully removed."
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter