added logged out page referencing mobile

This commit is contained in:
danielgrippi 2011-09-25 11:58:44 -07:00
parent 95ad709324
commit 131166841a
8 changed files with 75 additions and 3 deletions

View file

@ -32,6 +32,10 @@ class ApplicationController < ActionController::Base
end
end
# Overwriting the sign_out redirect path method
def after_sign_out_path_for(resource_or_scope)
logged_out_path
end
##helpers
def all_aspects

View file

@ -7,7 +7,7 @@ class UsersController < ApplicationController
require File.join(Rails.root, 'lib/diaspora/exporter')
require File.join(Rails.root, 'lib/collect_user_photos')
before_filter :authenticate_user!, :except => [:new, :create, :public, :user_photo]
before_filter :authenticate_user!, :except => [:new, :create, :public, :user_photo, :logged_out]
respond_to :html
@ -103,6 +103,12 @@ class UsersController < ApplicationController
render "users/getting_started"
end
def go_mobile
if user_signed_in?
redirect_to root_path
end
end
def getting_started_completed
user = current_user
user.update_attributes(:getting_started => false)

View file

@ -0,0 +1,37 @@
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
#grey_header
.container{:style => 'text-align:center;'}
%h2
= t('.signed_out')
%h1
= t('.go_mobile')
.container{:style => 'text-align:center;'}
%br
%br
%br
%br
%br
%br
%br
%br
%br
= image_tag 'mobile.jpg', :width => 150, :height => 294
%br
%br
%br
%h4
= t('.simply_visit')
%strong
= link_to AppConfig[:pod_url], root_url
= t('.on_your_mobile_device')
%p.dull
= t('.works_on_modern')

View file

@ -814,6 +814,12 @@ en:
users:
logged_out:
signed_out: "You've signed out of Diaspora*"
go_mobile: "Now go mobile."
simply_visit: "Simply visit"
on_your_mobile_device: "on your mobile device to access Diaspora* mobile."
works_on_modern: "Works on all modern smartphones"
edit:
export_data: "Export Data"
close_account: "Close Account"

View file

@ -170,7 +170,9 @@ Diaspora::Application.routes.draw do
mount Resque::Server.new, :at => '/resque-jobs'
end
# Startpage
# Logout Page (go mobile)
get 'logged_out' => 'users#logged_out', :as => 'logged_out'
# Startpage
root :to => 'home#show'
end

View file

@ -13,7 +13,8 @@ Feature: user authentication
Given I am signed in
And I click on my name in the header
And I follow "log out"
Then I should be on the home page
Then I should be on the logged out page
And I should see "Now go mobile."
Scenario: user uses token auth
Given a user with username "ohai" and password "secret"

BIN
public/images/mobile.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -3416,3 +3416,19 @@ ul#getting_started
:display inline
:margin
:right 0.5em
#grey_header
@include box-shadow(0,1px,1px,#eee)
:background
:color #fafafa
:width 100%
:position absolute
:left 0
:top 0
:padding
:top 80px
:bottom 20px
:text
:align center
:border
:bottom 1px solid #ddd