From 24422a3bafaf0f81f2417f30d896a859f6cb0ff2 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 24 Jul 2013 19:01:15 -0700 Subject: [PATCH] Move pre-sign up content to sign up page --- app/assets/stylesheets/common.css.scss | 81 +------------------------ app/controllers/site_controller.rb | 2 +- app/views/site/welcome.html.erb | 40 ++---------- app/views/user/new.html.erb | 13 ++-- config/locales/en.yml | 59 ++++-------------- test/functional/user_controller_test.rb | 4 +- 6 files changed, 32 insertions(+), 167 deletions(-) diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index cc0bad072..45e644895 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1029,7 +1029,8 @@ ul.results-list li { border-bottom: 1px solid #ccc; } } .site-copyright, -.site-welcome { +.site-welcome, +.user-new { .content-heading { text-align: center; } @@ -2245,15 +2246,6 @@ a.button { background-position: -50px 0; } - .sprite.large { - width: 350px; - height: 200px; - } - - .sprite.one-map { - background-position: 0 -50px; - } - .sprite.term { margin-right: 10px; vertical-align: middle; @@ -2287,74 +2279,7 @@ a.button { padding: 20px; } - .one-map { - position: relative; - } - - .one-map-name { - position: absolute; - font-size: 15px; - font-weight: bold; - } - - .one-map-project-name { - font-size: 25px; - top: 70px; - left: 75px; - } - - .one-map-name-1, - .one-map-name-5, - .one-map-name-6 { - text-align: center; - display: inline-block; - width: 200px; - } - - .one-map-name-1 { - color: #c28d86; - top: 30px; - left: -70px; - } - - .one-map-name-2 { - color: #c28d86; - top: 25px; - left: 172px; - } - - .one-map-name-3 { - color: #94cacc; - top: 45px; - left: 140px; - } - - .one-map-name-4 { - color: #94cacc; - top: 48px; - left: 270px; - } - - .one-map-name-5 { - color: #85c589; - top: 105px; - left: 90px; - } - - .one-map-name-6 { - color: #94cacc; - top: 138px; - left: 20px; - } - - .edit-located, - .edit-geocoded, - .edit-geolocated { - display: none; - } - - .start-mapping, - .sign-up { + .start-mapping { background: #EB6F67; color: #FFF; margin: auto; diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 35f1fb849..fb034e22c 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -4,7 +4,7 @@ class SiteController < ApplicationController before_filter :authorize_web before_filter :set_locale - before_filter :require_user, :only => [:edit] + before_filter :require_user, :only => [:edit, :welcome] before_filter :require_oauth, :only => [:index] def index diff --git a/app/views/site/welcome.html.erb b/app/views/site/welcome.html.erb index 4377da670..78dd51552 100644 --- a/app/views/site/welcome.html.erb +++ b/app/views/site/welcome.html.erb @@ -4,27 +4,13 @@ <% content_for :heading do %>

<%= t "welcome_page.title" %>

-

<%= t "welcome_page.subtitle" %>

<% end %>

<%= t "welcome_page.introduction_html" %>

-
-

<%= t "welcome_page.one_map_many_uses.title" %>

-
-
- <%= t "layouts.project_name.title" %> - <% t("welcome_page.one_map_many_uses.names").sample(6).each_with_index do |name, i| %> - <%= name %> - <% end %> -
-
-

<%= t "welcome_page.one_map_many_uses.paragraph_1_html" %>

-
- -
+

<%= t "welcome_page.whats_on_the_map.title" %>

@@ -40,7 +26,7 @@
-
+

<%= t "welcome_page.basic_terms.title" %>

<%= t "welcome_page.basic_terms.paragraph_1_html" %>

@@ -63,7 +49,7 @@
-
+

<%= t "welcome_page.questions.title" %>

@@ -71,24 +57,8 @@

<%= t "welcome_page.questions.paragraph_1_html" %>

-
-

<%= t "welcome_page.contributing.title" %>

- <% if @user %> -

- <%= t "welcome_page.contributing.paragraph_1_html" %> - <%= t "welcome_page.contributing.paragraph_located" %> - <%= t "welcome_page.contributing.paragraph_geocoded_html" %> - <%= t "welcome_page.contributing.paragraph_geolocated" %> -

- - <% else %> -

<%= t "welcome_page.contributing.paragraph_1_no_user_html" %>

- - <% end %> +
diff --git a/app/views/user/new.html.erb b/app/views/user/new.html.erb index 7324ddd29..7d5439d6f 100644 --- a/app/views/user/new.html.erb +++ b/app/views/user/new.html.erb @@ -1,12 +1,10 @@ <% content_for :heading do %> -

<%= t 'user.new.heading' %>

+

<%= t 'user.new.title' %>

<% end %> -

<%= t 'user.new.fill_form' %>

+<%= form_for :user, :url => { :action => 'create' }, :html => { :class => 'col6' } do %> + <%= error_messages_for 'user' %> -<%= error_messages_for 'user' %> - -<%= form_for :user, :url => { :action => 'create' } do %> <%= hidden_field_tag('referer', h(@referer)) unless @referer.nil? %>
@@ -72,6 +70,11 @@
<% end %> +
+

<%= t 'user.new.about.header' %>

+ <%= t 'user.new.about.html' %> +
+