How can I show the children record button like appgini does in the detail view?
I have latest versions of appgini and appginihelper.
How can I show a button in the table view that will take you to the children's records?
How can I show the children record button like appgini does in the detail view?
-
- Veteran Member
- Posts: 90
- Joined: 2015-11-23 01:02
Re: How can I show the children record button like appgini does in the detail view?
Maybe I do not understand your question:
The detail view's children-link is a feature of the detail view. It shows a filtered list of child record which are related to exactly one detail record.
For example a course has students.
In table view there are many records, each may have various children records. So, which of them shall be listed when clicking the additional button(s)?
Can you please explain your use case a bit more. You can add buttons or links to the first column of every row. And you can set javascript function or links per button per row.
The detail view's children-link is a feature of the detail view. It shows a filtered list of child record which are related to exactly one detail record.
For example a course has students.
In table view there are many records, each may have various children records. So, which of them shall be listed when clicking the additional button(s)?
Can you please explain your use case a bit more. You can add buttons or links to the first column of every row. And you can set javascript function or links per button per row.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How can I show the children record button like appgini does in the detail view?
Use the
This should open the TV of CHILDTABLENAME and list all records filtered by foreign key.
(see example in next post)
.addLink()
function of AppGini Helper Javascript Library with href like...Code: Select all
CHILDTABLENAME_view.php?filterer_FKCOLUMNNAME=%ID%
(see example in next post)
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How can I show the children record button like appgini does in the detail view?
Here is an example.
Model
Table
Code
The following code produces that inline-toolbar per row. The last button (better so say "link") opens a filtered page of contacts filtered by contacts.partner_id of the specific partner-recor (per row).
First parameter of
Output
This is the result:
Screenrecording
Model
Table
partners
has children records of table contacts
.contacts.partner_id
is lookup referencing partners
table.Code
The following code produces that inline-toolbar per row. The last button (better so say "link") opens a filtered page of contacts filtered by contacts.partner_id of the specific partner-recor (per row).
Code: Select all
$j(document).ready(function () {
AppGiniHelper.TV
.addOpenButton()
.addLink("partners_mindmap.php?SelectedID=%ID%", "record")
.addLink("partners_tree.php?SelectedID=%ID%", "align-left")
.addLink("contacts_view.php?filterer_partner_id=%ID%", "user", "...") // see this line!
.setWidth(0, 180);
});
.addLink()
function is the HREF
. Note that the placeholder %ID%
will be replaced by the primary key of each individual row.Output
This is the result:
Screenrecording
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How can I show the children record button like appgini does in the detail view?
If you just want to add buttons to the top toolbar of Table View (TV), check out the following code:
Code
Parameters:
Output
Screenrecording
Code
Code: Select all
// file: hooks/TABLENAME-tv.js
$j(document).ready(function () {
AppGiniHelper.TV.getTopButtons()
.addLink("index.php", "cog", "Custom Button #1", Variation.info, "Do you really want to hurt me?")
.addButton(function () { alert("Clack!") }, "flash", "Custom #2 - Click", Variation.Primary, "Do you really want to make me cry?")
.addLink("admin/pageHome.php", "cog", "Admin Area", Variation.danger);
});
- AddLink
- HREF
- icon name
- (optional) Caption
- (optional) Variation
- (optional) Prompt (for confirmation dialog)
- AddButton
- Javascript function call
- icon name
- (optional) Caption
- (optional) Variation
- (optional) Prompt (for confirmation dialog)
Output
Screenrecording
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools