no secondary title unless given

git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@96 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7
master
andrew 2008-01-20 01:32:08 +00:00
parent f14fcf5d78
commit be9f6a4915
2 changed files with 4 additions and 5 deletions

View File

@ -20,9 +20,7 @@ module ApplicationHelper
# #
def secondary_title def secondary_title
return h(@secondary_title) if @secondary_title return h(@secondary_title) if @secondary_title
params[:action].to_s.capitalize.gsub(/_/) do |x| ''
$1.capitalize
end
end end
## ##

View File

@ -6,10 +6,10 @@
<%= stylesheet_link_tag 'application', :media => 'all' %> <%= stylesheet_link_tag 'application', :media => 'all' %>
<%= javascript_include_tag :defaults %> <%= javascript_include_tag :defaults %>
<script type="text/javascript"> <script type="text/javascript">
<%= @content_for_script %> <%= yield :script %>
</script> </script>
<style type="text/css"> <style type="text/css">
<%= @content_for_stylesheet %> <%= yield :stylesheet %>
</style> </style>
</head> </head>
@ -37,6 +37,7 @@
<%= link_to_unless_current 'Beverage Styles', styles_path -%><br /> <%= link_to_unless_current 'Beverage Styles', styles_path -%><br />
<%= link_to_unless_current 'Browse Breweries', breweries_path -%><br /> <%= link_to_unless_current 'Browse Breweries', breweries_path -%><br />
<%= link_to_unless_current 'BarleySodas People', peoples_path -%><br /> <%= link_to_unless_current 'BarleySodas People', peoples_path -%><br />
<%= link_to_unless_current 'Gallery', galleries_path -%><br />
<% if has_permission_for_action?(:index, :roles) -%><%= link_to_unless_current 'Roles', roles_path -%><br /><% end -%> <% if has_permission_for_action?(:index, :roles) -%><%= link_to_unless_current 'Roles', roles_path -%><br /><% end -%>
<% unless logged_in? -%><%= link_to_unless_current 'Login', new_session_path -%><% else -%><%= link_to "Logout #{session[:people_title]}", session_path(:id => session[:people_title]), :method => :delete -%><% end %> <% unless logged_in? -%><%= link_to_unless_current 'Login', new_session_path -%><% else -%><%= link_to "Logout #{session[:people_title]}", session_path(:id => session[:people_title]), :method => :delete -%><% end %>
<hr /> <hr />