@@ -91,7 +91,13 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
9191 check : "Date" ,
9292 nullable : true ,
9393 apply : "__applyModifiedAt"
94- }
94+ } ,
95+
96+ trashedAt : {
97+ check : "Date" ,
98+ nullable : true ,
99+ apply : "__applyTrashedAt"
100+ } ,
95101 } ,
96102
97103 statics : {
@@ -133,7 +139,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
133139 layout = this . getChildControl ( "header" ) ;
134140 layout . addAt ( control , osparc . dashboard . WorkspaceButtonBase . HPOS . MENU ) ;
135141 break ;
136- case "modified -text" :
142+ case "footer -text" :
137143 control = new qx . ui . basic . Label ( ) . set ( {
138144 textColor : "contrasted-text-dark" ,
139145 alignY : "middle" ,
@@ -161,6 +167,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
161167 } ) ;
162168 workspace . bind ( "accessRights" , this , "accessRights" ) ;
163169 workspace . bind ( "modifiedAt" , this , "modifiedAt" ) ;
170+ workspace . bind ( "trashedAt" , this , "trashedAt" ) ;
164171 workspace . bind ( "myAccessRights" , this , "myAccessRights" ) ;
165172
166173 osparc . utils . Utils . setIdToWidget ( this , "workspaceItem_" + workspace . getWorkspaceId ( ) ) ;
@@ -242,8 +249,17 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
242249 } ,
243250
244251 __applyModifiedAt : function ( value ) {
245- const label = this . getChildControl ( "modified-text" ) ;
246- label . setValue ( osparc . utils . Utils . formatDateAndTime ( value ) ) ;
252+ if ( value ) {
253+ const label = this . getChildControl ( "footer-text" ) ;
254+ label . setValue ( osparc . utils . Utils . formatDateAndTime ( value ) ) ;
255+ }
256+ } ,
257+
258+ __applyTrashedAt : function ( value ) {
259+ if ( value && value . getTime ( ) !== new Date ( 0 ) . getTime ( ) ) {
260+ const label = this . getChildControl ( "footer-text" ) ;
261+ label . setValue ( osparc . utils . Utils . formatDateAndTime ( value ) ) ;
262+ }
247263 } ,
248264
249265 __updateTooltip : function ( ) {
0 commit comments