Coverage for gws-app/gws/plugin/model_widget/feature_list/__init__.py: 0%
18 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-17 01:37 +0200
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-17 01:37 +0200
1"""Feature select widget."""
3import gws
4import gws.base.model.widget
6gws.ext.new.modelWidget('featureList')
9class Config(gws.base.model.widget.Config):
10 withNewButton: bool = True
11 withLinkButton: bool = True
12 withEditButton: bool = True
13 withUnlinkButton: bool = False
14 withDeleteButton: bool = False
17class Props(gws.base.model.widget.Props):
18 withNewButton: bool
19 withLinkButton: bool
20 withEditButton: bool
21 withUnlinkButton: bool
22 withDeleteButton: bool
25class Object(gws.base.model.widget.Object):
26 def props(self, user):
27 return gws.u.merge(
28 super().props(user),
29 withNewButton=self.cfg('withNewButton', default=True),
30 withLinkButton=self.cfg('withLinkButton', default=True),
31 withEditButton=self.cfg('withEditButton', default=True),
32 withUnlinkButton=self.cfg('withUnlinkButton', default=False),
33 withDeleteButton=self.cfg('withDeleteButton', default=False),
34 )