List of Articles with Search
This page uses a Hashtag List with Include Directives to filter Article records using a search phrase.
The Search form and results table are both styled using Bootstrap 3 default theme classes.
Processed this Hashtag Markup:
<form method="get" action="?" class="form-inline add-bottom-margin">
<div class="form-group">
<input type="text" name="search" value="<#[url.search as html]#>" class="form-control">
<input type="submit" value="Search" class="btn btn-primary">
</div>
</form>
<# start list for articles;
include when headline contains "<#[url.search]#>"
or body contains "<#[url.search]#>";
show 10 rows per page;
#>
<# start header #>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Status</th>
<th>Headline</th>
<th>Action</th>
</tr>
</thead>
<# end header #>
<# start row #>
<tr>
<td><# status as html #></td>
<td><# headline as html #></td>
<td><a href="form?edit=<# id #>" class="label label-primary">Edit</a>
<a href="apply?id=<# id #>" class="label label-primary">Apply</a>
<a href="delete?id=<# id #>&index=<#[url.index]#>"
onclick="return confirm('Confirm Delete?')"
class="label label-primary">Delete</a>
</td>
</tr>
<# end row #>
<# start footer #>
</table>
<# end footer #>
<# no results #>
<h4 class="alert alert-warning text-center">No Matching Articles</h4>
<# end no results #>
<# end list #>