Project

General

Profile

Patch #233 » per_project_themes.diff

Wynn Netherland, 2008-02-03 11:01

View differences:

app/views/projects/_form.rhtml (working copy)
<p><%= f.text_field :identifier, :required => true, :size => 15, :disabled => @project.identifier_frozen? %><br /><em><%= l(:text_length_between, 3, 12) %> <%= l(:text_project_identifier_info) unless @project.identifier_frozen? %></em></p>
<p><%= f.text_field :homepage, :size => 40 %></p>
<p><%= f.check_box :is_public %></p>
<p><label><%= l(:label_theme) %></label>
<%= select_tag 'project[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), @project.ui_theme) %></p>
<%= wikitoolbar_for 'project_description' %>
<% for @custom_value in @custom_values %>
lib/redmine/themes.rb (working copy)
module ApplicationHelper
def stylesheet_path(source)
@current_theme ||= Redmine::Themes.theme(Setting.ui_theme)
project_theme = Redmine::Themes.theme(@project.ui_theme) unless @project.nil?
@current_theme ||= project_theme ||= Redmine::Themes.theme(Setting.ui_theme)
super((@current_theme && @current_theme.stylesheets.include?(source)) ?
"/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
end
(2-2/2)