How to get buttons on HTML template

I created an HTML template for the body of a grid. How can I get the EDIT / DELETE buttons on each row and the ADD button on the toolbar? The FORM BUTTONS are selected - but ADD does not display. Is there a Scriptcase html template for a standard grid that I can just modify (like they have Scriptcase Headers and Footers)?

2020-05-02_16h17_26.png

This is what I did … added another field to the html template for the record id and then changed that field on the grid to be an html image with link to the form to edit the row. Created a custom button to add new records.

can we see the result?

I moved the edit button to the far right … small text for details of the note … here is the html and the result … but …

<!DOCTYPE html>
<html lang=“en-us”>
<head>
<meta name=“viewport” content=“width=device-width, initial-scale=1.0”>
<meta charset=“utf-8” />

<style>
#lin1_col1 { padding-left:9px; padding-top:7px; height:27px; overflow:hidden; text-align:left; font-size:10px; font-weight:normal;}
#lin1_col2 { padding-right:9px; padding-top:7px; height:27px; text-align:right; overflow:hidden; }
#lin2_col1 { padding-right:9px; padding-top:7px; padding-left:14px; height:auto; text-align:left; }
</style>

</head>
<body>
<div style=“width: 100%”>
<div {NM_CSS_FUN_CAB} style="height:auto; display: none; border-width:20px; border-style: none; "></div>
<div style=“height:auto; background-color:#FFFFFF; border-width:0px 0px 1px 0px; border-style: none none dotted none; border-color:#ddd; display: block”>
<table style=“width:100%; border-collapse:collapse; padding:0;”>
<tr>
<th id=“lin1_col1” {NM_CSS_CAB}><span>{note_id} {created_by_id} {created_on} {private} {attachments}</span></th>
<td id=“lin1_col2” {NM_CSS_CAB}><span>{img_edit}</span></td>
</tr>
<tr>
<td id=“lin2_col1” {NM_CSS_CAB}><span>{note}</span></td>
</tr>
</table>
</div>
</div>

&lt;/body&gt;

</html>

2020-05-07_14h09_23.png

My fields are here:

2020-05-07_14h14_36.png

But then I also achieved similar results in a standard grid.

OnScriptInit:
//Color fields
?>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel=“stylesheet”>
<?php

OnRecord:
//Get count of records from files table
$check_sql = “SELECT count(*)”
. " FROM files"
. " WHERE parent_id = ‘" . {note_id} . "’";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]})) // Row found
{
$row_count = {rs[0][0]};
}
else // No row found
{
$row_count = ‘’;
}

//conditionally show paperclip on grid
if ($row_count >= 1) {
{img_attachments} = “<img src=’…/_lib/img/scriptcase__NM__ico__NM__paperclip_16.png’/>” ;
} else {
{img_attachments} = ‘’ ;
}

//Color Private
if({private} == “1” )
{
{private} = “<label class=‘label label-danger’>Private</label>”;
} else {
{private} = “<label class=‘label label-success’></label>”;
}

//Join all fields into one so that I can stack them
$check_sql = “SELECT name”
. " FROM people"
. " WHERE user_id = ‘" . {created_by_id} . "’";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]})) // Row found
{
$people_name = {rs[0][0]};
}
else // No row found
{
$people_name = ‘’;
}
{joined_fields} = “{note_id} Created {created_on} $people_name {img_attachments} {private} <br> {note}” ;

2020-05-07_14h19_28.png