diff --git a/src/wuttafarm/web/views/groups.py b/src/wuttafarm/web/views/groups.py index 899addc..e3ae0ad 100644 --- a/src/wuttafarm/web/views/groups.py +++ b/src/wuttafarm/web/views/groups.py @@ -38,10 +38,13 @@ class GroupView(WuttaFarmMasterView): farmos_refurl_path = "/assets/group" + labels = { + "name": "Asset Name", + } + grid_columns = [ + "drupal_id", "name", - "is_location", - "is_fixed", "archived", ] @@ -54,10 +57,9 @@ class GroupView(WuttaFarmMasterView): form_fields = [ "name", - "is_location", - "is_fixed", - "archived", "notes", + "asset_type", + "archived", "farmos_uuid", "drupal_id", ] @@ -66,6 +68,9 @@ class GroupView(WuttaFarmMasterView): g = grid super().configure_grid(g) + # drupal_id + g.set_label("drupal_id", "ID", column_only=True) + # name g.set_link("name") @@ -82,6 +87,13 @@ class GroupView(WuttaFarmMasterView): # notes f.set_widget("notes", "notes") + # asset_type + if self.creating: + f.remove("asset_type") + else: + f.set_default("asset_type", "Group") + f.set_readonly("asset_type") + def get_farmos_url(self, group): return self.app.get_farmos_url(f"/asset/{group.drupal_id}")