while (it.next()) |kv| {
const name = kv.val.name;
const id = kv.val.list.idx.?;
- try res.write("<option value=\"{x}\">{s}</option>", .{ id, name.constSlice() });
+ const list_view = try kv.val.list.open(txn);
+ try res.write("<option value=\"{x}\">{s}{s}</option>", .{ id, name.constSlice(), if (list_view.has(post_id) catch false) " *" else "" });
}
try res.write("</select>", .{});
try res.write("<input type=\"hidden\" name=\"post_id\" value=\"{x}\"></input>", .{@intFromEnum(post_id)});
while (it.next()) |kv| {
const name = kv.val.name;
const id = kv.val.list.idx.?;
- try res.write("<option value=\"{x}\">{s}</option>", .{ id, name.constSlice() });
+ const list_view = try kv.val.list.open(txn);
+ try res.write("<option value=\"{x}\">{s}{s}</option>", .{ id, name.constSlice(), if (list_view.has(user.id) catch false) " *" else "" });
}
try res.write("</select>", .{});
try res.write("<input type=\"hidden\" name=\"user.id\" value=\"{x}\"></input>", .{@intFromEnum(user.id)});
const name = kv.val.name;
const post_list = kv.val.list;
try self.res.write(
- \\<a href="/list/{x}">{s}</a>
+ \\<a href="/list/{x}">{s}</a>
, .{ post_list.idx.?, name.constSlice() });
try html_form(self.res, "/delete_list", .{
.{ "type=\"hidden\" name=\"list_id\" value=\"{x}\"", .{kv.key} },
const name = kv.val.name;
const user_list = kv.val.list;
try self.res.write(
- \\<a href="/feed/{x}">{s}</a>
+ \\<a href="/feed/{x}">{s}</a>
, .{ user_list.idx.?, name.constSlice() });
try html_form(self.res, "/delete_feed", .{
.{ "type=\"hidden\" name=\"list_id\" value=\"{x}\"", .{kv.key} },