diff options
| author | Michel Etienne | 2014-03-03 14:45:47 +0100 |
|---|---|---|
| committer | Michel Etienne | 2014-03-03 14:45:47 +0100 |
| commit | a7e181faabcde5c7f30aa4602f781666d660d36a (patch) | |
| tree | 77258eb9ad06af218321d9dde97af80c8009bfab | |
| parent | 08dabdb71562553956ba3fc7e356227453a4cf29 (diff) | |
| download | chouette-core-a7e181faabcde5c7f30aa4602f781666d660d36a.tar.bz2 | |
set referential tab when rule_parameter_set page is active
| -rw-r--r-- | app/helpers/application_helper.rb | 7 | ||||
| -rw-r--r-- | app/views/compliance_check_tasks/_test_sheet_toc.html.erb | 15 | ||||
| -rw-r--r-- | app/views/layouts/_user_links.erb | 2 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 6 |
4 files changed, 4 insertions, 26 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3b5bfdfda..8e655c68d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -19,16 +19,9 @@ module ApplicationHelper controller_name == "help" end - def test_sheet_page? - controller_name == "test_sheet" - end - def help_path url_for(:controller => "/help", :action => "show") + '/' end - def test_sheet_path - url_for(:controller => "/test_sheet", :action => "show") + '/' - end end diff --git a/app/views/compliance_check_tasks/_test_sheet_toc.html.erb b/app/views/compliance_check_tasks/_test_sheet_toc.html.erb deleted file mode 100644 index 0605510b4..000000000 --- a/app/views/compliance_check_tasks/_test_sheet_toc.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -<div id="sidebarhelp" class="help"> -<h3>Définition des tests</h3> -<ul> - <% cnt = Array[0,2,28,21] %> - <% for j in 1..3 do %> - <li>Catégorie <%= j.to_s %> - <ul> - <% 1.upto(cnt[j]) do |i| %> - <li><%= link_to 'Fiche '+j.to_s+'.'+i.to_s , test_sheet_path+j.to_s+"_"+i.to_s, :target => "chouette_help" %></li> - <% end %> - </ul> - </li> - <% end %> -</ul> -</div>
\ No newline at end of file diff --git a/app/views/layouts/_user_links.erb b/app/views/layouts/_user_links.erb index e5413d556..404f52172 100644 --- a/app/views/layouts/_user_links.erb +++ b/app/views/layouts/_user_links.erb @@ -12,7 +12,7 @@ <li class="<%= language_class('fr') %>"><%= link_to_language :fr %></li> <li class="<%= language_class('en') %>"><%= link_to_language :en %></li> <li> - <% if user_signed_in? && !help_page? && !test_sheet_page?%> + <% if user_signed_in? && !help_page? %> <li> | </li> <li> <%= link_to help_path , :target => "chouette_help" do %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index df641caf7..0f0d95a4b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -28,7 +28,7 @@ <div class="title"> <% if selected_referential? %> <h1><%= @referential.name %></h1> - <% elsif help_page? || test_sheet_page? %> + <% elsif help_page? %> <h1>Guide d'utilisation</h1> <% end %> </div> @@ -38,7 +38,7 @@ </div> <div class="tabs"> <ul class="main"> - <% if help_page? || test_sheet_page? %> + <% if help_page? %> <li><%= link_to "Aide", help_path, :class =>("current" if help_page?) %></li> <% elsif ! selected_referential? %> <% if user_signed_in? %> @@ -46,7 +46,7 @@ <li class="admin"><%= tab_link_to Organisation.model_name.human, organisation_path %></li> <% end %> <% else %> - <li><%= link_to t("layouts.tabs.dashboard").capitalize, referential_path(@referential), :class => ("current" if current_page?(referential_path(@referential))) %></li> + <li><%= link_to t("layouts.tabs.dashboard").capitalize, referential_path(@referential), :class => ("current" if current_page?(referential_path(@referential)) || request.path.start_with?(referential_rule_parameter_sets_path(@referential))) %></li> <li><%= tab_link_to Chouette::Network, referential_networks_path(@referential) %></li> <li><%= tab_link_to Chouette::Company, referential_companies_path(@referential) %></li> <li><%= tab_link_to Chouette::GroupOfLine, referential_group_of_lines_path(@referential) %></li> |
