From d5e3033308ae6977aed07e56fb1ce4b4c449d48e Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Mon, 24 Oct 2011 17:10:36 -0700 Subject: [PATCH] make a setting to check out the new getting started --- app/controllers/users_controller.rb | 2 +- app/views/users/edit.html.haml | 16 ++++++++++++++++ config/locales/diaspora/en.yml | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f0778413d..98ef6ae6d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -41,7 +41,7 @@ class UsersController < ApplicationController else flash[:error] = I18n.t 'users.update.password_not_changed' end - elsif u[:show_community_spotlight_in_stream] + elsif u[:show_community_spotlight_in_stream] || u[:getting_started] if @user.update_attributes(u) flash[:notice] = I18n.t 'users.update.settings_updated' redirect_to multi_path diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 072ded9f1..f6f043053 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -91,6 +91,22 @@ %hr %br + %h3#getting-started-preferences + = t('.show_getting_started') + = form_for current_user, :url => user_path, :html => { :method => :put } do |f| + = f.error_messages + + %p.checkbox_select + = f.label :getting_started, t('.show_getting_started') + = f.check_box :getting_started + + %br + = f.submit t('.change'), :class => 'button' + + %br + %br + %hr + %br %h3 = t('.receive_email_notifications') = form_for 'user', :url => user_path, :html => { :method => :put } do |f| diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index d378492ac..aeed8bf97 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -908,6 +908,8 @@ en: email_awaiting_confirmation: "We have sent you an activation link to %{unconfirmed_email}. Until you follow this link and activate the new address, we will continue to use your original address %{email}." stream_preferences: "Stream Preferences" show_community_spotlight: "Show Community Spotlight in Stream?" + show_getting_started: 'Re-enable Getting Started' + getting_started: 'New User Prefrences' destroy: "Your account has been locked. It may take 20 minutes for us to finish closing your account. Thank you for trying Diaspora." getting_started: well_hello_there: "Well, hello there!"