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

Merge branch '18-styling-status-icon-and-googleapi-https' into 'init19'

Resolve "styling status icon and googleapi https"

Closes #18

See merge request !13
parents 8dd26b5f 3a2acc01
......@@ -239,11 +239,6 @@ text-decoration: underline;
}
div.absolute {
margin-top:10px;
margin-left: 570px;
}
div.absolutem {
margin-top:10px;
margin-left: 590px;
}
.div-table{
display:table;
......
......@@ -20,19 +20,19 @@
<th class="text-center">
Status
<%if operator? && ((current_page?('/samples, /index') || current_page?('/')) || params[:is_admin] === "true" ) %>
<%= link_to '<i class="fa fa-hourglass-half" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'in preparation' ? "all" : "in preparation"}", is_admin: true),
{:style=>'color:#f9e5ef;', class: "#{params[:status] == 'in preparation' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-line-chart" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'submitted' ? "all" : "submitted"}", is_admin: true),
{:style=>'color:#feffea;', class: "#{params[:status] == 'submitted' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-pencil-square-o" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'in preparation' ? "all" : "in preparation"}", is_admin: true),
{:style=>'color:#f28abe;', class: "#{params[:status] == 'in preparation' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-hourglass-half" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'submitted' ? "all" : "submitted"}", is_admin: true),
{:style=>'color:#eef294;', class: "#{params[:status] == 'submitted' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-check-square-o" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == "measured" ? "all" : "measured"}", is_admin: true),
{:style=>'color:#e2f7e7;', class: "#{params[:status] == 'measured' ? 'btn btn-warning' : 'btn btn-default'}" }%>
{:style=>'color:#baf7c8;', class: "#{params[:status] == 'measured' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%else%>
<%= link_to '<i class="fa fa-hourglass-half" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'in preparation' ? "all" : "in preparation"}"),
{:style=>'color:#f9e5ef;', class: "#{params[:status] == 'in preparation' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-line-chart" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'submitted' ? "all" : "submitted"}"),
{:style=>'color:#feffea;', class: "#{params[:status] == 'submitted' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-pencil-square-o" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'in preparation' ? "all" : "in preparation"}"),
{:style=>'color:#f28abe;', class: "#{params[:status] == 'in preparation' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-hourglass-half" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == 'submitted' ? "all" : "submitted"}"),
{:style=>'color:#eef294;', class: "#{params[:status] == 'submitted' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%= link_to '<i class="fa fa-check-square-o" aria-hidden="true"></i>'.html_safe,samples_path(status: "#{params[:status] == "measured" ? "all" : "measured"}"),
{:style=>'color:#e2f7e7;', class: "#{params[:status] == 'measured' ? 'btn btn-warning' : 'btn btn-default'}" }%>
{:style=>'color:#baf7c8;', class: "#{params[:status] == 'measured' ? 'btn btn-warning' : 'btn btn-default'}" }%>
<%end%>
</th>
<%if operator?%>
......
......@@ -129,11 +129,11 @@ $(document).ready(function(){
</table>
<br>
<%if @sample.status == "in preparation" %>
<div class='absolute'><%=link_to (@sample.status ? "Submit for Measurement" : "No"),
<div class='container absolute'><%=link_to (@sample.status ? "Submit for Measurement" : "No"),
Measured_sample_path(@sample), :action => 'solve', :class => 'btn btn-block btn-success' %>
</div>
<%elsif operator? && @sample.status == "submitted" %>
<div class='absolutem'><%=link_to (@sample.status ? "Release Measurement" : "No"),
<div class='container absolute'><%=link_to (@sample.status ? "Release Measurement" : "No"),
ReleaseMeasurment_sample_path(@sample), :action => 'solve', :class => 'btn btn-block btn-success' %>
</div>
<%end%>
......
......@@ -3,7 +3,7 @@
<%= render 'samples/samples', samples:@samples %>
<% elsif logged_in? && !operator? %>
<div style="margin: 0px 0px 50px 100px;">
<link href='http://fonts.googleapis.com/css?family=Merienda+One' rel='stylesheet' type='text/css'><h1 class="font" style="text-align:center"> ela</h1>
<link href='https://fonts.googleapis.com/css?family=Merienda+One' rel='stylesheet' type='text/css'><h1 class="font" style="text-align:center"> ela</h1>
<h3>Microposts </h3>
<ol class="microposts">
<%= render @microposts %>
......@@ -12,7 +12,7 @@
</div>
<%else%>
<div style="margin: 100px 0px 50px 200px;">
<link href='http://fonts.googleapis.com/css?family=Merienda+One' rel='stylesheet' type='text/css'> <h1 class='font' style="text-align:center;;">ela</h1>
<link href='https://fonts.googleapis.com/css?family=Merienda+One' rel='stylesheet' type='text/css'> <h1 class='font' style="text-align:center;;">ela</h1>
<br>
<p>
<h3 style="text-align:center">Welcome to Elemental Analysis</h3>
......
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