I want to be able to place text in a specific part of the children tables at the bottom of the detail view as described in the picture. Can anyone help me with some code the will accomplish this? I want to be able to change the text/instructions when the user clicks on the different tabs. Thanks.
How do I enter text on the children tables
-
- Veteran Member
- Posts: 90
- Joined: 2015-11-23 01:02
Re: How do I enter text on the children tables
Hi nycwebmaster,
I had a similar wish. I did place some text to the right of the record counter - but this interfered with jsetzers AppGiniHelper (highly recommended).
So I changed my settings and I am placing text below the record navigation arrows (see image). The text shown there depends on the tab - the different infos read "(10 Bilder max..." and "(50 Dokumente ..." and should be easy to adjust/extend: I am using this code in /hooks/tablename.php -> function tablename_footer
Hope this helps as a starting point.
Olaf
I had a similar wish. I did place some text to the right of the record counter - but this interfered with jsetzers AppGiniHelper (highly recommended).
So I changed my settings and I am placing text below the record navigation arrows (see image). The text shown there depends on the tab - the different infos read "(10 Bilder max..." and "(50 Dokumente ..." and should be easy to adjust/extend: I am using this code in /hooks/tablename.php -> function tablename_footer
Code: Select all
$BilderMaxAnzahl = 'add your text somehow to this variable';
$BilderMaxAnzahl = '<div class="titelHinweis">' . $BilderMaxAnzahl . '</div>';
//you might want to check out this:
// src: https://forums.appgini.com/phpbb/viewtopic.php?f=2&t=3102&p=10355#p10355
$BilderMaxAnzahlHinweis = "<script>\$j('.page-header a').append(' " . $BilderMaxAnzahl . "');</script>";
$BilderMaxAnzahlHinweis = "<script>\$j('body > div.container > div.row > div.col-xs-12 > form > div.page-header').append(' " . $BilderMaxAnzahl . "');</script>";
...
switch ($contentType) {
case 'tableview':
$footer = $BilderMaxAnzahlHinweis . "<%%FOOTER%%>";
break;
case 'detailview':
$footer = $BilderMaxAnzahlHinweis . "<%%FOOTER%%>";
break;
case 'tableview+detailview':
$footer = $BilderMaxAnzahlHinweis . "<%%FOOTER%%>";
break;
...
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
-
- Veteran Member
- Posts: 90
- Joined: 2015-11-23 01:02
Re: How do I enter text on the children tables
It did not worked as intended. I'm including my Event.php from the hooks folder to show what I did. The text showed only below the title of the table view also below the title of the detailed view but not on the children tables as I described on the pictures. Can you please check what I'm doing wrong... here is my Event.php code:
Code: Select all
<?php
// For help on using hooks, please refer to https://bigprof.com/appgini/help/working-with-generated-web-database-application/hooks
function Event_init(&$options, $memberInfo, &$args){
return TRUE;
}
function Event_header($contentType, $memberInfo, &$args){
$header='';
switch($contentType){
case 'tableview':
$header='';
break;
case 'detailview':
$header='';
break;
case 'tableview+detailview':
$header='';
break;
case 'print-tableview':
$header='';
break;
case 'print-detailview':
$header='';
break;
case 'filters':
$header='';
break;
}
return $header;
}
function Event_footer($contentType, $memberInfo, &$args){
$BilderMaxAnzahl = 'add your text somehow to this variable';
$BilderMaxAnzahl = '<div class="titelHinweis">' . $BilderMaxAnzahl . '</div>';
//you might want to check out this:
// src: https://forums.appgini.com/phpbb/viewtopic.php?f=2&t=3102&p=10355#p10355
$BilderMaxAnzahlHinweis = "<script>\$j('.page-header a').append(' " . $BilderMaxAnzahl . "');</script>";
$BilderMaxAnzahlHinweis = "<script>\$j('body > div.container > div.row > div.col-xs-12 > form > div.page-header').append(' " . $BilderMaxAnzahl . "');</script>";
$footer='';
switch($contentType){
case 'tableview':
$footer = $BilderMaxAnzahlHinweis . "<%%FOOTER%%>";
break;
case 'detailview':
$footer = $BilderMaxAnzahlHinweis . "<%%FOOTER%%>";
break;
case 'tableview+detailview':
$footer = $BilderMaxAnzahlHinweis . "<%%FOOTER%%>";
break;
case 'print-tableview':
$footer='';
break;
case 'print-detailview':
$footer='';
break;
case 'filters':
$footer='';
break;
}
return $footer;
}
function Event_before_insert(&$data, $memberInfo, &$args){
return TRUE;
}
function Event_after_insert($data, $memberInfo, &$args){
$link = application_url('Event_view.php') . '?SelectedID=' . urlencode($data['selectedID']);
sendmail([
'to' => '[email protected]',
'subject' => 'A new event has been created',
'message' => "<a href=\"{$link}\">View or edit this record here</a>"
]);
return TRUE;
}
function Event_before_update(&$data, $memberInfo, &$args){
return TRUE;
}
function Event_after_update($data, $memberInfo, &$args){
$link = application_url('Event_view.php') . '?SelectedID=' . urlencode($data['selectedID']);
sendmail([
'to' => '[email protected]',
'subject' => 'A new event has been updated',
'message' => "<a href=\"{$link}\">View or edit this record here</a>"
]);
return TRUE;
}
function Event_before_delete($selectedID, &$skipChecks, $memberInfo, &$args){
return TRUE;
}
function Event_after_delete($selectedID, $memberInfo, &$args){
}
function Event_dv($selectedID, $memberInfo, &$html, &$args){
/* change the layout only if this is not the print preview */
if(isset($_REQUEST['dvprint_x'])) return;
ob_start(); ?>
<script>
$j(function(){
$j('fieldset.form-horizontal').removeClass('form-horizontal').addClass('form-inline');
/* Fix for a bug with lookup drop-downs and date fields to set their correct width */
setInterval(function() {
$j('.select2-container')
.parents('.form-control-static')
.removeClass('form-control-static');
$j('table.form-control-static').removeClass('form-control-static');
}, 1000);
})
</script>
<style>
@media (min-width: 768px){
.form-inline .form-group{
width: 48%;
margin-bottom: 0.75em;
vertical-align: top;
}
}
/* fixing width of input fields */
.form-inline .form-control {
width: 100% !important;
}
</style>
<?php
$new_layout = ob_get_contents();
ob_end_clean();
$html .= $new_layout;
// add button for owner change if we have an exisitng record and the user is not admin
if (!empty($selectedID) && !$memberInfo['admin']) {
ob_start();
?>
<script>
$j(function() {
$j('.panel-title').append('<a href="#" id="selected_records_mass_change_owner_new"><span class="" style="float:right"><i class="glyphicon glyphicon-user"></i> Assign new owner</span></a>');
$j('[id=selected_records_mass_change_owner_new]').click(function(){
mass_change_owner_new('Event', [<?php echo $selectedID; ?>]);
return false; });
});
</script>
<?php
$html .= ob_get_contents();
ob_end_clean();
}
}
function Event_csv($query, $memberInfo, &$args){
return $query;
}
function Event_batch_actions(&$args){
// add batch action for owner change if user is not admin
if (!getLoggedAdmin()) {
return array(
array( 'function' => 'mass_change_owner_new',
'title' => "Assign new owner",
'icon' => 'user')
);
}
else {
return array();
}
}
Re: How do I enter text on the children tables
Hi,
can you please post a screenshot - that would help my imagination
Thanks
Olaf
can you please post a screenshot - that would help my imagination
Thanks
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How do I enter text on the children tables
Please check this recipe: https://github.com/bigprof-software/app ... ild-tab.mdI want to be able to place text in a specific part of the children tables at the bottom of the detail view as described in the picture. Can anyone help me with some code the will accomplish this? I want to be able to change the text/instructions when the user clicks on the different tabs. Thanks.
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: How do I enter text on the children tables
Hi Ahmed,
thank you for the hint to the cookbook. As I had a similar problem which was solved here in the forum, I wonder, if the cookbook-solution will work with jsetzer's AppGiniHelper. Do you know?
Olaf
thank you for the hint to the cookbook. As I had a similar problem which was solved here in the forum, I wonder, if the cookbook-solution will work with jsetzer's AppGiniHelper. Do you know?
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: How do I enter text on the children tables
Didn't test that Olaf. But please let me know if you encounter any error and let's see how to fix it.
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.