diff --git a/app/javascript/vue/storage_locations/modals/description.vue b/app/javascript/vue/storage_locations/modals/description.vue new file mode 100644 index 000000000..296bbb1b6 --- /dev/null +++ b/app/javascript/vue/storage_locations/modals/description.vue @@ -0,0 +1,35 @@ + + + + + + + + + + {{ experiment.name }} + + + + + + + + + + + + diff --git a/app/javascript/vue/storage_locations/renderers/description.vue b/app/javascript/vue/storage_locations/renderers/description.vue index ea2d9d576..49c9b7996 100644 --- a/app/javascript/vue/storage_locations/renderers/description.vue +++ b/app/javascript/vue/storage_locations/renderers/description.vue @@ -1,5 +1,15 @@ - + + + + + + {{ i18n.t('experiments.card.more') }} + + + diff --git a/app/javascript/vue/storage_locations/table.vue b/app/javascript/vue/storage_locations/table.vue index 5647fbaee..3c346f198 100644 --- a/app/javascript/vue/storage_locations/table.vue +++ b/app/javascript/vue/storage_locations/table.vue @@ -13,6 +13,7 @@ @duplicate="duplicate" @tableReloaded="reloadingTable = false" @move="move" + @showDescription="showDescription" @delete="deleteStorageLocation" @share="share" /> @@ -25,6 +26,10 @@ :directUploadUrl="directUploadUrl" :editStorageLocation="editStorageLocation" /> + @@ -52,6 +57,7 @@ import DataTable from '../shared/datatable/table.vue'; import EditModal from './modals/new_edit.vue'; import MoveModal from './modals/move.vue'; import ConfirmationModal from '../shared/confirmation_modal.vue'; +import DescriptionModal from './modals/description.vue'; import ShareObjectModal from '../shared/share_modal.vue'; import DescriptionRenderer from './renderers/description.vue'; import NameRenderer from './renderers/storage_name_renderer.vue'; @@ -65,7 +71,8 @@ export default { ConfirmationModal, ShareObjectModal, DescriptionRenderer, - NameRenderer + NameRenderer, + DescriptionModal }, props: { dataSource: { @@ -96,7 +103,8 @@ export default { moveToUrl: null, shareStorageLocation: null, storageLocationDeleteTitle: '', - storageLocationDeleteDescription: '' + storageLocationDeleteDescription: '', + descriptionModalObject: null }; }, computed: { @@ -143,8 +151,10 @@ export default { field: 'sa_description', headerName: this.i18n.t('storage_locations.index.table.description'), sortable: false, - notSelectable: true, - cellRenderer: 'DescriptionRenderer' + cellStyle: { 'white-space': 'normal' }, + cellRenderer: DescriptionRenderer, + autoHeight: true, + minWidth: 110 }]; return columns; @@ -254,6 +264,9 @@ export default { }); } }, + showDescription(_e, storageLocation) { + [this.descriptionModalObject] = storageLocation; + }, share(_event, rows) { const [storageLocation] = rows; this.shareStorageLocation = storageLocation;