Coverage for gws-app/gws/plugin/model_widget/file_list/__init__.py: 0%

17 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-10-16 22:59 +0200

1"""File list widget.""" 

2 

3import gws 

4import gws.base.model.widget 

5import gws.plugin.model_widget.feature_list as feature_list 

6 

7gws.ext.new.modelWidget('fileList') 

8 

9 

10class Config(feature_list.Config): 

11 """File list widget configuration.""" 

12 

13 toFileField: str 

14 """Field to link files to.""" 

15 

16 

17class Props(gws.base.model.widget.Props): 

18 withNewButton: bool 

19 withLinkButton: bool 

20 withEditButton: bool 

21 withUnlinkButton: bool 

22 withDeleteButton: bool 

23 toFileField: str 

24 

25 

26class Object(feature_list.Object): 

27 def props(self, user): 

28 return gws.u.merge( 

29 super().props(user), 

30 toFileField=self.cfg('toFileField'), 

31 )