ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

themes_outside_of_public_theme.diff

Eric Davis, 2012-04-16 05:52 pm

Download (964 Bytes)

 
b/lib/redmine/themes.rb
41 41
    class Theme
42 42
      attr_reader :path, :name, :dir
43 43

  
44
      # Public location where the theme can be accessed at from the web server.
45
      # e.g. /themes/foo
46
      attr_reader :public_path
47
      
44 48
      def initialize(path)
45 49
        @path = path
46 50
        @dir = File.basename(path)
51
        @public_path = path.gsub(Rails.public_path, '')
47 52
        @name = @dir.humanize
48 53
        @stylesheets = nil
49 54
        @javascripts = nil
......
69 74
      end
70 75

  
71 76
      def stylesheet_path(source)
72
        "/themes/#{dir}/stylesheets/#{source}"
77
        public_path + "/stylesheets/#{source}"
73 78
      end
74 79

  
75 80
      def javascript_path(source)
76
        "/themes/#{dir}/javascripts/#{source}"
81
        public_path + "/javascripts/#{source}"
77 82
      end
78 83

  
79 84
      private