Skip to content

Commit

Permalink
enh: improve metadata display
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jul 1, 2024
1 parent d5ed1aa commit a558a8f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.9.2
- enh: show metadata table caption at top
- enh: show "pipeline" metadata
0.9.1
- ref: do not use tempfile.TemporaryDirectory
- ref: create /tmp/matplotlib before importing matplotlib
Expand Down
8 changes: 7 additions & 1 deletion ckanext/dc_view/assets/dc_view.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
}


caption {
caption.dc_view {
caption-side: top;
padding-bottom: 0;
display: table-caption;
text-align: left;
font-weight: bold;
color: black;
padding-left: 2px;
}

table.dc_view {
border-top: 2px solid #5D7597;
}
6 changes: 3 additions & 3 deletions ckanext/dc_view/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def render_metadata_html(res_dict):
meta[sec][key] = res_dict[dckey]

html = []
for sec in ["experiment", "setup", "imaging", "fluorescence"]:
for sec in ["experiment", "pipeline", "setup", "imaging", "fluorescence"]:
if sec in meta:
html += meta_html_table(meta, sec)
html.append("<br>")
Expand All @@ -24,8 +24,8 @@ def render_metadata_html(res_dict):

def meta_html_table(meta, sec):
html = [
'<table class="table table-striped table-bordered table-condensed">',
"<caption>{}</caption>".format(sec.capitalize()),
'<table class="table table-striped table-bordered table-condensed dc_view">',
f'<caption class="dc_view">{sec.capitalize()}</caption>',
]

kn = [(dclab.dfn.config_descr[sec][key], key) for key in meta[sec].keys()]
Expand Down

0 comments on commit a558a8f

Please sign in to comment.