Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ComPlat
ela2
Commits
d4139eca
Commit
d4139eca
authored
Dec 12, 2019
by
pei-chi.huang
Browse files
redirect to home after login and move operator create button to mysample
parent
2813f03f
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/sessions_controller.rb
View file @
d4139eca
...
...
@@ -8,7 +8,7 @@ class SessionsController < ApplicationController
if
user
&&
user
.
authenticate
(
params
[
:session
][
:password
])
log_in
user
params
[
:session
][
:remember_me
]
==
'1'
?
remember
(
user
)
:
forget
(
user
)
redirect_to
user
redirect_to
root_url
else
flash
.
now
[
:danger
]
=
'Invalid email/password combination'
render
'new'
...
...
app/views/samples/_samples.html.erb
View file @
d4139eca
<%
if
(
current_page?
(
'/samples, /index'
)
||
current_page?
(
'/'
))
%>
<div
class=
"panel panel-default"
>
<%=
render
'shared/sample_form'
%>
<br>
<%
end
%>
<div
class=
"container"
>
<div
class=
"row clearfix"
>
...
...
app/views/users/show.html.erb
View file @
d4139eca
...
...
@@ -5,10 +5,8 @@
<b>
Add a new sample:
</b>
<%
end
%>
<div
class=
"panel panel-default"
>
<%
if
!
operator?
%>
<br>
<%=
render
'shared/sample_form'
%>
</br>
<%
end
%>
<%
if
@user
.
samples
.
any?
%>
<%=
render
'samples/samples'
%>
</div>
...
...
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