We had some duplication because the `css_for_process_header` was using an instance variable, and so it couldn't be called from a partial where this instance variable wasn't available. Using a local variable and passing it as a parameter (as we should always do) solves the issue and lets us simplify the code.
19 lines
723 B
Plaintext
19 lines
723 B
Plaintext
<% if @process.description.present? %>
|
|
<p class="title"><%= t("legislation.processes.header.description") %></p>
|
|
<%= markdown @process.description %>
|
|
<% end %>
|
|
|
|
<%= render SDG::TagListComponent.new(@process, linkable: false) %>
|
|
|
|
<% if @process.additional_info.present? %>
|
|
<div id="additional_info" class="is-hidden" data-toggler=".is-hidden">
|
|
<hr>
|
|
<p class="title"><%= t("legislation.processes.header.additional_info") %></p>
|
|
<%= markdown @process.additional_info if @process.additional_info %>
|
|
</div>
|
|
|
|
<button type="button" class="button" data-toggle="additional_info" style="<%= css_for_process_header(process) %>">
|
|
<%= t("legislation.processes.header.additional_info") %>
|
|
</button>
|
|
<% end %>
|