Skip to content

Commit

Permalink
Merge pull request #1366 from girder/item-list-labels
Browse files Browse the repository at this point in the history
Allow labels in item list view
  • Loading branch information
manthey authored Nov 9, 2023
2 parents 6685ba9 + 9752109 commit 2d3794b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Have zarr use read-only mode ([#1360](../../pull/1360))
- Use minified geojs ([#1362](../../pull/1362))
- Configurable item list grid view ([#1363](../../pull/1363))
- Allow labels in item list view ([#1366](../../pull/1366))

### Bug Fixes
- Default to "None" for the DICOM assetstore limit ([#1359](../../pull/1359))
Expand Down
5 changes: 4 additions & 1 deletion docs/girder_config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ This is used to specify how items appear in item lists. There are two settings,
max-width: 250
# show these columns in order from left to right. Each column has a
# "type" and "value". It optionally has a "title" used for the column
# header, and a "format" used for searching and filtering.
# header, and a "format" used for searching and filtering. The "label",
# if any, is displayed to the left of the column value. This is more
# useful in an grid view than in a column view.
columns:
-
# The "image" type's value is either "thumbnail" or the name of an
Expand Down Expand Up @@ -129,6 +131,7 @@ This is used to specify how items appear in item lists. There are two settings,
type: metadata
value: userstain
title: User Stain
label: User Stain
edit: true
# description is used as both a tooltip and as placeholder text
description: Staining method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ ul.g-item-list
justify-content center
width inherit

span.g-item-list-label
font-weight bold
font-size 14px
color black
padding-right 5px

span.large_image_metadata
display inline-block

&.li-item-list[layout_mode="grid"]
display block

Expand Down
3 changes: 3 additions & 0 deletions girder/girder_large_image/web_client/templates/itemList.pug
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ ul.g-item-list.li-item-list(layout_mode=(itemList.layout || {}).mode || '')
}
});
#{divtype}.li-item-list-cell(class=classes.join(' '), g-item-cid=item.cid, href=`#item/${item.id}`, title=colNames[colidx])
if !skip && column.label
span.g-item-list-label
= column.label
if skip
//- ignore
else if column.type === 'record'
Expand Down

0 comments on commit 2d3794b

Please sign in to comment.