added logged out page referencing mobile
This commit is contained in:
parent
95ad709324
commit
131166841a
8 changed files with 75 additions and 3 deletions
|
|
@ -32,6 +32,10 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Overwriting the sign_out redirect path method
|
||||||
|
def after_sign_out_path_for(resource_or_scope)
|
||||||
|
logged_out_path
|
||||||
|
end
|
||||||
|
|
||||||
##helpers
|
##helpers
|
||||||
def all_aspects
|
def all_aspects
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ class UsersController < ApplicationController
|
||||||
require File.join(Rails.root, 'lib/diaspora/exporter')
|
require File.join(Rails.root, 'lib/diaspora/exporter')
|
||||||
require File.join(Rails.root, 'lib/collect_user_photos')
|
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
|
respond_to :html
|
||||||
|
|
||||||
|
|
@ -103,6 +103,12 @@ class UsersController < ApplicationController
|
||||||
render "users/getting_started"
|
render "users/getting_started"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def go_mobile
|
||||||
|
if user_signed_in?
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def getting_started_completed
|
def getting_started_completed
|
||||||
user = current_user
|
user = current_user
|
||||||
user.update_attributes(:getting_started => false)
|
user.update_attributes(:getting_started => false)
|
||||||
|
|
|
||||||
37
app/views/users/logged_out.haml
Normal file
37
app/views/users/logged_out.haml
Normal 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')
|
||||||
|
|
@ -814,6 +814,12 @@ en:
|
||||||
|
|
||||||
|
|
||||||
users:
|
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:
|
edit:
|
||||||
export_data: "Export Data"
|
export_data: "Export Data"
|
||||||
close_account: "Close Account"
|
close_account: "Close Account"
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,9 @@ Diaspora::Application.routes.draw do
|
||||||
mount Resque::Server.new, :at => '/resque-jobs'
|
mount Resque::Server.new, :at => '/resque-jobs'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Startpage
|
# Logout Page (go mobile)
|
||||||
|
get 'logged_out' => 'users#logged_out', :as => 'logged_out'
|
||||||
|
|
||||||
|
# Startpage
|
||||||
root :to => 'home#show'
|
root :to => 'home#show'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ Feature: user authentication
|
||||||
Given I am signed in
|
Given I am signed in
|
||||||
And I click on my name in the header
|
And I click on my name in the header
|
||||||
And I follow "log out"
|
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
|
Scenario: user uses token auth
|
||||||
Given a user with username "ohai" and password "secret"
|
Given a user with username "ohai" and password "secret"
|
||||||
|
|
|
||||||
BIN
public/images/mobile.jpg
Normal file
BIN
public/images/mobile.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
|
|
@ -3416,3 +3416,19 @@ ul#getting_started
|
||||||
:display inline
|
:display inline
|
||||||
:margin
|
:margin
|
||||||
:right 0.5em
|
: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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue