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
0e45fccc
Commit
0e45fccc
authored
Jan 01, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
header/notify css
parent
e4b455c6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
16 deletions
+27
-16
app/assets/stylesheets/app.css.scss
+0
-2
app/assets/stylesheets/body-padding.css.scss
+5
-0
app/controllers/application_controller.rb
+0
-1
app/controllers/posts_controller.rb
+5
-5
app/views/layouts/application.html.erb
+3
-1
app/views/partials/_header_notifications.html.erb
+11
-4
app/views/posts/_show_fragment.html.erb
+3
-3
No files found.
app/assets/stylesheets/app.css.scss
View file @
0e45fccc
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
.app
{
.app
{
padding-top
:
70px
;
.navbar-default
.navbar-brand
{
.navbar-default
.navbar-brand
{
background-color
:
#428bca
;
background-color
:
#428bca
;
color
:
#fff
;
color
:
#fff
;
...
...
app/assets/stylesheets/body-padding.css.scss
0 → 100644
View file @
0e45fccc
body
[
class
^=
"posts-"
]
{
padding-top
:
70px
;
}
app/controllers/application_controller.rb
View file @
0e45fccc
...
@@ -13,5 +13,4 @@ class ApplicationController < ActionController::Base
...
@@ -13,5 +13,4 @@ class ApplicationController < ActionController::Base
rescue_from
(
ActionController
::
ParameterMissing
)
do
|
parameter_missing_exception
|
rescue_from
(
ActionController
::
ParameterMissing
)
do
|
parameter_missing_exception
|
render
text:
"Required parameter missing:
#{
parameter_missing_exception
.
param
}
"
,
status: :bad_request
render
text:
"Required parameter missing:
#{
parameter_missing_exception
.
param
}
"
,
status: :bad_request
end
end
end
end
app/controllers/posts_controller.rb
View file @
0e45fccc
...
@@ -48,11 +48,11 @@ class PostsController < ApplicationController
...
@@ -48,11 +48,11 @@ class PostsController < ApplicationController
current_user
.
google_oauth_token_refresh!
if
current_user
.
google_oauth_token_expired?
current_user
.
google_oauth_token_refresh!
if
current_user
.
google_oauth_token_expired?
compose_mail
(
@post
,
user:
current_user
,
to:
mail_params
[
:to
]).
deliver
compose_mail
(
@post
,
user:
current_user
,
to:
mail_params
[
:to
]).
deliver
redirect_to
root_path
(
id:
@post
.
id
)
redirect_to
root_path
(
id:
@post
.
id
)
,
flash:
{
success:
'Mail has sent!'
}
rescue
ActionGmailer
::
DeliveryError
rescue
ActionGmailer
::
DeliveryError
redirect_to
root_path
(
id:
@post
.
id
),
flash:
{
notice:
'Gmail authentication expired.'
}
redirect_to
root_path
(
id:
@post
.
id
),
flash:
{
notice:
'Gmail authentication expired.'
}
rescue
ArgumentError
=>
err
rescue
ArgumentError
=>
err
re
nder
text:
err
.
to_s
,
status: :bad_request
re
direct_to
root_path
(
id:
@post
.
id
),
flash:
{
alert:
'Mail format is invalid: '
+
err
.
to_s
}
end
end
# GET /posts/1/edit
# GET /posts/1/edit
...
@@ -67,7 +67,7 @@ class PostsController < ApplicationController
...
@@ -67,7 +67,7 @@ class PostsController < ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
if
@post
.
save
if
@post
.
save
format
.
html
{
redirect_to
root_path
(
id:
@post
.
id
),
notice:
'Post was successfully created.'
}
format
.
html
{
redirect_to
root_path
(
id:
@post
.
id
),
flash:
{
notice:
'Post was successfully created.'
}
}
format
.
json
{
render
action:
'show'
,
status: :created
,
location:
@post
}
format
.
json
{
render
action:
'show'
,
status: :created
,
location:
@post
}
else
else
format
.
html
{
render
action:
'new'
}
format
.
html
{
render
action:
'new'
}
...
@@ -83,7 +83,7 @@ class PostsController < ApplicationController
...
@@ -83,7 +83,7 @@ class PostsController < ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
if
@post
.
update
(
post_params
)
if
@post
.
update
(
post_params
)
format
.
html
{
redirect_to
root_path
(
id:
@post
.
id
),
notice:
'Post was successfully updated.'
}
format
.
html
{
redirect_to
root_path
(
id:
@post
.
id
),
flash:
{
notice:
'Post was successfully updated.'
}
}
format
.
json
{
head
:no_content
}
format
.
json
{
head
:no_content
}
else
else
format
.
html
{
render
action:
'edit'
}
format
.
html
{
render
action:
'edit'
}
...
@@ -97,7 +97,7 @@ class PostsController < ApplicationController
...
@@ -97,7 +97,7 @@ class PostsController < ApplicationController
def
destroy
def
destroy
@post
.
destroy
@post
.
destroy
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
{
redirect_to
posts_url
}
format
.
html
{
redirect_to
posts_url
,
flash:
{
success:
'Post successfully deleted.'
}
}
format
.
json
{
head
:no_content
}
format
.
json
{
head
:no_content
}
end
end
end
end
...
...
app/views/layouts/application.html.erb
View file @
0e45fccc
...
@@ -11,7 +11,9 @@
...
@@ -11,7 +11,9 @@
<%=
csrf_meta_tags
%>
<%=
csrf_meta_tags
%>
</head>
</head>
<body>
<body
class=
"
<%=
params
[
:controller
]
%>
-
<%=
params
[
:action
]
%>
"
>
<%=
render
partial:
'partials/header_notifications'
%>
<%=
yield
%>
<%=
yield
%>
...
...
app/views/partials/_header_notifications.html.erb
View file @
0e45fccc
<%
if
notice
%>
<%
if
flash
[
:success
]
%>
<div
class=
"alert alert-success fade in"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-hidden=
"true"
>
×
</button>
<strong>
Success
</strong>
<%=
flash
[
:success
]
%>
</div>
<%
end
%>
<%
if
flash
[
:notice
]
%>
<div
class=
"alert alert-warning fade in"
>
<div
class=
"alert alert-warning fade in"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-hidden=
"true"
>
×
</button>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-hidden=
"true"
>
×
</button>
<strong>
Notice
</strong>
<%=
notice
%>
<strong>
Notice
</strong>
<%=
flash
[
:notice
]
%>
</div>
</div>
<%
end
%>
<%
end
%>
<%
if
alert
%>
<%
if
flash
[
:alert
]
%>
<div
class=
"alert alert-danger fade in"
>
<div
class=
"alert alert-danger fade in"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-hidden=
"true"
>
×
</button>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-hidden=
"true"
>
×
</button>
<strong>
Alert
</strong>
<%=
alert
%>
<strong>
Alert
</strong>
<%=
flash
[
:alert
]
%>
</div>
</div>
<%
end
%>
<%
end
%>
app/views/posts/_show_fragment.html.erb
View file @
0e45fccc
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
<div
class=
"text-box meta"
>
<div
class=
"text-box meta"
>
<%
@post
.
tags
.
each
do
|
tag
|
%>
<%
@post
.
tags
.
each
do
|
tag
|
%>
<span
class=
"label label-info"
>
<span
class=
"label label-info"
>
<a
href=
"
<%=
root
_path
(
q:
"#
#{
tag
.
name
}
"
)
%>
"
>
#
<%=
tag
.
name
%>
</a>
<a
href=
"
<%=
posts
_path
(
q:
"#
#{
tag
.
name
}
"
)
%>
"
>
#
<%=
tag
.
name
%>
</a>
</span>
</span>
<%
end
%>
<%
end
%>
<span
class=
"label label-success"
>
<span
class=
"label label-success"
>
<a
href=
"
<%=
root
_path
(
q:
"@
#{
@post
.
author
.
name
}
"
)
%>
"
>
@
<%=
@post
.
author
.
name
%>
</a>
<a
href=
"
<%=
posts
_path
(
q:
"@
#{
@post
.
author
.
name
}
"
)
%>
"
>
@
<%=
@post
.
author
.
name
%>
</a>
</span>
</span>
<span
class=
"label label-danger"
>
<span
class=
"label label-danger"
>
<a
href=
"
<%=
root
_path
(
q:
"date:
#{
@post
.
updated_at
.
strftime
(
'%Y-%m-%d'
)
}
"
)
%>
"
>
<%=
@post
.
updated_at
.
strftime
(
'%Y-%m-%d'
)
%>
</a>
<a
href=
"
<%=
posts
_path
(
q:
"date:
#{
@post
.
updated_at
.
strftime
(
'%Y-%m-%d'
)
}
"
)
%>
"
>
<%=
@post
.
updated_at
.
strftime
(
'%Y-%m-%d'
)
%>
</a>
</span>
</span>
<!-- Split button -->
<!-- Split button -->
...
...
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