Actions frame work

A place to discuss development of the Xataface core.

Postby shannah » Wed Mar 22, 2006 6:56 pm

I am mid way through standardizing the concept of an "action" in the application. An action is a link or button that can appear on any part of the page that does something. Okay.. pretty vague description so far I know. How about some examples:

The details, list, and find tabs are actions.
The "Add New Related Record" and "Add Existing Related Record" buttons are actions.
All of the items in the "Actions to be performed" menu are actions.

Right now all of these things are defined in directly in the templates so you would have to modify the templates to add actions. However, I am changing it so that actions can be defined in an actions.ini file.

Each action can have the following properties:
label
icon
description
accessKey
url
category
table
condition
visible

The category would define where the action is displayed. For example the "details", "list", and "find" tabs are all actions with category "table_tabs". You can add another tab to this set of tabs by simply adding a section to the actions.ini file with the appropriate category.

Actions to other parts of the application could be added in similar ways.

The condition property could take simple php expressions that evaluate to true or false that can be executed at render time to see if the action should be displayed.

Many of the concepts for this are borrowed from Plone.

I have created a class called Dataface_ActionTool to encapsulate this behavior and I am developing built-in smarty functions to display the actions.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Mar 24, 2006 10:25 am

Actions framework is pretty much complete.. just need to do some testing and docs and it will be ready to roll out.

Jerry had a great idea on the users forum - to have reporting also. I think i'll start working on this and try to roll it out at the same time as the actions framework.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved