Posted by drumm on April 12, 2009 at 4:31am
| Project: | Dashboard |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | drupal.org redesign |
Issue Summary
Dashboard and panels are kinda similar, but not really. The content API in Panels is moving to chaostools. This is the shared functionality, dashboard should use it.
Comments
#1
Tag
#2
Status: API itself is now in chaostools and seems stable. I have add/edit/config working with it in an unchecked in Panels 3. Currently the 'custom' content type (type in a title and a body) works and the 'block' content type works, where Drupal blocks can be made available.
Remaining needs: We'll need Views content widgets and we'll need the UI to control widget availability for dashboard, because it will very much want to limit what is available and this is going to be much better if it can be controlled through a UI I think. Though it may be that a hook would be better since that way it's drupalorg. If it's the latter, dashboard can handle it and I need do nothing.
#3
My thought is to have admin configuration for dashboard handle the availability issue. Something cleaner than (but similar to) the old MySite configuration options (attached).
There would also be configuration options per content class, such as the options for selecting which Vocabularies to display term-based data for (attached).
This is made possible through hook_dashboard and admin page callbacks.
#4
Here is a patch to integrate CTools into the dashboard loader functions. It also removes the simple code from hook_init().
Let access checks tell us if we need to load the package.
#5
Patch missed part. Now updated to HEAD.
#6
+function dashboard_load_ctools() {+ ctools_include('content');
+ ctools_get_content_types();
+}
The second function here doesn't really do anything except load code unnecessarily, unless you intended to return values, which it doesn't look like you do. Just
ctools_include('content')should be fine. You should use ctools_get_content_type($item) whenever you need that in order to load the code for it only on demand, and usectools_content_get_available_types()(note: currently this is ctools_get_available_content_types() in CVS but am committing a change shortly because the function name is inconsistent with the normal namespace rules I'm using) to get a complete list of available content (including subtypes) that can be used.#7
Corrected and committed to HEAD.
#8
#9
Looks like the next steps are:
- Change database to store Ctools content identifiers
- Convert dashboard.defaults.inc to identify Ctools content
- Convert dashboard_page() to render Ctools content
#10
I did all that. I guess this is fixed.
#11
Automatically closed -- issue fixed for 2 weeks with no activity.