From 4fb62afa2d5662f442588df2b0f244240f33c7bc Mon Sep 17 00:00:00 2001
From: Ilya Zhitomirskiy <iz268@nyu.edu>
Date: Wed, 21 Sep 2011 14:12:37 -0700
Subject: [PATCH] getting stated links open in new tabs, translated a string

---
 app/helpers/people_helper.rb         |  4 ++--
 app/views/users/getting_started.haml | 24 ++++++++++++------------
 config/locales/diaspora/en.yml       |  1 +
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb
index 400bc8ca58..2ac03af380 100644
--- a/app/helpers/people_helper.rb
+++ b/app/helpers/people_helper.rb
@@ -32,7 +32,7 @@ module PeopleHelper
     opts[:class] ||= ""
     opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
     remote_or_hovercard_link = "/people/#{person.id}".html_safe
-    "<a data-hovercard='#{remote_or_hovercard_link}' #{person_href(person)} class='#{opts[:class]}'>#{h(person.name)}</a>".html_safe
+    "<a data-hovercard='#{remote_or_hovercard_link}' #{person_href(person)} class='#{opts[:class]}' #{ ("target=" + opts[:target]) if opts[:target]}>#{h(person.name)} </a>".html_safe
   end
 
   def person_image_tag(person, size=nil)
@@ -45,7 +45,7 @@ module PeopleHelper
     if opts[:to] == :photos
       link_to person_image_tag(person, opts[:size]), person_photos_path(person)
     else
-      "<a #{person_href(person)} class='#{opts[:class]}'>
+      "<a #{person_href(person)} class='#{opts[:class]}' #{ ("target=" + opts[:target]) if opts[:target]}>
       #{person_image_tag(person, opts[:size])}
       </a>".html_safe
     end
diff --git a/app/views/users/getting_started.haml b/app/views/users/getting_started.haml
index cc5cb89ca3..525b507b65 100644
--- a/app/views/users/getting_started.haml
+++ b/app/views/users/getting_started.haml
@@ -43,7 +43,7 @@
                 = profile_field_tag(current_user.person.profile, attr)
 
           #edit_profile_button_div
-            = link_to t(".edit_profile"), edit_profile_path, :class => "button"
+            = link_to t(".edit_profile"), edit_profile_path, :class => "button", :target => "_blank"
 
       - unless AppConfig[:configured_services].blank?
         %li.services{:class => ("completed" if has_connected_services?)}
@@ -79,7 +79,7 @@
                 = person_link(diasporahq)
 
               .info
-                Get updates about the project from the core team.
+                = t('.get_updates_from_core')
 
               .add_to_aspect
                 = render :partial => 'people/relationship_action',
@@ -94,13 +94,13 @@
             %div
               - Person.featured_users[0..5].each do |person|
                 .featured_user_card_small
-                  = person_image_link(person)
-                  = person_link(person, :class => "hovercardable")
+                  = person_image_link(person, :target => "_blank")
+                  = person_link(person, :class => "hovercardable", :target => "_blank")
                   .tags
                     - person.profile.tags[0..2].each do |tg|
-                      = link_to "##{tg}", tag_path(tg.name)
+                      = link_to "##{tg}", tag_path(tg.name), :target => "_blank"
 
-            = link_to "#{t('.see_all_featured_users')} ->", featured_users_path
+            = link_to "#{t('.see_all_featured_users')} ->", featured_users_path, :target => "_blank"
 
           %br
           #find_friends_pane
@@ -112,7 +112,7 @@
             .span-5.last{:style => "height:30px;"}
               %h4{:style => "margin-top:7px;"}
                 or
-                = link_to t('.find_friends_from_facebook'), friend_finder_path('facebook')
+                = link_to t('.find_friends_from_facebook'), friend_finder_path('facebook'), :target => "_blank"
             .clearfix
             %br
 
@@ -134,13 +134,13 @@
             %h4{:style => "margin-top:7px;"}
               = t('.featured_tags')
             %p
-              = link_to "#diaspora", tag_path('diaspora')
+              = link_to "#diaspora", tag_path('diaspora'), :target => "_blank"
               %br
-              = link_to "#art", tag_path('art')
+              = link_to "#art", tag_path('art'), :target => "_blank"
               %br
-              = link_to "#gif", tag_path('gif')
+              = link_to "#gif", tag_path('gif'), :target => "_blank"
               %br
-              = link_to "#french", tag_path('french')
+              = link_to "#french", tag_path('french'), :target => "_blank"
           .clearfix
             %br
           %br
@@ -152,7 +152,7 @@
         .content
           %h3
             = t(".connect_to")
-            = link_to "Cubbi.es", "http://cubbi.es/"
+            = link_to "Cubbi.es", "http://cubbi.es/", :target => "_blank"
           %p
             = t('tokens.show.what_is_cubbies')
 
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 643fbda3d1..0ab6655665 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -871,6 +871,7 @@ en:
       featured_tags: "Featured tags"
       find_friends: "Find friends"
       see_all_featured_users: "See all featured users"
+      get_updates_from_core: "Get updates about the project from the core team."
 
       hashtag_explanation: "Hashtags allow you to talk about and follow your interests.  They're also a great way to find new people on Diaspora."
 
-- 
GitLab