Skip to content

Commit

Permalink
Add route for full.html.erb regulations (#9541)
Browse files Browse the repository at this point in the history
* full.html.erb regulations

* def full probably makes more sense

* Add full page to navigation
  • Loading branch information
Nanush7 committed Jun 19, 2024
1 parent 25889b3 commit 5fe67da
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/regulations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def show
render_regulations("index.html.erb")
end

def full
render_regulations("full.html.erb")
end

def historical_guidelines
render_regulations("history/official/#{params[:id]}/guidelines.html.erb")
end
Expand Down
6 changes: 4 additions & 2 deletions app/views/layouts/_navigation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@
<ul class="dropdown-menu" role="menu">
<li><a href="/regulations/about"><%= ui_icon('info circle') %> <%= t '.about_regulations' %></a></li>
<li class="divider"></li>
<li><a href="/regulations/"><%= ui_icon('book') %> <%= t '.regulations' %></a></li>
<li><a href="/regulations/guidelines.html"><%= ui_icon('sticky note') %> <%= t '.guidelines' %></a></li>
<li><a href="/regulations/full"><%= ui_icon('book') %> <%= t '.regulations_full' %></a></li>
<li class="divider"></li>
<li><a href="/regulations/"><%= ui_icon('file text') %> <%= t '.regulations' %></a></li>
<li><a href="/regulations/guidelines.html"><%= ui_icon('plus square') %> <%= t '.guidelines' %></a></li>
<li><a href="/regulations/scrambles/"><%= ui_icon('random') %> <%= t '.scrambles' %></a></li>
<li>
<%= link_to(incidents_path) do %>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ en:
db_results_export: "Results Export"
db_dev_export: "Developer Export"
regulations: "Regulations"
regulations_full: "Regulations & Guidelines"
about_regulations: "About the Regulations"
guidelines: "Guidelines"
scrambles: "Scrambles"
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
get '/regulations/countries' => 'regulations#countries'
get '/regulations/scrambles' => 'regulations#scrambles'
get '/regulations/guidelines' => 'regulations#guidelines'
get '/regulations/full' => 'regulations#full'
get '/regulations/translations' => 'regulations#translations'
get '/regulations/translations/:language' => 'regulations_translations#translated_regulation'
get '/regulations/translations/:language/guidelines' => 'regulations_translations#translated_guidelines'
Expand Down

0 comments on commit 5fe67da

Please sign in to comment.