Chaostools content api integration

drumm - April 12, 2009 - 04:31
Project:Dashboard
Version:HEAD
Component:Code
Category:task
Priority:critical
Assigned:Unassigned
Status:closed
Issue tags:drupal.org redesign
Description

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.

#1

drumm - April 12, 2009 - 05:02

Tag

#2

merlinofchaos - April 12, 2009 - 07:04

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

agentrickard - April 13, 2009 - 15:03

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.

AttachmentSize
Picture 1.png 80.64 KB
Picture 2.png 23.54 KB

#4

agentrickard - April 13, 2009 - 18:07
Status:active» needs review

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.

AttachmentSize
dashboard-add-ctools.patch 2.25 KB

#5

agentrickard - April 13, 2009 - 18:24

Patch missed part. Now updated to HEAD.

AttachmentSize
4331334-add-ctools.patch 2.43 KB

#6

merlinofchaos - April 13, 2009 - 18:30

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

#7

agentrickard - April 13, 2009 - 19:44

Corrected and committed to HEAD.

#8

drumm - August 26, 2009 - 07:37
Status:needs review» fixed

#9

drumm - September 4, 2009 - 12:23
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

#10

drumm - September 9, 2009 - 06:11
Status:active» fixed

I did all that. I guess this is fixed.

#11

System Message - September 23, 2009 - 06:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.