Convert phase to symbol before comparision for active dates

This commit is contained in:
Bertocq
2017-09-05 16:18:36 +02:00
parent 4b7200f49c
commit 553348eaad
5 changed files with 8 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
<%= render 'legislation/processes/header', process: @process, header: :small %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations_phase %>
<div class="column row">
<div class="draft-panels small-12 column row">

View File

@@ -2,7 +2,7 @@
<%= render 'legislation/processes/header', process: @process, header: :small %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations_phase %>
<div class="column row">
<div class="draft-panels small-12 column row">

View File

@@ -2,7 +2,7 @@
<%= render 'legislation/processes/header', process: @process, header: :small %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations_phase %>
<div class="column row">
<div class="draft-panels small-12 column row">

View File

@@ -2,7 +2,7 @@
<%= render 'legislation/processes/header', process: @process, header: :small %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations %>
<%= render 'legislation/processes/key_dates', process: @process, phase: :allegations_phase %>
<div class="column row">
<div class="draft-panels small-12 column row">

View File

@@ -6,7 +6,7 @@
<ul>
<% if process.debate_phase.enabled? %>
<li <%= 'class="active"' if phase == :debate_phase %>>
<li <%= 'class="active"' if phase.to_sym == :debate_phase %>>
<%= link_to debate_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.debate_dates') %></h4>
<p><%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %></p>
@@ -15,7 +15,7 @@
<% end %>
<% if process.draft_publication.enabled? %>
<li <%= 'class="active"' if phase == :draft_publication %>>
<li <%= 'class="active"' if phase.to_sym == :draft_publication %>>
<%= link_to draft_publication_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.draft_publication_date') %></h4>
<p><%= format_date(process.draft_publication_date) %></p>
@@ -24,7 +24,7 @@
<% end %>
<% if process.allegations_phase.enabled? %>
<li <%= 'class="active"' if phase == :allegations_phase %>>
<li <%= 'class="active"' if phase.to_sym == :allegations_phase %>>
<%= link_to allegations_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.allegations_dates') %></h4>
<p><%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %></p>
@@ -33,7 +33,7 @@
<% end %>
<% if process.result_publication.enabled? %>
<li <%= 'class="active"' if phase == :result_publication %>>
<li <%= 'class="active"' if phase.to_sym == :result_publication %>>
<%= link_to result_publication_legislation_process_path(process) do %>
<h4><%= t('legislation.processes.shared.result_publication_date') %></h4>
<p><%= format_date(process.result_publication_date) %></p>