-
Notifications
You must be signed in to change notification settings - Fork 133
Adds basic UI for adding, editing and removing group memberships #231
Conversation
This comment has been minimized.
This comment has been minimized.
@amitaibu A lot more work has gone into this. I just need to go through and do some code cleanup etc. I also merged in #222 because the two play very well together, and there would be some conflicts otherwise. Notes:
|
This comment has been minimized.
This comment has been minimized.
0a907b1
to
c683dec
Compare
This comment has been minimized.
This comment has been minimized.
c683dec
to
dbf769c
Compare
This comment has been minimized.
This comment has been minimized.
Haven't forgotten about this, in the meanwhile, here are a few answers to question from above:
in D7 the group owner (e.g. node author) cannot leave the group. Which sounds like the right thing to keep.
We should explicitly disallow, or that lol will become a big cry 😉 |
This comment has been minimized.
This comment has been minimized.
Nice work on this one, @jludwig FWIW, I had to modify og.routing.yml as follows: @@ -51,7 +51,8 @@ entity.og_membership.canonical:
_entity_access: 'og_membership.view'
options:
parameters:
- type: entity:{entity_type_id}
+ group:
+ type: entity:{entity_type_id}
entity.og_membership.add_form:
path: 'group/{entity_type_id}/{group}/admin/members/add/{membership_type}'
@@ -62,7 +63,8 @@ entity.og_membership.add_form:
_og_membership_add_access: 'TRUE'
options:
parameters:
- type: entity:{entity_type_id}
+ group:
+ type: entity:{entity_type_id}
entity.og_membership.edit_form:
path: 'group/{entity_type_id}/{group}/admin/members/{og_membership}/edit' to fix an One more thing to add to the To-Do: the ability to change the membership state. When a user joins the group using the "Request group membership" link, their membership state is set to "pending". Whereas adding them through the new "add members" form sets them as active. |
That PR is very exciting, as it's going to add a critical functionality to OG 8.x, thanks for all the efforts! So here's my feedback after a walkthrough via the UI, many of the things are really small and far from being critical:
More later on the actual implementation. |
$og_membership_type = $og_membership_type->id(); | ||
} | ||
|
||
if ($entity_type_id = $route_match->getParameter('entity_type_id')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jludwig
To determine $entity_type_id
, it's not entirely clear why we need to check both entity_type_id
and _og_entity_type_id
, when this check is used exactly at one route: entity.og_membership.add_form
.
* Returns default membership type if that's all that exists. | ||
* | ||
* @return array | ||
* A render array for a list of the node types that can be added; however, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jludwig
In the function, it seems there's nothing about nodes. but about og_memberships. list of the node types
and later is only one node type
should be in-line with the actual entity that we deal with.
Any plans to commit this soon? |
As far as I can see there's still jludwig#9 that needs to be merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted a couple of minor items.
I have unfortunately no availability any more to review large PRs. My employer no longer gives me time to work on OG since we have long completed our goals, and my family and house renovations take up practically all of my spare time. But I am very happy to see all the progress here, and can't wait to try it out! |
Add a post_update to update the state field of og_membership
Add strict types declaration
@damienmckenna, I'll be merging this in the coming days, let me know if there's any more feedback. |
This has been a huge effort by a number of people, among other: @jludwig, @damienmckenna, @zerolab, @joachim-n, @pwolanin, @AronNovak, @amitaibu, @pfrenssen, @MPParsley, @DiDebru, @bboro, @lennartvava, and more, thank you all! PS: this PR was initially opened on 11 Jan 2017 and may be the oldest PR merge in history :-) |
🥳 Thank you @MPParsley (et al) for getting this finally merged! |
#209 #223
This adds Field UI integration w/Membership Types and Memberships, allowing admins to add/edit/remove both membership types and memberships in groups.
Note: This work was sponsored by BioRAFT. https://www.drupal.org/bioraft
Todo
What it looks like in action
membership_ui.pdf