Switch to unified view

a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
...
...
182
            response.headers['Content-Type'] = ''
182
            response.headers['Content-Type'] = ''
183
            response.content_type = fp.content_type.encode('utf-8')
183
            response.content_type = fp.content_type.encode('utf-8')
184
            return fp.read()
184
            return fp.read()
185
        return icon.filename
185
        return icon.filename
186
186
187
    @expose('jinja:jinja_master/site_style.css', content_type='text/css')
187
    @expose(content_type='text/css')
188
    @without_trailing_slash
188
    @without_trailing_slash
189
    def site_style(self, **kw):
189
    def site_style(self, **kw):
190
        """Display the css for the default theme."""
190
        """Display the css for the default theme."""
191
        theme = M.Theme.query.find(dict(neighborhood_id=self.neighborhood._id)).first()
191
        theme = M.Theme.query.find(dict(neighborhood_id=self.neighborhood._id)).first()
192
        if theme == None:
192
        if theme == None:
...
...
194
194
195
        response.headers['Content-Type'] = ''
195
        response.headers['Content-Type'] = ''
196
        response.content_type = 'text/css'
196
        response.content_type = 'text/css'
197
        utils.cache_forever()
197
        utils.cache_forever()
198
198
199
        return dict(
200
            color1=theme.color1,
199
        params = dict(color1=theme.color1,
201
            color2=theme.color2,
200
                      color2=theme.color2,
202
            color3=theme.color3,
201
                      color3=theme.color3,
203
            color4=theme.color4,
202
                      color4=theme.color4,
204
            color5=theme.color5,
203
                      color5=theme.color5,
205
            color6=theme.color6,
204
                      color6=theme.color6,
206
            g=g,
205
                      g=g)
207
            extra_css=self.neighborhood.css or '')
206
        css = g.jinja2_env.get_template(g.theme['base_css']).render(extra_css=self.neighborhood.css or '', **params)
207
        for t in g.theme['theme_css']:
208
            css = css + '\n' + g.jinja2_env.get_template(t).render(**params)
209
        return css
208
210
209
class NeighborhoodProjectBrowseController(ProjectBrowseController):
211
class NeighborhoodProjectBrowseController(ProjectBrowseController):
210
    def __init__(self, neighborhood=None, category_name=None, parent_category=None):
212
    def __init__(self, neighborhood=None, category_name=None, parent_category=None):
211
        self.neighborhood = neighborhood
213
        self.neighborhood = neighborhood
212
        super(NeighborhoodProjectBrowseController, self).__init__(category_name=category_name, parent_category=parent_category)
214
        super(NeighborhoodProjectBrowseController, self).__init__(category_name=category_name, parent_category=parent_category)