BathHacked/energy-sparks

View on GitHub
app/views/schools/advice/baseload/_seasonal_variation_table.html.erb

Summary

Maintainability
Test Coverage
<table class="table table-sm">
  <thead class="thead-dark">
    <tr>
      <th class="text-left"><%= t('advice_pages.baseload.tables.columns.assessment') %></th>
      <th class="text-right"><%= t('advice_pages.baseload.tables.columns.baseload_in_winter') %></th>
      <th class="text-right"><%= t('advice_pages.baseload.tables.columns.baseload_in_summer') %></th>
      <th class="text-right"><%= t('advice_pages.baseload.tables.columns.percentage_difference') %></th>
      <th class="text-right"><%= t('advice_pages.baseload.tables.columns.potential_saving_gbp') %></th>
      <th class="text-right"><%= t('advice_pages.baseload.tables.columns.potential_saving_co2') %></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td class="text-left"><%= format_rating(seasonal_variation.variation_rating) %></td>
      <td class="text-right"><%= format_unit(seasonal_variation.winter_kw, :kw) %></td>
      <td class="text-right"><%= format_unit(seasonal_variation.summer_kw, :kw) %></td>
      <td class="text-right"><%= format_unit(seasonal_variation.percentage, :percent) %></td>
      <td class="text-right"><%= format_unit(seasonal_variation.estimated_saving_£, :£) %></td>
      <td class="text-right"><%= format_unit(seasonal_variation.estimated_saving_co2, :kg) %></td>
    </tr>
  </tbody>
</table>
<%= render 'schools/advice/how_have_we_analysed_your_data_table_caption', data_target: "how-have-we-analysed-your-data-footnotes" %>