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

Merge branch '20-filter-status-styling' into 'init19'

Resolve "filter status styling"

Closes #20

See merge request !15
parents c444248f 95d92175
......@@ -21,18 +21,18 @@
Status
<%if operator? && ((current_page?('/samples, /index') || current_page?('/')) || params[:is_admin] === "true" ) %>
<%= 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'}" }%>
{:style=>"color:#000;#{params[:status] == 'in preparation' ? 'background-color: #f9e5ef;' : ''}", class: "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'}" }%>
{:style=>"color:#000;#{params[:status] == 'submitted' ? 'background-color: #feffea;' : ''}", class: "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:#baf7c8;', class: "#{params[:status] == 'measured' ? 'btn btn-warning' : 'btn btn-default'}" }%>
{:style=>"color:#000;#{params[:status] == 'measured' ? 'background-color: #e2f7e7;' : ''}", class: "btn btn-default" }%>
<%else%>
<%= 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'}" }%>
{:style=>"color:#000;#{params[:status] == 'in preparation' ? 'background-color: #f9e5ef;' : ''}", class: "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'}" }%>
{:style=>"color:#000;#{params[:status] == 'submitted' ? 'background-color: #feffea;' : ''}", class: "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:#baf7c8;', class: "#{params[:status] == 'measured' ? 'btn btn-warning' : 'btn btn-default'}" }%>
{:style=>"color:#000;#{params[:status] == 'measured' ? 'background-color: #e2f7e7;' : ''}", class: "btn btn-default" }%>
<%end%>
</th>
<%if operator?%>
......
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