feat: Organisations admin screen with the avatar and the members manager
- controller golem15.user.organisations behind golem15.users.access_users - list and form (name, slug preset from the name, description, avatar) - members relation manager: link sets and unlink clears users.organisation_id - deleting an organisation releases its members first - Organisation gains Fillable, Rules, MorphName, AttachRelations, BeforeValidate and the Members relation; models.Slugify - navigation side item organisations - TestAdminOrganisations, TestAdminOrganisationMembers, TestSlugify
This commit is contained in:
18
controllers/organisations/config_form.yaml
Normal file
18
controllers/organisations/config_form.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
name: golem15.user::lang.organisation.label
|
||||
form: ~/plugins/golem15/user/models/organisation/fields.yaml
|
||||
modelClass: Golem15\User\Models\Organisation
|
||||
defaultRedirect: golem15/user/organisations
|
||||
|
||||
create:
|
||||
redirect: golem15/user/organisations/update/:id
|
||||
redirectClose: golem15/user/organisations
|
||||
|
||||
update:
|
||||
redirect: golem15/user/organisations
|
||||
redirectClose: golem15/user/organisations
|
||||
|
||||
messages:
|
||||
create: golem15.user::lang.organisation.new
|
||||
update: backend::lang.messages.form.update
|
||||
saved: backend::lang.messages.form.saved
|
||||
deleted: backend::lang.messages.form.deleted
|
||||
15
controllers/organisations/config_list.yaml
Normal file
15
controllers/organisations/config_list.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
list: ~/plugins/golem15/user/models/organisation/columns.yaml
|
||||
modelClass: Golem15\User\Models\Organisation
|
||||
title: golem15.user::lang.organisation.label_plural
|
||||
recordUrl: golem15/user/organisations/update/:id
|
||||
noRecordsMessage: backend::lang.list.no_records
|
||||
recordsPerPage: 20
|
||||
|
||||
toolbar:
|
||||
buttons: [create]
|
||||
search:
|
||||
prompt: backend::lang.list.search_prompt
|
||||
|
||||
messages:
|
||||
create: golem15.user::lang.organisation.new
|
||||
empty: golem15.user::lang.organisation.list_empty
|
||||
24
controllers/organisations/config_relation.yaml
Normal file
24
controllers/organisations/config_relation.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
members:
|
||||
label: golem15.user::lang.organisation.members
|
||||
messages:
|
||||
link: golem15.user::lang.organisation.add_member
|
||||
unlinkSelected: golem15.user::lang.organisation.remove_members
|
||||
unlinkConfirm: golem15.user::lang.organisation.remove_members_confirm
|
||||
empty: golem15.user::lang.organisation.members_empty
|
||||
view:
|
||||
list:
|
||||
columns:
|
||||
name:
|
||||
label: golem15.user::lang.user.name
|
||||
email:
|
||||
label: golem15.user::lang.user.email
|
||||
toolbarButtons: link|unlink
|
||||
showSearch: true
|
||||
manage:
|
||||
list:
|
||||
columns:
|
||||
name:
|
||||
label: golem15.user::lang.user.name
|
||||
email:
|
||||
label: golem15.user::lang.user.email
|
||||
showSearch: true
|
||||
Reference in New Issue
Block a user