I've been pondering on the CRM capacities of the relation module, and one not very practical thing about it, is that Relations don't appear in the 'add content' list of Drupal. I don't understand why not.
What Relation module now has is two relation creating blocks, one dummy field a separate relation selector field module and some relation rules. There is nothing out of the box, that just makes it easy to create a relation without navigating to the pages that contain the entities.
So my feature request is a 'create relation' block created with views for example, that allows selecting or searching all entities, with filters available, creating them without the need to navigate anywhere. What would be the problem for creating that?
Comments
Comment #1
chx commentedIf you already have a view then just use the entity collector block. What's so complicated...? You want to use blocks? Sure! Display a view in a block and use the entity collector block. The entity collector block does not care about how entities are used as long as they are used.
Comment #2
Yuri commentedSorry, I'm either totally missing what you say, or I was not clear enough in my description. The entity collector block requires the user to navigate to a page showing an entity he wants to include in the relation.
I don't want the users to navigate to add a new relation.
My idea is to have a block that's independent of its context. It thus needs to have selection/auto-complete boxes for the source bundles as well as the relation type and the target entities.
Since that would long lists, it can be filtered with an extra entity type/bundle field.
To filter the selection, the functionality as in the Conditional Fields module can be used.
A kind of similar thing is done in the Relation Select module, but that is a field which depends on its containing entity.
So the new block could look like:
-Select source: [entity type filter] [bundle filter] [search button] <--or an auto-complete field
-Select relation type (automatically fitered)
-Select target (selection box appears only when relation type is directional)
----------
Secondly, it would also be very handy to have a variant of the above, for quickly creating new relations of the currently logged in user. Something like "Create new relation [..] between Me and [..]
in which the source entity is the currently logged in user.
----------
Thirdly, the context independent 'create relation' functionality mentioned in my first idea above, would be very handy to have as a separate 'create relation' page with a link 'create relation' in /admin/content/relation (a relation/add page)
Just like it is currently possible to create content with the node/add link in the admin/content page.
Comment #3
chx commentedThe "needs review" status is reserved for patches. Also , I am planning to completely spin off every piece of entity creation UIs into separate projects so please create a new project if you dont like the two blocks (have you seen relation add?).
Comment #4
mattbk commentedYuri, I see exactly what you're getting at because I'm looking for the same thing. I don't see the need to navigate between two nodes in order to select them as entities.
What chx is suggesting is that you build a View that loads all possible nodes, make a page out of it, and then add one of the relation blocks to that page. Unfortunately if you have several thousand nodes, your view first has to let you filter down to a subset, then the block has you select the entities from that subset that you want, essentially duplicating the effort and potentially confusing the end user. Even making the dropdown menus in the Entity Collector block into autocompletes (something I don't know how to do) would improve the functionality.
I really, really want to use this module, but the UI just needs to make sense to the users.
EDIT: It looks like the Relation Add module (block) is what I am looking for, just need to make it easier to understand for my users.