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.