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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Issue tags: +drupal.org redesign

Tag

merlinofchaos’s picture

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.

agentrickard’s picture

FileSize
23.54 KB
80.64 KB

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.

agentrickard’s picture

Status: Active » Needs review
FileSize
2.25 KB

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.

agentrickard’s picture

FileSize
2.43 KB

Patch missed part. Now updated to HEAD.

merlinofchaos’s picture

+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 use ctools_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.

agentrickard’s picture

Corrected and committed to HEAD.

drumm’s picture

Status: Needs review » Fixed
drumm’s picture

Priority: Normal » Critical
Status: Fixed » Active

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

drumm’s picture

Status: Active » Fixed

I did all that. I guess this is fixed.

Status: Fixed » Closed (fixed)
Issue tags: -drupal.org redesign

Automatically closed -- issue fixed for 2 weeks with no activity.