##// END OF EJS Templates
Removed @html_title assignments in controllers....
Jean-Philippe Lang -
r704:7e4611ad3180
parent child
Show More
@@ -123,14 +123,12 class ApplicationController < ActionController::Base
123 123 end
124 124
125 125 def render_403
126 @html_title = "403"
127 126 @project = nil
128 127 render :template => "common/403", :layout => true, :status => 403
129 128 return false
130 129 end
131 130
132 131 def render_404
133 @html_title = "404"
134 132 render :template => "common/404", :layout => true, :status => 404
135 133 return false
136 134 end
@@ -169,7 +169,6 private
169 169 def find_project
170 170 @issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
171 171 @project = @issue.project
172 @html_title = "#{@project.name} - #{@issue.tracker.name} ##{@issue.id}"
173 172 rescue ActiveRecord::RecordNotFound
174 173 render_404
175 174 end
@@ -631,7 +631,6 private
631 631 # Used as a before_filter
632 632 def find_project
633 633 @project = Project.find(params[:id])
634 @html_title = @project.name
635 634 rescue ActiveRecord::RecordNotFound
636 635 render_404
637 636 end
@@ -78,7 +78,6 class SearchController < ApplicationController
78 78 private
79 79 def find_project
80 80 @project = Project.find(params[:id])
81 @html_title = @project.name
82 81 rescue ActiveRecord::RecordNotFound
83 82 render_404
84 83 end
@@ -101,6 +101,18 module ApplicationHelper
101 101 html
102 102 end
103 103
104 def set_html_title(text)
105 @html_header_title = text
106 end
107
108 def html_title
109 title = []
110 title << @project.name if @project
111 title << @html_header_title
112 title << Setting.app_title
113 title.compact.join(' - ')
114 end
115
104 116 # format text according to system settings
105 117 def textilizable(text, options = {})
106 118 return "" if text.blank?
@@ -2,3 +2,5
2 2
3 3 <p><%= l(:notice_not_authorized) %></p>
4 4 <p><a href="javascript:history.back()">Back</a></p>
5
6 <% set_html_title '403' %>
@@ -2,3 +2,5
2 2
3 3 <p><%= l(:notice_file_not_found) %></p>
4 4 <p><a href="javascript:history.back()">Back</a></p>
5
6 <% set_html_title '404' %>
@@ -109,3 +109,5 end %>
109 109 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
110 110 </div>
111 111 &nbsp;
112
113 <% set_html_title "#{@issue.tracker.name} ##{@issue.id}" %>
@@ -1,7 +1,7
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3 3 <head>
4 <title><%= Setting.app_title + (@html_title ? ": #{@html_title}" : "") %></title>
4 <title><%=h html_title %></title>
5 5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 6 <meta name="description" content="<%= Redmine::Info.app_name %>" />
7 7 <meta name="keywords" content="issue,bug,tracker" />
@@ -4,6 +4,7
4 4 <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
5 5 </div>
6 6 <h2><%=l(:label_issue_plural)%></h2>
7 <% set_html_title l(:label_issue_plural) %>
7 8
8 9 <% form_tag({:action => 'list_issues'}, :id => 'query_form') do %>
9 10 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
@@ -37,6 +38,7
37 38 <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
38 39 </div>
39 40 <h2><%= @query.name %></h2>
41 <% set_html_title @query.name %>
40 42 <% end %>
41 43 <%= error_messages_for 'query' %>
42 44 <% if @query.valid? %>
@@ -31,3 +31,5
31 31 <% content_for :header_tags do %>
32 32 <%= stylesheet_link_tag 'scm' %>
33 33 <% end %>
34
35 <% set_html_title @page.pretty_title %>
@@ -41,3 +41,5
41 41 <% content_for :header_tags do %>
42 42 <%= stylesheet_link_tag 'scm' %>
43 43 <% end %>
44
45 <% set_html_title @page.pretty_title %>
General Comments 0
You need to be logged in to leave comments. Login now