From e8a266b6dde1c9f0cc0d8bf0d6e3ed5b66ac99ea Mon Sep 17 00:00:00 2001 From: Michael Sofaer and Raphael Sofaer Date: Thu, 25 Nov 2010 23:17:27 -0500 Subject: [PATCH] Make the getting_started aspects page more like the manage page --- app/controllers/users_controller.rb | 1 + .../users/getting_started/_step_2.html.haml | 56 +++++++++++++------ config/locales/diaspora/en.yml | 2 + 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 899e6620f..e3129760d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -74,6 +74,7 @@ class UsersController < ApplicationController @person = @user.person @profile = @user.profile @services = @user.services + @requests = @user.pending_requests @step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1 @step ||= 1 diff --git a/app/views/users/getting_started/_step_2.html.haml b/app/views/users/getting_started/_step_2.html.haml index 235280dda..d094b063c 100644 --- a/app/views/users/getting_started/_step_2.html.haml +++ b/app/views/users/getting_started/_step_2.html.haml @@ -1,33 +1,55 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. +- content_for :head do + = include_javascripts :aspects + %h3 = t('.your_aspects') .description = t('.description') +%h3 + = t('.your_inviter') + +%h3 + %ul.dropzone + - if @requests.size < 1 + %li=t('.no_requests') + - else + - for request in @requests + %li.person.request{:data=>{:guid=>request.id, :person_id=>request.from.id}} + = person_image_link(request.from) + .requests + %p= "#{t('.drag_to_add')} =>" + + +%ul#aspect_list + - for aspect in @aspects + %li.aspect{:data=>{:guid=>aspect.id}} + + .aspect_name + %span.edit_name_field + %h3{:contenteditable=>true} + = aspect.name + %span.tip click to edit + + %ul.tools + %li!= remove_link(aspect) + + %ul.dropzone{:data=>{:aspect_id=>aspect.id}} + -for contact in aspect.contacts + %li.person{:data=>{:guid=>contact.person.id, :aspect_id=>aspect.id}} + .delete + .x + X + .circle + = person_image_link(contact.person) %h4 = t('.aspect_name') = form_for Aspect.new do |aspect| = aspect.text_field :name, :style => "display:inline;" = aspect.submit t('.add') - -%ul.aspects - - for aspect in @aspects - %li{:style=>"position:relative;"} - = aspect - .contact_pictures.horizontal - - for contact in aspect.contacts - = person_image_link(contact.person) - - = link_to (image_tag('add_contact_button.png', :title => t('shared.aspect_contacts.add_to', :aspect => aspect))), '#manage_aspect_contacts_pane', :class => 'manage_aspect_contacts_button' - - .fancybox_content - #manage_aspect_contacts_pane - = render "requests/manage_aspect_contacts", :aspect => aspect, :getting_started => 2 - - = link_to "x", aspect_path(aspect), :method => :delete, :remote => true, :class => "delete right" - %br %br diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 0585eec91..37a3af105 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -189,6 +189,8 @@ en: description: "Tell Diaspora what different aspects of you are seen by different contacts. You can manage these later through your account menu at the top right. Your aspects are unique to you and not visible by others." aspect_name: "Aspect name" add: "Add" + your_inviter: "Here are the people who are waiting for you:" + drag_to_add: "Drag them to the aspect of yourself they know" step_3: your_services: "Your services" description: 'You are able to connect your existing social networks to your Diaspora account. You will be able to post publically through your Home page when you select “make public"'