Skip to content

Commit

Permalink
Extract partial
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Mar 15, 2024
1 parent 50ccc84 commit 6aa9060
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
11 changes: 3 additions & 8 deletions app/views/_tailwind/applications/_address_search.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@

<div class="flex flex-col-reverse items-start justify-between gap-8 pt-4 md:flex-row">
<div class="max-w-2xl">
<p>
We currently cover
<%= Authority.percentage_population_covered_by_all_active_authorities.to_i %>% of
Australia's population within <%= Authority.active.count %> authorities.
For this number we're only counting places where the main planning authority is covered.
As an example, most of Victoria is covered by the SPEAR system but not all Victorian
planning applications go through it. So, we don't include SPEAR in our population count.
</p>
<%= render "authorities/coverage_explanation",
percentage: Authority.percentage_population_covered_by_all_active_authorities.to_i,
count: Authority.active.count %>
<p class="pt-4">
We don't yet cover the whole country, but we are working on it.
New authorities are being added all the time.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<p class="text-2xl text-navy">
We currently cover <%= percentage %>% of Australia's population
within <%= count %> authorities.
For this number we're only counting places where the main planning authority is covered.
As an example, most of Victoria is covered by the SPEAR system but not all Victorian planning
applications go through it. So, we don't include SPEAR in our population count.
</p>
12 changes: 3 additions & 9 deletions app/views/_tailwind/authorities/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@
<%= render "coverage_percentage" %>
</div>
<div class="max-w-2xl">
<%# TODO: Extract common partial from this and application search page %>
<p class="text-2xl text-navy">
We currently cover <%= @percentage_population_covered_by_all_active_authorities %>% of Australia's population
within <%= @authority_count %> authorities.
For this number we're only counting places where the main planning authority is covered.
As an example, most of Victoria is covered by the SPEAR system but not all Victorian planning
applications go through it. So, we don't include SPEAR in our population count.
</p>

<%= render "coverage_explanation",
percentage: @percentage_population_covered_by_all_active_authorities,
count: @authority_count %>
<p class="mt-4 text-2xl text-navy">
We don't yet cover the whole country, but we are working on it.
New authorities are being added all the time, so if your local authority isn't listed below
Expand Down

0 comments on commit 6aa9060

Please sign in to comment.