example frequency/logdice shown.

pull/1/head
Ozbolt Menegatti 4 years ago
parent 437883701a
commit 599338a775

@ -225,7 +225,7 @@
color: @gray; color: @gray;
} }
.example-frequency { .example-frequency {
color: @red; color: @darkred;
} }

@ -55,6 +55,9 @@ class Example(Editable):
return 2 return 2
else: else:
return 3 return 3
def get_other_attributes(self):
return self.inner.other_attributes
class CorpusExample: class CorpusExample:

@ -131,11 +131,11 @@ class View:
example_text_inner_tag = "span.example-text-{}".format(example.get_view_type()) example_text_inner_tag = "span.example-text-{}".format(example.get_view_type())
example_content.append(h(example_text_inner_tag, {}, example.text())) example_content.append(h(example_text_inner_tag, {}, example.text()))
if "frequency" in example.other_attributes: other_attributes = example.get_other_attributes()
example_content.append(h("span.example-frequency", {}, example.other_attributes["frequency"])) if "frequency" in other_attributes:
example_content.append(h("span.example-frequency", {}, other_attributes["frequency"]))
if "logDice" in example.other_attributes: if "logDice" in other_attributes:
example_content.append(h("span.example-logdice", {}, example.other_attributes["logDice"])) example_content.append(h("span.example-logdice", {}, other_attributes["logDice"]))
parent_display = "inherit" parent_display = "inherit"
if not model.examples_shown and not example.is_multiword(): if not model.examples_shown and not example.is_multiword():

Loading…
Cancel
Save