File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
services/static-webserver/client/source/class/osparc/info Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ qx.Class.define("osparc.info.StudyMedium", {
119119 } , {
120120 label : this . tr ( "ACCESS RIGHTS" ) ,
121121 view : osparc . info . StudyUtils . createAccessRights ( this . getStudy ( ) )
122+ } , {
123+ label : this . tr ( "SHARED" ) ,
124+ view : osparc . info . StudyUtils . createShared ( this . getStudy ( ) )
122125 } , {
123126 label : this . tr ( "CREATED" ) ,
124127 view : osparc . info . StudyUtils . createCreationDate ( this . getStudy ( ) )
Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ qx.Class.define("osparc.info.StudyUtils", {
101101 return accessRights ;
102102 } ,
103103
104+ /**
105+ * @param study {osparc.data.model.Study} Study Model
106+ */
107+ createShared : function ( study ) {
108+ const isShared = new qx . ui . basic . Label ( ) ;
109+ const populateLabel = ( ) => {
110+ const nCollabs = Object . keys ( study . getAccessRights ( ) ) . length ;
111+ isShared . setValue ( nCollabs === 1 ? qx . locale . Manager . tr ( "Not Shared" ) : "+" + String ( nCollabs - 1 ) ) ;
112+ }
113+ study . addListener ( "changeAccessRights" , ( ) => populateLabel ( ) ) ;
114+ populateLabel ( ) ;
115+ return isShared ;
116+ } ,
117+
104118 /**
105119 * @param study {osparc.data.model.Study} Study Model
106120 */
You can’t perform that action at this time.
0 commit comments