diff options
| -rw-r--r-- | app/controllers/home_controller.rb | 1 | ||||
| -rw-r--r-- | app/views/home/index.html.erb | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a7d44f1..56faebf 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -2,5 +2,6 @@ class HomeController < ApplicationController def index @licenses = License.all @companies = Company.all + @locations = Location.all end end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 154d340..b1a567e 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -24,7 +24,7 @@ <li> <%= link_to "active", v1_company_licenses_path(company) %> <ul> - <% Location.all.each do |location| %> + <% @locations.each do |location| %> <li> <%= link_to location.township, v1_company_licenses_path(company, status: "active", township: location.township) %> </li> <% end %> </ul> @@ -32,11 +32,19 @@ <li> <%= link_to "expired", v1_company_licenses_path(company, status: "expired") %> <ul> - <% Location.all.each do |location| %> + <% @locations.each do |location| %> <li> <%= link_to location.township, v1_company_licenses_path(company, status: "expired", township: location.township) %> </li> <% end %> </ul> </li> + <li> + <%= link_to "confidential", v1_company_licenses_path(company, status: "confidential") %> + <ul> + <% @locations.each do |location| %> + <li> <%= link_to location.township, v1_company_licenses_path(company, status: "confidential", township: location.township) %> </li> + <% end %> + </ul> + </li> </ul> </li> <% end %> |
