Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow labels in item list view #1366

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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