diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/application_helper.rb | 5 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a01ee1ed4..cf6486306 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,8 @@ module ApplicationHelper + + def selected_referential? + @referential.present? and not @referential.new_record? + end + end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 28ed19e1f..ceafd8944 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> - <title>CHOUETTE - <%= title %></title> + <title>Chouette - <%= title %></title> <%= stylesheet_link_tag :application %> <%= javascript_include_tag :application %> <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script> @@ -19,8 +19,8 @@ <%= link_to image_tag("logo_chouette.png"), referentials_path %> </div> <div class="title"> - <% if @referential.present? %> - <h1><%= @referential.name.upcase %></h1> + <% if selected_referential? %> + <h1><%= @referential.name %></h1> <% end %> </div> <div class="interaction"> @@ -29,7 +29,7 @@ </div> <div class="tabs"> <ul class="main"> - <% if !@referential.present? || @referential.new_record? %> + <% unless selected_referential? %> <li><%= tab_link_to Referential, referentials_path %></li> <% else %> <li><%= link_to t("layouts.tabs.dashboard"), referential_path(@referential), :class => ("current" if current_page?(referential_path(@referential))) %></li> |
