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