|
|
|
@ -109,14 +109,6 @@ def do_chosen_examples(example_list, entry):
|
|
|
|
|
|
|
|
|
|
sense_of_first_example = example_senses[0]
|
|
|
|
|
|
|
|
|
|
# determine if one can choose clusters
|
|
|
|
|
# this can happen ef every example from same sense and every example a collocation
|
|
|
|
|
can_choose_cluster = len(set(example_senses)) == 1
|
|
|
|
|
idx = 0
|
|
|
|
|
while can_choose_cluster and idx < len(example_list):
|
|
|
|
|
can_choose_cluster = example_list[idx].is_collocation()
|
|
|
|
|
idx += 1
|
|
|
|
|
|
|
|
|
|
options = [h("p", {}, "Choose sense for examples")]
|
|
|
|
|
for idx, sense in enumerate(entry.senses):
|
|
|
|
|
text = "{}: {}".format(idx + 1, sense.definition["indicator"])
|
|
|
|
@ -130,11 +122,4 @@ def do_chosen_examples(example_list, entry):
|
|
|
|
|
options.append(h("label.checkable", {"attrs": {"for": id_}}, text))
|
|
|
|
|
options.append(h("br", {}, []))
|
|
|
|
|
|
|
|
|
|
if can_choose_cluster:
|
|
|
|
|
options.append(h("hr", {}, []))
|
|
|
|
|
options.append(h("div.flex.five.example-component", {}, [
|
|
|
|
|
h("div.two-fifth", {}, "NOT IMPLEMENTED"),
|
|
|
|
|
h("div.three-fifth", {},
|
|
|
|
|
show_toggle_cluster_buttons(entry.senses[sense_of_first_example], example_list[0]))]))
|
|
|
|
|
|
|
|
|
|
return modal_template(options, "Examples picker", message.DoChosenExamples(example_list))
|
|
|
|
|