Skip to content

Commit

Permalink
Render modal in sectors and companies
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluesmile82 committed Aug 14, 2023
1 parent d31fe31 commit 3d4921b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/views/tpi/companies/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<% content_for :page_title, "#{@company.name} - Transition Pathway Initiative" %>
<% content_for :page_description, "Assess how prepared #{@company.name} is for the transition to a low-carbon economy – its Management Quality and Carbon Performance." %>
<%= react_component('MqBetaModal', {
enabled: session[:enable_beta_mq_assessments]
}) %>
<% regional_view = @company.cp_alignment_region.present? && params[:view] == 'regional' %>

<div class="company-page" data-controller="companies">
<div class="dropdown-selector-company-page-wrapper">
<%= react_component("DropdownSelector", { sectors: @sectors, companies: @companies, selectedOption: @company.name, defaultFilter: 'company' }) %>
</div>
<%= react_component('MqBetaModal', {
enabled: session[:enable_beta_mq_assessments]
}) %>
<div class="companies-header">
<div class="container is-hidden-touch">
<div class="mq-beta-scores">
Expand Down
4 changes: 4 additions & 0 deletions app/views/tpi/sectors/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<% content_for :page_title, "Tool - Transition Pathway Initiative" %>
<% content_for :page_description, "The TPI tool is a corporate climate action benchmark which assesses how prepared companies are for the transition to a low-carbon economy." %>
<%= react_component('MqBetaModal', {
enabled: session[:enable_beta_mq_assessments]
}) %>

<div class="sectors-index-page">
<div class="dropdown-selector-sector-page-wrapper">
<%= react_component("DropdownSelector", {
Expand Down
4 changes: 4 additions & 0 deletions app/views/tpi/sectors/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<% content_for :page_title, "#{@sector.name} - Transition Pathway Initiative" %>
<% content_for :page_description, "Description: Compare and assess how prepared the world’s top companies in the #{@sector.name} sector are for the transition to a low-carbon economy." %>
<%= react_component('MqBetaModal', {
enabled: session[:enable_beta_mq_assessments]
}) %>

<div class="sector-page">
<div class="dropdown-selector-sector-page-wrapper">
<%= react_component("DropdownSelector", {
Expand Down

0 comments on commit 3d4921b

Please sign in to comment.