2025-02-09 21:23:06 +00:00
|
|
|
<h1 class="title">Knowledge Base</h1>
|
|
|
|
|
|
|
|
|
|
<check if="{{isset(@SESSION.error)}}">
|
|
|
|
|
<div class="notification is-warning">
|
|
|
|
|
{{ @SESSION.error }}
|
|
|
|
|
</div>
|
|
|
|
|
</check>
|
|
|
|
|
|
2025-02-11 09:26:53 +00:00
|
|
|
<p><a href="/kb/create">create new kb article</a></p>
|
2025-02-09 21:23:06 +00:00
|
|
|
<hr>
|
|
|
|
|
|
2025-02-11 09:26:53 +00:00
|
|
|
<div class="block">
|
|
|
|
|
<form method="GET" action="/kb">
|
|
|
|
|
<div class="level">
|
|
|
|
|
<div class="level-item">
|
2025-02-16 22:03:56 +00:00
|
|
|
<check if="{{ isset(@GET.search)}}">
|
|
|
|
|
<true>
|
|
|
|
|
<input class="input" type="text" name="search" placeholder="Search by title..."
|
|
|
|
|
value="{{ HTMLPurifier::instance()->purify( @GET.search) }}">
|
|
|
|
|
</true>
|
|
|
|
|
<false>
|
|
|
|
|
<input class="input" type="text" name="search" placeholder="Search by title...">
|
|
|
|
|
</false>
|
|
|
|
|
</check>
|
2025-02-11 09:26:53 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="level-right">
|
|
|
|
|
<div class="select">
|
|
|
|
|
<select name="tag">
|
|
|
|
|
<option value="">--Filter by Tag</option>
|
|
|
|
|
<!-- TODO: load list of all tags-->
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="level-right">
|
|
|
|
|
<button class="button is-primary" type="submit">Search</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2025-02-09 21:23:06 +00:00
|
|
|
|
2025-02-11 09:26:53 +00:00
|
|
|
<check if="{{@articles}}">
|
|
|
|
|
<table class="table is-fullwidth is-bordered">
|
|
|
|
|
<thead>
|
2025-02-09 21:23:06 +00:00
|
|
|
<tr>
|
2025-02-11 09:26:53 +00:00
|
|
|
<th>id</th><th>title</th><th>created_at</th>
|
|
|
|
|
<th></th>
|
2025-02-09 21:23:06 +00:00
|
|
|
</tr>
|
2025-02-11 09:26:53 +00:00
|
|
|
</thead>
|
|
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
|
<repeat group="{{@articles}}" value="{{@article}}">
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a href="/kb/{{@article.id}}">{{@article.id}}</a></td>
|
|
|
|
|
<td>{{@article.title}}</td>
|
|
|
|
|
<td>{{@article.created_at}}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<a href="/kb/{{@article.id}}/edit"><i class="fa fa-edit"></i></a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</repeat>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</check>
|
|
|
|
|
|
|
|
|
|
<check if="!@articles">
|
|
|
|
|
<div class="notification is-info is-light">
|
|
|
|
|
<p>No articles found.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</check>
|