[#263] Allow setting the page header title

This commit is contained in:
Eric Davis 2011-08-05 10:45:48 -07:00
parent d63cb35e82
commit 4b8f4c3b83
3 changed files with 6 additions and 8 deletions

View File

@ -388,7 +388,9 @@ module ApplicationHelper
end
def page_header_title
if @project.nil? || @project.new_record?
if @page_header_title.present?
h(@page_header_title)
elsif @project.nil? || @project.new_record?
h(Setting.app_title)
else
b = []

View File

@ -1,5 +1,3 @@
<h2><%=l(:label_administration)%></h2>
<div id="admin-index">
<%= render :partial => 'no_data' if @no_configuration_data %>
<%= render :partial => 'menu' %>

View File

@ -1,8 +1,6 @@
<% unless controller_name == 'admin' && action_name == 'index' %>
<% content_for :sidebar do %>
<h3><%=l(:label_administration)%></h3>
<%= render :partial => 'admin/menu' %>
<% end %>
<% @page_header_title = l(:label_administration) %>
<% content_for :sidebar do %>
<%= render :partial => 'admin/menu' %>
<% end %>
<%= render :file => "layouts/base" %>