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

17 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-03 10:12 +0100

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 )