diff options
| author | Alban Peignier | 2012-04-16 12:23:20 +0200 |
|---|---|---|
| committer | Alban Peignier | 2012-04-16 12:23:20 +0200 |
| commit | a3b6f1c459e409023a1ef531e4f6f8084731a8f9 (patch) | |
| tree | 21b564a590d52d77aeb658ce1a84f38eee831193 /app | |
| parent | 1bf7ec8772b41ee03f60cd5a148225fb4df85794 (diff) | |
| download | chouette-core-a3b6f1c459e409023a1ef531e4f6f8084731a8f9.tar.bz2 | |
Uses Referential in header only when selected. Fixes #11
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> |
