Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2011 at 20:07 UTC
Updated:
13 Nov 2011 at 00:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedAny theme should already be able to implement it.
Comment #2
ericduran commentedPatch attached.
This allows any theme to declare a css/views-admin.theme_name.css file and views will load that.
The current behavior is almost the same, except views uses the wrong path for any theme thats not included in the views module.
Comment #3
ericduran commentedOh, being that views is trying to do this for any theme, yet it gets the wrong path, this might be a bug report instead of a feature request, but I'll let the maintainers be the judge of that. :-)
Comment #4
ericduran commented@merlinofchaos, I didn't see your comment before attaching the patch. If thats the case then this is probably a bug report.
Comment #5
ericduran commented[double post]
Comment #6
ericduran commentedComment #7
ericduran commentedI'm not entirely sure how to fix the problem, without hard-coding which theme views support. But here's some more details.
So what ends up happening when testing with Rubik for example views call drupal_add_css for these files:
sites/all/modules/views/css/views-admin.rubik.css
sites/all/modules/views/css/views-admin.tao.css (rubik base theme)
Note: If you decide to test this, you will need to modified rubik to correct the filename, and place it in the right directory.
Comment #8
merlinofchaos commentedPerform a file_exists() on that file. If it does not exist, instead do a drupal_add_css using the path for the theme. And, hm. Optionally the 'css' directory. It is unfortunately difficult to discover css files in any ol' directory in a theme.
Comment #9
dawehnerI think this two places are enought. Here is a patch which does it.
Comment #10
dawehnerCommited to 7.x-3.x, because the code looks fine.