Skip to content

Commit

Permalink
did: add labels and emphasize column names
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Sep 7, 2021
1 parent 61d78e6 commit 6f9410a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bread/contrib/reports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def preview(self):
return hg.BaseElement(
hg.H3(_("Preview")),
layout.datatable.DataTable.from_queryset(
qs[:25], columns=columns, with_toolbar=False
qs[:25], columns=columns, primary_button=""
),
)

Expand Down
9 changes: 6 additions & 3 deletions bread/contrib/reports/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_attribute_description_modal(obj):
)
)
desc = (
hg.SPAN(desc[0], style="font-weight: 700"),
desc[0],
desc[1],
desc[2],
hg.BaseElement(
Expand All @@ -201,10 +201,13 @@ def get_attribute_description_modal(obj):
return layout.modal.Modal(
_("Available columns"),
hg.DIV(
"Bold text marks valid column names",
hg.DIV(_("Bold text marks valid column names")),
layout.datatable.DataTable(
columns=[
layout.datatable.DataTableColumn(_("Column name"), hg.C("row.0")),
layout.datatable.DataTableColumn(
_("Column name"),
hg.SPAN(hg.C("row.0"), style="font-weight: 700"),
),
layout.datatable.DataTableColumn(
_("Description"), hg.F(lambda c: c["row"][2])
),
Expand Down

0 comments on commit 6f9410a

Please sign in to comment.