-
Notifications
You must be signed in to change notification settings - Fork 0
Relations system
Wellcome to relations system wiki! These wiki pages are part of the main wiki documentation of retebuonvivere project.
This is the main place where to collect everything about the implementation of relations. We need to go further in the development of relations.
-
We should work firstly on collaborations, i.e. relations org → project. These are to be the main - and maybe the only - relations edited by the users.
rbv_relorg is a good place to start from. We need to extend it with this feature:
-
we need a link on project-type nodes saying "Click here to add a collaboration to this project. In order to accomplish this we want to prepopulate the new project edit form with the og_group_ref (this is done already) and with the field_relpro_project, to be prepopulated with the nid of the project we are viewing. Multiple fields entityreference_prepopulate is possible according to this issue#comment.
- This, of course, if we decide to stay with the entity_reference module. If we change to relation module it's different. And we might want to do it.
-
-
Now relations, i.e. relations org → org. We want to extend rbv_rel feature:
-
we want relations pages to display a list of all projects shared by the two organizations related. Ex1: if org1 and org2 collaborate to the same proj1, we want rel-org1-org2 to display something like "org1 and org2 collaborates together in these projects: list of projects (in this case: proj1)".
-
we want to add a rule for automatic relation creation. This would be something like "if two orgs collaborate on the same project, create a relation between the two orgs". I've checked rules capabilities:
- there is an action for creating an entity (like a node).
- I don't know how to check how many projects two orgs have in common.
- The event trigger could be the After saving new content of type collaboration, and then check how many shared projects are there. Or it could be after being referenced by a new relation (the project is the subject here) check if the source node for this relation is different from the already (if there are) sources of other relations referencing this project, then add a relation from this source to the other sources (one by one). There is no trigger already present for this.
-
If - and we should - we want to really integrate this website with facebook, then we should connect relation pages with facebook friendship pages. On Facebook if you type www.facebook.com/user1?and=user2, you have all the content the two users share: pictures, posts, common fiends, ecc...
-
-
Now I think that if two orgs share one project or two or three, that is a good approximation of how much they cooperate together, hence how strong is their relation. This could be implemented in relations weights.