|
|
|
@ -44,18 +44,16 @@ class View:
|
|
|
|
|
buttons = [
|
|
|
|
|
h("button.warning", clk(ShowCommentEdit()), "Comment"),
|
|
|
|
|
h("button.normal", clk(ShowVariantsEdit()), "Variants"),
|
|
|
|
|
h("button.success", clk(ShowCommentEdit()), "Labels")]
|
|
|
|
|
h("button.success", clk(ShowEntryLabelsEdit()), "Labels")]
|
|
|
|
|
|
|
|
|
|
if entry.comment == "" and len(entry.labels) == 0 and len(entry.variants) == 0:
|
|
|
|
|
return h("div", {}, buttons)
|
|
|
|
|
|
|
|
|
|
# if entry.comment != "":
|
|
|
|
|
# buttons[0] = h("button.warning", clk(ShowCommentEdit()), "Comment: {}".format(entry.comment))
|
|
|
|
|
|
|
|
|
|
labels = ", ".join([val for _, val in entry.labels])
|
|
|
|
|
return h("table", {}, [
|
|
|
|
|
h("tr", {}, [ h("td", {}, buttons[0]), h("td", {}, entry.comment)]),
|
|
|
|
|
h("tr", {}, [ h("td", {}, buttons[1]), h("td", {}, ", ".join(entry.variants))]),
|
|
|
|
|
h("tr", {}, [ h("td", {}, buttons[2]), h("td", {}, "TODO")])])
|
|
|
|
|
h("tr", {}, [ h("td", {}, buttons[2]), h("td", {}, labels)])])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|