For the HashAlignment rule, we're using the default `key` style (keys are aligned and values aren't) instead of the `table` style (both keys and values are aligned) because, even if we used both in the application, we used the `key` style a lot more. Furthermore, the `table` style looks strange in places where there are both very long and very short keys and sometimes we weren't even consistent with the `table` style, aligning some keys without aligning other keys. Ideally we could align hashes to "either key or table", so developers can decide whether keeping the symmetry of the code is worth it in a case-per-case basis, but Rubocop doesn't allow this option.
70 lines
2.8 KiB
Plaintext
70 lines
2.8 KiB
Plaintext
<div id="<%= dom_id(process) %>" class="legislation clear">
|
|
<div class="column row legislation-text">
|
|
<div class="small-12 medium-8 column">
|
|
<h3><%= link_to process.title, process %></h3>
|
|
</div>
|
|
|
|
<div class="small-12 medium-4 column">
|
|
<%= link_to process, class: "button hollow big expanded",
|
|
title: t("legislation.processes.process.see_latest_comments_title") do %>
|
|
<span class="icon-comments"></span>
|
|
<%= t("legislation.processes.process.see_latest_comments") %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="small-12 medium-11 column end">
|
|
<%= markdown(process.summary.presence || first_paragraph(process.description)) %>
|
|
</div>
|
|
|
|
<div class="small-12 medium-11 column end">
|
|
<%= render SDG::TagListComponent.new(process, limit: 5, linkable: false) %>
|
|
</div>
|
|
</div>
|
|
|
|
<% if process.enabled_phases_and_publications_count.positive? %>
|
|
<% column_width = 12 / process.enabled_phases_and_publications_count %>
|
|
<div class="column row">
|
|
<div class="small-12 column legislation-calendar-info">
|
|
<p><%= t("legislation.processes.shared.key_dates") %></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="column row small-collapse medium-uncollapse legislation-calendar">
|
|
<% if process.debate_phase.enabled? %>
|
|
<div class="small-6 medium-<%= column_width %> column">
|
|
<h4><%= t("legislation.processes.shared.debate_dates") %></h4>
|
|
<p><%= format_date(process.debate_start_date) %> - <%= format_date(process.debate_end_date) %></p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if process.draft_publication.enabled? %>
|
|
<div class="small-6 medium-<%= column_width %> column">
|
|
<h4><%= t("legislation.processes.shared.draft_publication_date") %></h4>
|
|
<p><%= format_date(process.draft_publication_date) %></p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if process.proposals_phase.enabled? %>
|
|
<div class="small-6 medium-<%= column_width %> column">
|
|
<h4><%= t("legislation.processes.shared.proposals_dates") %></h4>
|
|
<p><%= format_date(process.proposals_phase_start_date) %> - <%= format_date(process.proposals_phase_end_date) %></p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if process.allegations_phase.enabled? %>
|
|
<div class="small-6 medium-<%= column_width %> column">
|
|
<h4><%= t("legislation.processes.shared.allegations_dates") %></h4>
|
|
<p><%= format_date(process.allegations_start_date) %> - <%= format_date(process.allegations_end_date) %></p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if process.result_publication.enabled? %>
|
|
<div class="small-6 medium-<%= column_width %> column">
|
|
<h4><%= t("legislation.processes.shared.result_publication_date") %></h4>
|
|
<p><%= format_date(process.result_publication_date) %></p>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|