Commit e7d66feb authored by pei-chi.huang's avatar pei-chi.huang
Browse files

Merge branch...

Merge branch '21-redirect-to-home-after-login-and-move-operator-create-button-to-mysample' into 'init19'

Resolve "redirect to home after login and move operator create button to mysample"

Closes #21

See merge request !16
parents 2813f03f 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'
......
<% 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">
......
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment