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)
12 12
<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>
13 13
<p><%= f.text_field :homepage, :size => 40 %></p>
14 14
<p><%= f.check_box :is_public %></p>
15
<p><label><%= l(:label_theme) %></label>
16
<%= select_tag 'project[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), @project.ui_theme) %></p>
17

  
15 18
<%= wikitoolbar_for 'project_description' %>
16 19

  
17 20
<% for @custom_value in @custom_values %>
lib/redmine/themes.rb (working copy)
65 65

  
66 66
module ApplicationHelper
67 67
  def stylesheet_path(source)
68
    @current_theme ||= Redmine::Themes.theme(Setting.ui_theme)
68
    project_theme = Redmine::Themes.theme(@project.ui_theme) unless @project.nil?
69
    @current_theme ||= project_theme ||= Redmine::Themes.theme(Setting.ui_theme)
69 70
    super((@current_theme && @current_theme.stylesheets.include?(source)) ?
70 71
      "/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
71 72
  end
(2-2/2)