Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
1de4d68a
Commit
1de4d68a
authored
Mar 13, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
welcome controller, header nag style
parent
c2bc335f
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
22 deletions
+39
-22
app/controllers/welcome_controller.rb
+2
-2
app/helpers/home_helper.rb
+0
-2
app/views/layouts/application.html.slim
+1
-1
app/views/partials/_app_header.html.slim
+17
-4
app/views/stock/show.html.slim
+6
-0
app/views/welcome/login.html.slim
+1
-1
config/routes.rb
+1
-1
spec/acceptance/access.feature
+8
-8
spec/controllers/welcome_controller_spec.rb
+3
-3
No files found.
app/controllers/
h
ome_controller.rb
→
app/controllers/
welc
ome_controller.rb
View file @
1de4d68a
class
H
omeController
<
ApplicationController
class
Welc
omeController
<
ApplicationController
skip_before_action
:require_login
skip_before_action
:require_login
def
top
def
top
if
user_signed_in?
if
user_signed_in?
redirect_to
flow_path
,
status:
301
redirect_to
flow_path
,
status:
301
else
else
render
template:
'
h
ome/login'
render
template:
'
welc
ome/login'
end
end
end
end
end
end
app/helpers/home_helper.rb
deleted
100644 → 0
View file @
c2bc335f
module
HomeHelper
end
app/views/layouts/application.html.slim
View file @
1de4d68a
...
@@ -11,7 +11,7 @@ html lang="ja"
...
@@ -11,7 +11,7 @@ html lang="ja"
=
csrf_meta_tags
=
csrf_meta_tags
body
class
=
"rails-#{params[:controller]}-#{params[:action]}"
body
class
=
"rails-#{params[:controller]}-#{params[:action]}"
=
render
partial:
'partials/header_notifications'
=
render
partial:
'partials/header_notifications'
-
if
params
[
:controller
]
!=
'
h
ome'
-
if
params
[
:controller
]
!=
'
welc
ome'
=
render
partial:
'partials/app_header'
=
render
partial:
'partials/app_header'
.container.container-main
.container.container-main
=
yield
=
yield
...
...
app/views/partials/_app_header.html.slim
View file @
1de4d68a
...
@@ -18,12 +18,25 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation"
...
@@ -18,12 +18,25 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation"
a
href
=
flow_path
title
=
"Frow"
a
href
=
flow_path
title
=
"Frow"
|
Flow
|
Flow
=
form_tag
(
destroy_user_session_path
,
:method
=>
:delete
,
class:
'navbar-form navbar-right'
)
do
=
submit_tag
'SignOut'
,
class:
'btn btn-default'
ul
.nav.navbar-nav.navbar-right
.navbar-right
li
form
a
.btn.btn-primary.navbar-btn
href
=
new_post_path
a
.btn.btn-primary.navbar-btn
href
=
new_post_path
|
Post
|
Post
span
.glyphicon.glyphicon-pencil
span
.glyphicon.glyphicon-pencil
img
height
=
"25"
src
=
current_user
.image_url
width
=
"25"
/
li
.dropdown
a
.dropdown-toggle
data-toggle
=
"dropdown"
=
current_user
.
name
=
current_user
.
name
img
src
=
current_user
.image_url
width
=
"20"
height
=
"20"
/
b
.caret
ul
.dropdown-menu
li
a
Account
(todo)
li
a
Settings
(todo)
li
.divider
li
a
href
=
destroy_user_session_path
data-method
=
"delete"
rel
=
"nofollow"
SignOut
app/views/stock/show.html.slim
View file @
1de4d68a
/! view:stock/show
/! view:stock/show
.row
.row
h1
|
Stock
small
-
保存・蓄積された記事
#sidebar
.col-xs-6.col-md-4
role
=
"navigation"
#sidebar
.col-xs-6.col-md-4
role
=
"navigation"
#tab-tree
.tab-pane
#tab-tree
.tab-pane
-
cache
(
'tag-tree'
,
:expires_in
=>
1
.
hour
)
do
-
cache
(
'tag-tree'
,
:expires_in
=>
1
.
hour
)
do
.list-group
.list-group
=
Tag
.
posts_exist
.
decorate
.
tree_view
=
Tag
.
posts_exist
.
decorate
.
tree_view
.col-xs-12.col-sm-6.col-md-8
.col-xs-12.col-sm-6.col-md-8
#list_post
#list_post
p
#posts-placeholder
style
=
"color:#aaa;font-size:30px"
<
--
Select
a
post
...
p
#posts-placeholder
style
=
"color:#aaa;font-size:30px"
<
--
Select
a
post
...
app/views/
h
ome/login.html.slim
→
app/views/
welc
ome/login.html.slim
View file @
1de4d68a
/! view:
h
ome/login
/! view:
welc
ome/login
.login
.login
.container.marketing
.container.marketing
.row
style
=
(
"margin-top: 40px"
)
.row
style
=
(
"margin-top: 40px"
)
...
...
config/routes.rb
View file @
1de4d68a
...
@@ -3,7 +3,7 @@ Rendezvous::Application.routes.draw do
...
@@ -3,7 +3,7 @@ Rendezvous::Application.routes.draw do
post
'apis/markdown_preview'
post
'apis/markdown_preview'
post
'apis/file_receiver'
post
'apis/file_receiver'
root
'
h
ome#top'
,
as:
'root'
root
'
welc
ome#top'
,
as:
'root'
get
'stock'
=>
'stock#show'
,
as:
'stock'
get
'stock'
=>
'stock#show'
,
as:
'stock'
get
'flow'
=>
'flow#show'
,
as:
'flow'
get
'flow'
=>
'flow#show'
,
as:
'flow'
...
...
spec/acceptance/access.feature
View file @
1de4d68a
...
@@ -3,12 +3,12 @@ Feature: アクセス制限
...
@@ -3,12 +3,12 @@ Feature: アクセス制限
Scenario
:
非ログイン --> TOPページ
Scenario
:
非ログイン --> TOPページ
When
visit '/'
When
visit '/'
Then
response code is 200
Then
response code is 200
Then response includes '<!--view
:
h
ome/login-->'
Then response includes '<!--view
:
welc
ome/login-->'
Scenario
:
非ログイン --> postsページ
Scenario
:
非ログイン --> postsページ
When
visit '/posts'
When
visit '/posts'
Then
response code is 200
Then
response code is 200
Then response includes '<!--view
:
h
ome/login-->'
Then response includes '<!--view
:
welc
ome/login-->'
# Scenario: 禁止ユーザーログイン --> TOPページ
# Scenario: 禁止ユーザーログイン --> TOPページ
# Given login via google with 'taro@example.com'
# Given login via google with 'taro@example.com'
...
@@ -19,23 +19,23 @@ Feature: アクセス制限
...
@@ -19,23 +19,23 @@ Feature: アクセス制限
# Given login via google with 'taro@example.com'
# Given login via google with 'taro@example.com'
# When visit '/posts'
# When visit '/posts'
# Then response code is 200
# Then response code is 200
# Then response includes '<!--view:
h
ome/login-->'
# Then response includes '<!--view:
welc
ome/login-->'
Scenario
:
ログイン --> TOPページ
Scenario
:
ログイン --> TOPページ
Given
login
Given
login
When
visit '/'
When
visit '/'
Then
response code is 200
Then
response code is 200
Then response includes '<!--view
:
post/index
-->'
Then response includes '<!--view
:
flow/show
-->'
Scenario
:
ログイン -->
posts
ページ
Scenario
:
ログイン -->
flow
ページ
Given
login
Given
login
When
visit '/
posts
'
When
visit '/
flow
'
Then
response code is 200
Then
response code is 200
Then response includes '<!--view
:
post/index
-->'
Then response includes '<!--view
:
flow/show
-->'
Scenario
:
ログイン --> ログアウト
Scenario
:
ログイン --> ログアウト
Given
login
Given
login
When
logout
When
logout
Then
response code is 200
Then
response code is 200
Then response includes '<!--view
:
h
ome/login-->'
Then response includes '<!--view
:
welc
ome/login-->'
spec/controllers/
h
ome_controller_spec.rb
→
spec/controllers/
welc
ome_controller_spec.rb
View file @
1de4d68a
require
'spec_helper'
require
'spec_helper'
describe
H
omeController
do
describe
Welc
omeController
do
describe
"GET 'top'"
do
describe
"GET 'top'"
do
it
'should be successful'
do
it
'should be successful'
do
...
@@ -21,8 +21,8 @@ describe HomeController do
...
@@ -21,8 +21,8 @@ describe HomeController do
it
'should be successful'
do
it
'should be successful'
do
get
:top
get
:top
expect
(
subject
).
to
redirect_to
controller:
'
posts
'
,
expect
(
subject
).
to
redirect_to
controller:
'
flow
'
,
action:
'
index
'
action:
'
show
'
end
end
it
'should find the right user'
do
it
'should find the right user'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment