Page 1 of 1

PostPosted: Tue May 15, 2007 8:32 am
by Markus
Hi all,

another question i have and could not find an answer yet is if it's possible to disable a single feature (let's say find) in the show_actions_menu or only the whole show_actions_menu?

I would like to create a custom find form for my users. Can I maybe integrate this behind the find tab as an alternative?

greets

Markus

PostPosted: Tue May 15, 2007 12:07 pm
by shannah

There are actually a few ways to disable or replace an action from the table tabs.Ê These tabs are all actions defined in the actions.ini file.Ê Check out the actions.ini file in the dataface install directory to see all the available actions.Ê If you go there and search for [find], you'll see this:

;; Show a "Find Record Form"
[find]
label = Find
category = table_tabs
url = "{$this->url('-action=find')}"
accessKey = "f"
mode = find
permission = find
template = Dataface_Find_View.html
order=0.75


Or something like it.Ê The category=table_tabs is what causes it to show up in the top tabs.Ê If you wanted to make your own action and make it show up in the table tabs you could add an actions.ini file to your application directory and set category = table_tabs.

You could even override the existing find action by copying and pasting its section into your app's actions.ini file and changing the values youÊ want to change.Ê For example you could simply change the template to the name of your own template to change the find form.

In Dataface 0.7 you could actually just create an action called find and only override the values that you want changed using the syntax:

[find > find]
template=MyTemplate.html

(This means that your find action inherits from the default find action... without this, it would just replace the whole action).

Another way to override the find form is to not worry about the actions.ini file at all, but instead override the find_form slot using the application delegate class.

e.g. function block__find_form(){
ÊÊÊ echo "My find form content ....";
}

Hope this helps a little.

-Steve


PostPosted: Wed May 16, 2007 3:00 am
by Markus
Hello Steve,

really good instructions which make me understand your wonderful tool a little better. I just upgraded to 0.71 and found all the stuff in german language. Perfect.

I will give you a little more feedback on your last posting, when I am ready with my changes.

Thanks a lot for this

Markus