add action column

This commit is contained in:
Jakob Ketterl 2021-02-13 18:41:42 +01:00
parent 3b60e0b737
commit 48f26d00d6
1 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,7 @@ class BookmarksController(AuthorizationMixin, WebpageController):
<th>Name</th>
<th class="frequency">Frequency</th>
<th>Modulation</th>
<th>Actions</th>
</tr>
{bookmarks}
</table>
@ -31,13 +32,17 @@ class BookmarksController(AuthorizationMixin, WebpageController):
def render_bookmark(self, idx: int, bookmark: Bookmark):
return """
<tr data-index="{index}">
<tr data-index="{index}" data-id="{id}">
<td>{name}</td>
<td class="frequency">{frequency}</td>
<td>{modulation}</td>
<td>
<div class="btn btn-sm btn-danger bookmark-delete">delete</div>
</td>
</tr>
""".format(
index=idx,
id=id(bookmark),
name=bookmark.getName(),
frequency=bookmark.getFrequency(),
modulation=bookmark.getModulation(),