List of Sortable Items

This page uses a Hashtag List with a Sort directive.   The Table is styled using Bootstrap 3 default theme classes.   Methods are provided to Edit or Delete any Sortable Item.  
Created On Name Sort Order Action
2020-02-12 03:44:57 apple 1 Edit Delete
2020-02-12 03:44:57 banana 2 Edit Delete
2020-02-12 03:44:57 cat 2 Edit Delete
2020-02-12 03:44:57 dog 10 Edit Delete


Processed this Hashtag Markup:
<# start list for sortable items;
	sort by sort order as numeric, name;
#>

<# start header #>
<table class="table table-striped table-hover" id="table">
	<thead>
	<tr>
		<th>Created On</th>
		<th>Name</th>
		<th>Sort Order</th>
		<th>Action</th>
	</tr>
	</thead>
<# end header #>

<# start row #>
	<tr>
		<td><# created on #></td>
		<td><# name as html #></td>
		<td><# sort order as html #></td>
		<td><a href="form?edit=<# id #>&land=ascending-numeric" 
				class=label label-primary">Edit</a>
			<a href="delete?id=<# id #>&index=<#[url.index as html]#>&land=ascending-numeric"
				onclick="return confirm('Delete Sortable Item record?')"
				class="label label-primary">Delete</a>
		</td>
	</tr>
<# end row #>

<# start footer #>
</table>
<# end footer #>

<# no results #>
<# redirect to "/lists/sort/purge?land=ascending-numeric"; #>
<# end no results #>

<# end list #>

Hashtag Markup for Delete Action: /lists/sort/delete
<# delete record for "sortable_items.<#[url.id]#>"; 
	redirect to "/lists/sort/<#[url.land as url]#>?index=<#[url.index as url]#>#table";
#>


The Sort Mini-App uses the Hashtag Markup Language to demonstrate the differences of alphabetic and numeric sorting.

Sortable Item records are stored in an SQL database.